mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 952840 - Remove scope from XPCWN::FindTearOff. r=bholley
This commit is contained in:
parent
01f8bc9e65
commit
022e4a0e0b
@ -1513,17 +1513,14 @@ XPCWrappedNative::FindTearOff(XPCNativeInterface* aInterface,
|
||||
to = newChunk->mTearOffs;
|
||||
}
|
||||
|
||||
{
|
||||
// Scope keeps |tearoff| from leaking across the rest of the function.
|
||||
AutoMarkingWrappedNativeTearOffPtr tearoff(cx, to);
|
||||
rv = InitTearOff(to, aInterface, needJSObject);
|
||||
// During shutdown, we don't sweep tearoffs. So make sure to unmark
|
||||
// manually in case the auto-marker marked us. We shouldn't ever be
|
||||
// getting here _during_ our Mark/Sweep cycle, so this should be safe.
|
||||
to->Unmark();
|
||||
if (NS_FAILED(rv))
|
||||
to = nullptr;
|
||||
}
|
||||
AutoMarkingWrappedNativeTearOffPtr tearoff(cx, to);
|
||||
rv = InitTearOff(to, aInterface, needJSObject);
|
||||
// During shutdown, we don't sweep tearoffs. So make sure to unmark
|
||||
// manually in case the auto-marker marked us. We shouldn't ever be
|
||||
// getting here _during_ our Mark/Sweep cycle, so this should be safe.
|
||||
to->Unmark();
|
||||
if (NS_FAILED(rv))
|
||||
to = nullptr;
|
||||
|
||||
if (pError)
|
||||
*pError = rv;
|
||||
|
Loading…
Reference in New Issue
Block a user