Confirmed users, Bureaucrats and Sysops emeriti
419
edits
(4 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
** preserve object equality in JS (== and != but not === and !==) | ** preserve object equality in JS (== and != but not === and !==) | ||
** improve performance over the scripted implementation | ** improve performance over the scripted implementation | ||
* Optimize the chrome-accesses content test using JS engine changes | * Optimize the chrome-accesses-content test using JS engine changes | ||
** a new GCF_SYSTEM flag for objects | ** a new GCF_SYSTEM flag for objects | ||
*** to distinguish chrome from content objects | *** to distinguish chrome from content objects | ||
*** using the one spare bit above the lock bit for objects | *** using the one spare bit above the lock bit for objects | ||
** new JS_IsSystemObject and | ** new JS_IsSystemObject and JS_GetTopScriptFilenameFlags APIs | ||
** new JS_FlagSystemObject and JS_FlagScriptFilenamePrefix APIs | ** new JS_FlagSystemObject and JS_FlagScriptFilenamePrefix APIs | ||
*** JS_FlagScriptFilenamePrefix allows the embedding to preconfigure script filenames as "system" by setting filename prefixes | *** JS_FlagScriptFilenamePrefix allows the embedding to preconfigure script filenames as "system" by setting filename prefixes | ||
Line 26: | Line 26: | ||
** allow app and extension files to opt into XPCNativeWrapper automation | ** allow app and extension files to opt into XPCNativeWrapper automation | ||
** this means a wrapper-sharing policy declaration in the chrome manifest | ** this means a wrapper-sharing policy declaration in the chrome manifest | ||
* | * Resolved issues | ||
** should "system" applied to a script mean has system principals, or wants system XPCNativeWrapper? | ** should "system" applied to a script mean has system principals, or wants system XPCNativeWrapper? | ||
** if so, we have enough bits, and | ** if so, we have enough bits, and HasSystemPrincipal checks can be optimized | ||
** if not, we need another bit, for wrapper sharing policy, per script filename (but not object) as opposed to a fast has-system-principals test | ** if not, we need another bit, for wrapper sharing policy, per script filename (but not object) as opposed to a fast has-system-principals test | ||
*** JS_FlagScriptFilenamePrefix can take a flags argument | *** JS_FlagScriptFilenamePrefix can take a flags argument | ||
*** do we want JS_UnflagScriptFilenamePrefix? do we ever unload chrome? | *** do we want JS_UnflagScriptFilenamePrefix? do we ever unload chrome? | ||
** the resolution: | |||
*** bsmedberg will support an xpcnativewrappers=yes option in the chrome manifest | |||
*** this will cause chrome to get the XPConnect service and call its new wantXPCNativeWrappers(filenamePrefix) method | |||
*** which will call JS_FlagScriptFilenamePrefix | |||
* Open Issues | |||
** bz may have --enable-extensions=all, is seeing double-auto-reg on every start (I am seeing single, separate bug) | |||
** this leads to a restart with zero live contexts, apparently, and some prefixes are lost | |||
** never to be re-added (although all are added at least twice) |