Fixing bug 410462. Quiet down a bogus assertion. r+sr=peterv@propagandism.org, a=mtschrep@gmail.com

git-svn-id: svn://10.0.0.236/trunk@245276 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%mozilla.org
2008-02-08 23:15:00 +00:00
parent 0c22459349
commit 36d06ab00e

View File

@@ -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<nsIXPConnectWrappedNative> iface =
do_QueryInterface(supports);