зеркало из https://github.com/mozilla/pjs.git
new method SetRootedScriptObject. bug 43466 r=brendan
This commit is contained in:
Родитель
a8fd33e3d0
Коммит
2b7255f9bf
|
@ -330,6 +330,16 @@ public:
|
|||
NS_IMETHOD SetTerminationFunction(nsScriptTerminationFunc aFunc,
|
||||
nsISupports* aRef) = 0;
|
||||
|
||||
/**
|
||||
* Store a single script object to be unrooted from the script garbage
|
||||
* collector in the implementation's destructor. This obvious hack
|
||||
* is used to delay the unrooting of an object until that point.
|
||||
* (At time of writing, it's used only on the window script object).
|
||||
* This should never be called twice (the stored object will never
|
||||
* be replaced.)
|
||||
*/
|
||||
NS_IMETHOD SetRootedScriptObject(void *aObject) = 0;
|
||||
|
||||
/**
|
||||
* Called to disable/enable script execution in this context.
|
||||
*/
|
||||
|
|
|
@ -49,6 +49,7 @@ private:
|
|||
nsCOMPtr<nsISupports> mRef;
|
||||
PRBool mScriptsEnabled;
|
||||
PRUint32 mBranchCallbackCount;
|
||||
void *mRootedScriptObject; // special case for the window script object
|
||||
|
||||
static JSBool PR_CALLBACK DOMBranchCallback(JSContext *cx, JSScript *script);
|
||||
|
||||
|
@ -127,6 +128,7 @@ public:
|
|||
NS_IMETHOD GetOwner(nsIScriptContextOwner** owner);
|
||||
NS_IMETHOD SetTerminationFunction(nsScriptTerminationFunc aFunc,
|
||||
nsISupports* aRef);
|
||||
NS_IMETHOD SetRootedScriptObject(void *aObject);
|
||||
NS_IMETHOD GetScriptsEnabled(PRBool *aEnabled);
|
||||
NS_IMETHOD SetScriptsEnabled(PRBool aEnabled);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче