Finish backing out changeset 652bd0eed005
authorBlake Kaplan <mrbkap@gmail.com>
Fri, 08 Apr 2011 15:58:42 -0700
changeset 67700 7d90da136b2ceddb54972b8b4170f50c96458b2b
parent 67698 2a91bbaebd7729793e09dfe4dd54b380517b690c (current diff)
parent 67699 d1d5daab95bd18473b3c502a2586f227aa994e2a (diff)
child 67701 a2884bfd139226cc3c0b155e1181b668c692cf1e
child 67736 f2f1472c6dfa578e96a847d0e64ff1335da0561d
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.2a1pre
first release with
nightly linux32
7d90da136b2c / 4.2a1pre / 20110409030509 / files
nightly linux64
7d90da136b2c / 4.2a1pre / 20110409030509 / files
nightly mac
7d90da136b2c / 4.2a1pre / 20110409030509 / files
nightly win32
7d90da136b2c / 4.2a1pre / 20110409030509 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Finish backing out changeset 652bd0eed005
--- 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;
         }
     }