Skip to content

Instantly share code, notes, and snippets.

@jorendorff
Created March 29, 2012 22:44
Show Gist options
  • Save jorendorff/2244521 to your computer and use it in GitHub Desktop.
Save jorendorff/2244521 to your computer and use it in GitHub Desktop.
JSCLASS_GLOBAL_FLAGS
<- a few in js/src/shell (don't care)
<- a few in js/src/jsapi-tests (don't care)
<- "global" (startupcache/test/TestStartupCache.cpp:417; don't care)
<- "JSDGlobal" (js/jsd/jsd_high.c; don't care)
<- "jdummy" (jsapi.cpp JS_EnterCrossCompartmentCallScript; only used by JSD I think; don't care)
<- "IndexedDBTransactionThreadGlobal" (dom/indexedDB/IDBObjectStore.cpp:2476; don't care)
used in ThreadLocalJSRuntime::Init. Gets its own runtime and compartment.
We may eventually want to debug this, but not right away.
<- "DedicatedWorkerGlobalScope" (dom/workers/WorkerScope.cpp:801)
Used in CreateDedicatedWorkerGlobalScope. Gets its own compartment and maybe its own thread/runtime?
We will eventually want to debug this, but not right away.
<- "autoconfig_global" (extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp:110)
Used in CentralizedAdminPrefManagerInit. It gets its own compartment.
I think this is proxy autoconfig and we don't need to worry about it; there may be only one of them.
<- XPCONNECT_GLOBAL_FLAGS (js/xpconnect/src/xpcpublic.h:78)
All XPC globals with matching principals and so on live in the same compartment (until cpg).
<- XPCNativeScriptableShared::PopulateJSClass() (xpconnect/src/XPCWrappedNativeJSOps.cpp:1396)
<- "global_for_XPCJSContextStack_SafeJSContext" (XPCThreadContext.cpp:177)
Used by XPCJSContextStack::GetSafeJSContext().
<- "Sandbox" (XPCComponents.cpp)
Used by xpc_CreateSandboxObject, via xpc_CreateGlobalObject.
<- "nsXBLPrototypeScript compilation scope" (content/xbl/src/nsXBLDocumentInfo.cpp)
Not sure what this is used for.
Can be accessed via GetGlobalJSObject.
Probably can neglect this; in CPG these things will always be
cloned to the target global before they're actually used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment