Breaking the grip JS has on the DOM: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 54: Line 54:
* Existing "void *aScopeObject" (ExecuteScript/EvaluateStringWithValue/CompileScript), replaced with nsIScriptGlobalObject.  The language impl can then get its "void *" via either sgo->GetLanguageContext() or provide a default via its own private means.
* Existing "void *aScopeObject" (ExecuteScript/EvaluateStringWithValue/CompileScript), replaced with nsIScriptGlobalObject.  The language impl can then get its "void *" via either sgo->GetLanguageContext() or provide a default via its own private means.
This may require a helper function to return a (temporary?) nsIScriptGlobalObject for a given JSObject - eg, plugin code, nsXBLProtoImplField::InstallMember.
This may require a helper function to return a (temporary?) nsIScriptGlobalObject for a given JSObject - eg, plugin code, nsXBLProtoImplField::InstallMember.
[actually, the above may be gratuitious and cause unnecessary problems]
[actually, the above may be gratuitious and cause unnecessary problems][Actually, XBL has an nsIScriptGlobalObject around when it's installing members; it'd just need to pass it around --[[User:Bzbarsky|Bzbarsky]] 18:55, 15 Aug 2005 (PDT)]


* Need a "WrapNative" type function (or maybe not - this may end up being able to be hidden behind Get/SetProperty functions?
* Need a "WrapNative" type function (or maybe not - this may end up being able to be hidden behind Get/SetProperty functions?
Line 233: Line 233:


nsContentUtils::NotifyXPCIfExceptionPending(JSContext* aCx) - 2 callers:
nsContentUtils::NotifyXPCIfExceptionPending(JSContext* aCx) - 2 callers:
* content/xbl/src/nsXBLProtoImplMethod.cpp -  nsXBLProtoImplAnonymousMethod::Execute() - very JS specific
* content/xbl/src/nsXBLProtoImplMethod.cpp -  nsXBLProtoImplAnonymousMethod::Execute() - very JS specific [Do we plan to keep XBL JS-specific, then?  Or allow binding implementations done in other languages? I'd assume the "very JS specific" comment refers to the latter, right?  If so, we'll need a lot of work on this front, especially to keep our existing brutal sharing; perhaps we need some nsIScriptContext methods for that sort of thing?  I'd love for Execute() to not rely on jsapi.h --[[User:Bzbarsky|Bzbarsky]] 18:55, 15 Aug 2005 (PDT)]
* dom/src/base/nsJSEnvironment.cpp
* dom/src/base/nsJSEnvironment.cpp


308

edits