program
comment "/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- *"...
comment "/* vim: set sts=2 sw=2 et tw=80: */"
comment "/* This Source Code Form is subject to the terms of the Mozi"...
comment "/**\n * This module contains code for managing APIs that need"...
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "XPCOMUtils"
} "}"
from "from"
string
" "\""
string_fragment "resource://gre/modules/XPCOMUtils.sys.mjs"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "AppConstants"
} "}"
from "from"
string
" "\""
string_fragment "resource://gre/modules/AppConstants.sys.mjs"
" "\""
; ";"
lexical_declaration (+152 nodes collapsed)
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "ExtensionCommon"
} "}"
from "from"
string
" "\""
string_fragment "resource://gre/modules/ExtensionCommon.sys.mjs"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "ExtensionUtils"
} "}"
from "from"
string
" "\""
string_fragment "resource://gre/modules/ExtensionUtils.sys.mjs"
" "\""
; ";"
lexical_declaration (+21 nodes collapsed)
variable_declaration
var "var"
variable_declarator
object_pattern
{ "{"
shorthand_property_identifier_pattern "BaseContext"
, ","
shorthand_property_identifier_pattern "CanOfAPIs"
, ","
shorthand_property_identifier_pattern "SchemaAPIManager"
, ","
shorthand_property_identifier_pattern "SpreadArgs"
, ","
shorthand_property_identifier_pattern "redefineGetter"
} "}"
= "="
identifier "ExtensionCommon"
; ";"
variable_declaration (+21 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
identifier "ERROR_NO_RECEIVERS"
= "="
string
" "\""
string_fragment "Could not establish connection. Receiving end does not exist"...
" "\""
; ";"
lexical_declaration
const "const"
variable_declarator
identifier "BASE_SCHEMA"
= "="
string
" "\""
string_fragment "chrome://extensions/content/schemas/manifest.json"
" "\""
; ";"
lexical_declaration
const "const"
variable_declarator
identifier "CATEGORY_EXTENSION_MODULES"
= "="
string
" "\""
string_fragment "webextension-modules"
" "\""
; ";"
lexical_declaration
const "const"
variable_declarator
identifier "CATEGORY_EXTENSION_SCHEMAS"
= "="
string
" "\""
string_fragment "webextension-schemas"
" "\""
; ";"
lexical_declaration
const "const"
variable_declarator
identifier "CATEGORY_EXTENSION_SCRIPTS"
= "="
string
" "\""
string_fragment "webextension-scripts"
" "\""
; ";"
lexical_declaration
let "let"
variable_declarator
identifier "schemaURLs"
= "="
new_expression
new "new"
identifier "Set"
arguments
( "("
) ")"
; ";"
expression_statement
call_expression
member_expression
identifier "schemaURLs"
. "."
property_identifier "add"
arguments
( "("
string
" "\""
string_fragment "chrome://extensions/content/schemas/experiments.json"
" "\""
) ")"
; ";"
lexical_declaration
let "let"
variable_declarator
identifier "GlobalManager"
; ";"
lexical_declaration
let "let"
variable_declarator
identifier "ParentAPIManager"
; ";"
function_declaration (+132 nodes collapsed)
comment "// This object loads the ext-*.js scripts that define the ex"...
lexical_declaration (+1328 nodes collapsed)
comment "/**\n * @typedef {object} ParentPort\n * @property {boolean} ["...
comment "// Receives messages related to the extension messaging API "...
comment "// to relevant child messengers. Also handles Native messag"...
comment "/** @typedef {typeof ProxyMessenger} NativeMessenger */"
lexical_declaration (+1895 nodes collapsed)
expression_statement
call_expression
member_expression
identifier "ProxyMessenger"
. "."
property_identifier "init"
arguments
( "("
) ")"
; ";"
comment "// Responsible for loading extension APIs into the right glo"...
expression_statement (+282 nodes collapsed)
comment "/**\n * The proxied parent side of a context in ExtensionChil"...
class_declaration (+1198 nodes collapsed)
comment "/**\n * The parent side of proxied API context for extension "...
class_declaration
class "class"
identifier "ContentScriptContextParent"
class_heritage
extends "extends"
identifier "ProxyContextParent"
class_body
{ "{"
} "}"
comment "/**\n * The parent side of proxied API context for extension "...
class_declaration (+436 nodes collapsed)
comment "/**\n * The parent side of proxied API context for devtools e"...
class_declaration (+694 nodes collapsed)
comment "/**\n * The parent side of proxied API context for extension "...
class_declaration (+101 nodes collapsed)
expression_statement (+2846 nodes collapsed)
expression_statement
call_expression
member_expression
identifier "ParentAPIManager"
. "."
property_identifier "init"
arguments
( "("
) ")"
; ";"
comment "/**\n * A hidden window which contains the extension pages th"...
class_declaration (+743 nodes collapsed)
lexical_declaration (+196 nodes collapsed)
comment "/**\n * This is a base class used by the ext-backgroundPage a"...
class_declaration (+379 nodes collapsed)
comment "/**\n * @typedef {import(\"resource://devtools/server/actors/d"...
comment "/**\n * This object provides utility functions needed by the "...
lexical_declaration (+1218 nodes collapsed)
comment "/**\n * Returns a Promise which resolves with the message dat"...
function_declaration (+239 nodes collapsed)
comment "/**\n * Returns a Promise which rejects if the load in the br"...
function_declaration (+276 nodes collapsed)
comment "// This should be called before browser.loadURI is invoked."
function_declaration (+143 nodes collapsed)
comment "/**\n * This helper is used to subscribe a listener (e.g. in "...
function_declaration (+141 nodes collapsed)
comment "/**\n * This helper is used to subscribe a listener (e.g. in "...
function_declaration (+131 nodes collapsed)
comment "// Manages icon details for toolbar buttons in the |pageActi"...
comment "// |browserAction| APIs."
lexical_declaration (+1013 nodes collapsed)
class_declaration (+488 nodes collapsed)
comment "// A cache to support faster initialization of extensions at"...
comment "// All cached data is removed when the browser is updated."
comment "// Extension-specific data is removed when the add-on is upd"...
export_statement (+964 nodes collapsed)
expression_statement
call_expression
member_expression
member_expression
identifier "Services"
. "."
property_identifier "obs"
. "."
property_identifier "addObserver"
arguments
( "("
identifier "StartupCache"
, ","
string
" "\""
string_fragment "startupcache-invalidate"
" "\""
) ")"
; ";"
export_statement (+33 nodes collapsed)
comment "// browserPaintedPromise and browserStartupPromise are promi"...
comment "// resolve after the first browser window is painted and aft"...
comment "// windows have been restored, respectively. Alternatively,"
comment "// browserStartupPromise also resolves from the extensions-l"...
comment "// notification sent by Firefox Reality on desktop platforms"...
comment "// doesn't support SessionStore."
comment "// _resetStartupPromises should only be called from outside "...
expression_statement (+102 nodes collapsed)
expression_statement
call_expression
member_expression
identifier "ExtensionParent"
. "."
property_identifier "_resetStartupPromises"
arguments
( "("
) ")"
; ";"
expression_statement (+204 nodes collapsed)
comment "// Register WPTMessages actor when running under WPT."
if_statement (+50 nodes collapsed)