Backed out changeset 652bd0eed005 (bug 641342). It's causing orange.
authorBlake Kaplan <mrbkap@gmail.com>
Fri, 08 Apr 2011 15:56:37 -0700
changeset 67699 d1d5daab95bd18473b3c502a2586f227aa994e2a
parent 67695 652bd0eed005369e444005e6a75944a174056f91
child 67700 7d90da136b2ceddb54972b8b4170f50c96458b2b
push id19417
push usermrbkap@mozilla.com
push dateFri, 08 Apr 2011 23:02:10 +0000
treeherdermozilla-central@7d90da136b2c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs641342
milestone2.2a1pre
backs out652bd0eed005369e444005e6a75944a174056f91
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 652bd0eed005 (bug 641342). It's causing orange.
js/src/xpconnect/wrappers/WrapperFactory.cpp
--- a/js/src/xpconnect/wrappers/WrapperFactory.cpp
+++ b/js/src/xpconnect/wrappers/WrapperFactory.cpp
@@ -274,33 +274,18 @@ WrapperFactory::Rewrap(JSContext *cx, JS
     } else if (AccessCheck::isChrome(origin)) {
         if (obj->isFunction()) {
             JSFunction *fun = obj->getFunctionPrivate();
             if (JS_IsBuiltinEvalFunction(fun) || JS_IsBuiltinFunctionConstructor(fun)) {
                 JS_ReportError(cx, "Not allowed to access chrome eval or Function from content");
                 return nsnull;
             }
         }
-
-        JSObject *inner = obj;
-        OBJ_TO_INNER_OBJECT(cx, inner);
-        XPCWrappedNative *wn;
-        if (IS_WN_WRAPPER(inner) &&
-            (wn = static_cast<XPCWrappedNative *>(inner->getPrivate()))->HasProto() &&
-            wn->GetProto()->ClassIsDOMObject()) {
-            typedef XrayWrapper<JSCrossCompartmentWrapper> Xray;
-            wrapper = &FilteringWrapper<Xray,
-                                        CrossOriginAccessiblePropertiesOnly>::singleton;
-            xrayHolder = Xray::createHolder(cx, obj, parent);
-            if (!xrayHolder)
-                return nsnull;
-        } else {
-            wrapper = &FilteringWrapper<JSCrossCompartmentWrapper,
-                                        ExposedPropertiesOnly>::singleton;
-        }
+        wrapper = &FilteringWrapper<JSCrossCompartmentWrapper,
+                                    ExposedPropertiesOnly>::singleton;
     } else if (AccessCheck::isSameOrigin(origin, target)) {
         // Same origin we use a transparent wrapper, unless the compartment asks
         // for an Xray or the wrapper needs a SOW.
         if (AccessCheck::needsSystemOnlyWrapper(obj)) {
             wrapper = &FilteringWrapper<JSCrossCompartmentWrapper,
                                         OnlyIfSubjectIsSystem>::singleton;
         } else if (targetdata && targetdata->wantXrays &&
                    (IS_WN_WRAPPER(obj) || obj->getClass()->ext.innerObject)) {
@@ -327,17 +312,17 @@ WrapperFactory::Rewrap(JSContext *cx, JS
             typedef XrayWrapper<JSCrossCompartmentWrapper> Xray;
 
             // Location objects can become same origin after navigation, so we might
             // have to grant transparent access later on.
             if (IsLocationObject(obj)) {
                 wrapper = &FilteringWrapper<Xray,
                     SameOriginOrCrossOriginAccessiblePropertiesOnly>::singleton;
             } else {
-                wrapper = &FilteringWrapper<Xray,
+                wrapper= &FilteringWrapper<Xray,
                     CrossOriginAccessiblePropertiesOnly>::singleton;
             }
 
             xrayHolder = Xray::createHolder(cx, obj, parent);
             if (!xrayHolder)
                 return nsnull;
         }
     }