XPConnect:Security:XPCNativeWrapper Automation: Difference between revisions

 
(2 intermediate revisions by the same user not shown)
Line 15: Line 15:
*** 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 JS_IsSystemScript APIs
** 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
* Open issues
* 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 HasSystemPrincipal checks can be optimized
** if so, we have enough bits, and HasSystemPrincipal checks can be optimized
Line 32: Line 32:
*** 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)
Confirmed users, Bureaucrats and Sysops emeriti
419

edits