mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1131801 part 2. Get rid of the now-useless RescueOrphansInScope. r=peterv
This commit is contained in:
parent
fcd55640cb
commit
a2da46c8a1
@ -1664,12 +1664,6 @@ nsHTMLDocument::Open(JSContext* cx,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIXPConnect *xpc = nsContentUtils::XPConnect();
|
|
||||||
rv = xpc->RescueOrphansInScope(cx, oldScope->GetGlobalJSObject());
|
|
||||||
if (rv.Failed()) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ interface nsIXPCFunctionThisTranslator : nsISupports
|
|||||||
{ 0xbd, 0xd6, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }
|
{ 0xbd, 0xd6, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }
|
||||||
%}
|
%}
|
||||||
|
|
||||||
[noscript, uuid(75975244-2cf0-43b1-b79a-9fd447fac06b)]
|
[noscript, uuid(6872bfd6-660b-4aa3-b54b-41ce1d2d69e3)]
|
||||||
interface nsIXPConnect : nsISupports
|
interface nsIXPConnect : nsISupports
|
||||||
{
|
{
|
||||||
%{ C++
|
%{ C++
|
||||||
@ -465,9 +465,6 @@ interface nsIXPConnect : nsISupports
|
|||||||
setFunctionThisTranslator(in nsIIDRef aIID,
|
setFunctionThisTranslator(in nsIIDRef aIID,
|
||||||
in nsIXPCFunctionThisTranslator aTranslator);
|
in nsIXPCFunctionThisTranslator aTranslator);
|
||||||
|
|
||||||
void
|
|
||||||
rescueOrphansInScope(in JSContextPtr aJSContext, in JSObjectPtr aScope);
|
|
||||||
|
|
||||||
nsIXPConnectJSObjectHolder
|
nsIXPConnectJSObjectHolder
|
||||||
getWrappedNativePrototype(in JSContextPtr aJSContext,
|
getWrappedNativePrototype(in JSContextPtr aJSContext,
|
||||||
in JSObjectPtr aScope,
|
in JSObjectPtr aScope,
|
||||||
|
@ -690,42 +690,6 @@ nsXPConnect::GetWrappedNativeOfNativeObject(JSContext * aJSContext,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PLDHashOperator
|
|
||||||
MoveableWrapperFinder(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
|
||||||
uint32_t number, void *arg)
|
|
||||||
{
|
|
||||||
nsTArray<nsRefPtr<XPCWrappedNative> > *array =
|
|
||||||
static_cast<nsTArray<nsRefPtr<XPCWrappedNative> > *>(arg);
|
|
||||||
XPCWrappedNative *wn = ((Native2WrappedNativeMap::Entry*)hdr)->value;
|
|
||||||
|
|
||||||
// If a wrapper is expired, then there are no references to it from JS, so
|
|
||||||
// we don't have to move it.
|
|
||||||
if (!wn->IsWrapperExpired())
|
|
||||||
array->AppendElement(wn);
|
|
||||||
return PL_DHASH_NEXT;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* void rescueOrphansInScope(in JSContextPtr aJSContext, in JSObjectPtr aScope); */
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsXPConnect::RescueOrphansInScope(JSContext *aJSContext, JSObject *aScopeArg)
|
|
||||||
{
|
|
||||||
RootedObject aScope(aJSContext, aScopeArg);
|
|
||||||
|
|
||||||
XPCWrappedNativeScope *scope = ObjectScope(aScope);
|
|
||||||
if (!scope)
|
|
||||||
return UnexpectedFailure(NS_ERROR_FAILURE);
|
|
||||||
|
|
||||||
// First, look through the old scope and find all of the wrappers that we
|
|
||||||
// might need to rescue.
|
|
||||||
nsTArray<nsRefPtr<XPCWrappedNative> > wrappersToMove;
|
|
||||||
|
|
||||||
Native2WrappedNativeMap *map = scope->GetWrappedNativeMap();
|
|
||||||
wrappersToMove.SetCapacity(map->Count());
|
|
||||||
map->Enumerate(MoveableWrapperFinder, &wrappersToMove);
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* nsIStackFrame createStackFrameLocation (in uint32_t aLanguage, in string aFilename, in string aFunctionName, in int32_t aLineNumber, in nsIStackFrame aCaller); */
|
/* nsIStackFrame createStackFrameLocation (in uint32_t aLanguage, in string aFilename, in string aFunctionName, in int32_t aLineNumber, in nsIStackFrame aCaller); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsXPConnect::CreateStackFrameLocation(uint32_t aLanguage,
|
nsXPConnect::CreateStackFrameLocation(uint32_t aLanguage,
|
||||||
|
Loading…
Reference in New Issue
Block a user