From e992898ecb81c610b18566f4548c13314a5d2e9d Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Fri, 28 Sep 2007 14:22:51 +0000 Subject: [PATCH] Fix test. Bug 372769. --- content/xbl/src/nsXBLBinding.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/content/xbl/src/nsXBLBinding.cpp b/content/xbl/src/nsXBLBinding.cpp index e9f83e7f2e7..83e9ddd90b7 100644 --- a/content/xbl/src/nsXBLBinding.cpp +++ b/content/xbl/src/nsXBLBinding.cpp @@ -165,18 +165,19 @@ XBLResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags, if (~nodeClass->flags & (JSCLASS_HAS_PRIVATE | JSCLASS_PRIVATE_IS_NSISUPPORTS)) { - // Looks like whatever |origObj| is it's not our nsIContent. It might well - // be the proto our binding installed, however, so just baul out quietly. - // Do NOT throw an exception here. - // We could make this stricter by checking the class maybe, but whatever - return JS_TRUE; + nsDOMClassInfo::ThrowJSException(cx, NS_ERROR_UNEXPECTED); + return JS_FALSE; } nsCOMPtr xpcWrapper = do_QueryInterface(static_cast(::JS_GetPrivate(cx, origObj))); if (!xpcWrapper) { - nsDOMClassInfo::ThrowJSException(cx, NS_ERROR_UNEXPECTED); - return JS_FALSE; + // Looks like whatever |origObj| is it's not our nsIContent. It might well + // be the proto our binding installed, however, where the private is the + // nsIXBLDocumentInfo, so just baul out quietly. Do NOT throw an exception + // here. + // We could make this stricter by checking the class maybe, but whatever + return JS_TRUE; } nsCOMPtr content = do_QueryWrappedNative(xpcWrapper);