mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 17c47c036980 (bug 937317) WinXP Build Bustage on a CLOSED TREE
This commit is contained in:
parent
abe0ad0b33
commit
5f78db1159
@ -349,7 +349,29 @@ public:
|
||||
nsRefPtr<WebIDLCallbackT> callback = GetWebIDLCallback();
|
||||
return callback.forget();
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
XPCOMCallbackT* callback = GetXPCOMCallback();
|
||||
if (!callback) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIXPConnectWrappedJS> wrappedJS = do_QueryInterface(callback);
|
||||
if (!wrappedJS) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AutoSafeJSContext cx;
|
||||
|
||||
JS::Rooted<JSObject*> obj(cx, wrappedJS->GetJSObject());
|
||||
if (!obj) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
JSAutoCompartment ac(cx, obj);
|
||||
|
||||
// XXXbholley - This goes away in the next patch.
|
||||
nsRefPtr<WebIDLCallbackT> newCallback = new WebIDLCallbackT(obj, /* aIncumbentGlobal = */ nullptr);
|
||||
return newCallback.forget();
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user