mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 785191: Push a null JSContext when binding / unbinding image elements in a document. r=bz
This commit is contained in:
parent
87bb1cdc45
commit
f4e969d582
@ -1158,6 +1158,11 @@ nsImageLoadingContent::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
if (!aDocument)
|
||||
return;
|
||||
|
||||
// Push a null JSContext on the stack so that callbacks triggered by the
|
||||
// below code won't think they're being called from JS.
|
||||
nsCxPusher pusher;
|
||||
pusher.PushNull();
|
||||
|
||||
if (mCurrentRequestFlags & REQUEST_SHOULD_BE_TRACKED)
|
||||
aDocument->AddImage(mCurrentRequest);
|
||||
if (mPendingRequestFlags & REQUEST_SHOULD_BE_TRACKED)
|
||||
@ -1172,6 +1177,11 @@ nsImageLoadingContent::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
if (!doc)
|
||||
return;
|
||||
|
||||
// Push a null JSContext on the stack so that callbacks triggered by the
|
||||
// below code won't think they're being called from JS.
|
||||
nsCxPusher pusher;
|
||||
pusher.PushNull();
|
||||
|
||||
if (mCurrentRequestFlags & REQUEST_SHOULD_BE_TRACKED)
|
||||
doc->RemoveImage(mCurrentRequest);
|
||||
if (mPendingRequestFlags & REQUEST_SHOULD_BE_TRACKED)
|
||||
|
Loading…
Reference in New Issue
Block a user