mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 554833 - Define 'document' on XPCNativeWrapped windows properly. r=jst
--HG-- extra : rebase_source : 99693fdf3dbd77039f17c31ad5b01050a5957792
This commit is contained in:
parent
89a5523e7f
commit
3cab1f9ae4
@ -6625,6 +6625,17 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
// property
|
||||
*objp = obj;
|
||||
|
||||
if (ObjectIsNativeWrapper(cx, obj)) {
|
||||
// Unless our object is a native wrapper, in which case we have to
|
||||
// define it ourselves.
|
||||
|
||||
*_retval = JS_DefineProperty(cx, obj, "document", v, NULL, NULL,
|
||||
JSPROP_READONLY | JSPROP_ENUMERATE);
|
||||
if (!*_retval) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user