From c48b72a37fa3e4ef10d5694d5c2b80877b6d9048 Mon Sep 17 00:00:00 2001 From: "jst@mozilla.org" Date: Fri, 8 Feb 2008 15:15:00 -0800 Subject: [PATCH] Fixing bug 410462. Quiet down a bogus assertion. r+sr=peterv@propagandism.org, a=mtschrep@gmail.com --- js/src/xpconnect/src/xpcwrappednativescope.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/src/xpconnect/src/xpcwrappednativescope.cpp b/js/src/xpconnect/src/xpcwrappednativescope.cpp index ce1ec88caca..87dbfeafba6 100644 --- a/js/src/xpconnect/src/xpcwrappednativescope.cpp +++ b/js/src/xpconnect/src/xpcwrappednativescope.cpp @@ -41,6 +41,9 @@ /* Class used to manage the wrapped native objects within a JS scope. */ #include "xpcprivate.h" +#ifdef DEBUG +#include "XPCNativeWrapper.h" +#endif /***************************************************************************/ @@ -235,7 +238,6 @@ XPCWrappedNativeScope::SetGlobal(XPCCallContext& ccx, JSObject* aGlobal) mScriptObjectPrincipal = nsnull; // Now init our script object principal, if the new global has one - JSContext* cx = ccx.GetJSContext(); const JSClass* jsClass = STOBJ_GET_CLASS(aGlobal); if(!(~jsClass->flags & (JSCLASS_HAS_PRIVATE | JSCLASS_PRIVATE_IS_NSISUPPORTS))) @@ -712,7 +714,8 @@ GetScopeOfObject(JSObject* obj) { if(!(~clazz->flags & (JSCLASS_HAS_PRIVATE | JSCLASS_PRIVATE_IS_NSISUPPORTS)) && - (supports = (nsISupports*) xpc_GetJSPrivate(obj))) + (supports = (nsISupports*) xpc_GetJSPrivate(obj)) && + !XPCNativeWrapper::IsNativeWrapperClass(clazz)) { nsCOMPtr iface = do_QueryInterface(supports);