mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 771202 - Implement post-transplant plugin behavior. r=bsmedberg
This commit is contained in:
parent
2c522abe65
commit
1d19de70ff
@ -9890,7 +9890,13 @@ NS_IMETHODIMP
|
||||
nsHTMLPluginObjElementSH::PostTransplant(nsIXPConnectWrappedNative *wrapper,
|
||||
JSContext *cx, JSObject *obj)
|
||||
{
|
||||
// XXXbholley - Implement me!
|
||||
// Call through to PostCreate to do the prototype setup all over again. We
|
||||
// may reuse the same prototype, in which case our prototype will be a wrapped
|
||||
// version of the original.
|
||||
nsresult rv = PostCreate(wrapper, cx, obj);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Calling PostCreate during PostTransplant for plugin element failed.");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1812,8 +1812,13 @@ nsNPObjWrapper::GetNewOrUsed(NPP npp, JSContext *cx, NPObject *npobj)
|
||||
}
|
||||
|
||||
if (PL_DHASH_ENTRY_IS_BUSY(entry) && entry->mJSObj) {
|
||||
// Found a live NPObject wrapper, return it.
|
||||
return entry->mJSObj;
|
||||
// Found a live NPObject wrapper. It may not be in the same compartment
|
||||
// as cx, so we need to wrap it before returning it.
|
||||
JSObject *obj = entry->mJSObj;
|
||||
if (!JS_WrapObject(cx, &obj)) {
|
||||
return NULL;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
entry->mNPObj = npobj;
|
||||
|
Loading…
Reference in New Issue
Block a user