mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix for bug 533401 (Names added through external DOM classinfo don't resolve on global object). r=jst, a=beltzner.
This commit is contained in:
parent
86306358a3
commit
7b1a7303e7
@ -4325,14 +4325,6 @@ nsDOMClassInfo::PostCreatePrototype(JSContext * cx, JSObject * proto)
|
||||
JS_ClearPendingException(cx);
|
||||
}
|
||||
|
||||
static const nsIID *sSupportsIID = &NS_GET_IID(nsISupports);
|
||||
|
||||
// This is safe because...
|
||||
if (mData->mProtoChainInterface == sSupportsIID ||
|
||||
!mData->mProtoChainInterface) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// This is called before any other location that requires
|
||||
// sObjectClass, so compute it here. We assume that nobody has had a
|
||||
// chance to monkey around with proto's prototype chain before this.
|
||||
@ -4345,9 +4337,10 @@ nsDOMClassInfo::PostCreatePrototype(JSContext * cx, JSObject * proto)
|
||||
NS_ASSERTION(::JS_GetPrototype(cx, proto) &&
|
||||
JS_GET_CLASS(cx, ::JS_GetPrototype(cx, proto)) == sObjectClass,
|
||||
"Hmm, somebody did something evil?");
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
if (mData->mHasClassInterface) {
|
||||
if (mData->mHasClassInterface && mData->mProtoChainInterface &&
|
||||
mData->mProtoChainInterface != &NS_GET_IID(nsISupports)) {
|
||||
nsCOMPtr<nsIInterfaceInfoManager>
|
||||
iim(do_GetService(NS_INTERFACEINFOMANAGER_SERVICE_CONTRACTID));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user