From eabf36bec229b05c4aafbdd48ce705b2c989d5a3 Mon Sep 17 00:00:00 2001 From: "mrbkap%gmail.com" Date: Tue, 7 Mar 2006 19:28:10 +0000 Subject: [PATCH] Don't wrap E4X values in XPCWrappedJS since E4X objects have weird semantics, which cause us trouble both elsewhere in XPConnect, and even in the DOM code. bug 327697, r=brendan sr=shaver a=dveditz git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_0_BRANCH@191913 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/src/xpconnect/src/xpcconvert.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mozilla/js/src/xpconnect/src/xpcconvert.cpp b/mozilla/js/src/xpconnect/src/xpcconvert.cpp index 7ea60748075..4e110a021b0 100644 --- a/mozilla/js/src/xpconnect/src/xpcconvert.cpp +++ b/mozilla/js/src/xpconnect/src/xpcconvert.cpp @@ -1169,6 +1169,12 @@ XPCConvert::JSObject2NativeInterface(XPCCallContext& ccx, } // else... + // XXX E4X breaks the world. Don't try wrapping E4X objects! + // This hack can be removed (or changed accordingly) when the + // DOM <-> E4X bindings are complete, see bug 270553 + if(JS_TypeOfValue(cx, OBJECT_TO_JSVAL(src)) == JSTYPE_XML) + return JS_FALSE; + // Does the JSObject have 'nsISupportness'? // XXX hmm, I wonder if this matters anymore with no // oldstyle DOM objects around.