Merge backout.
authorRobert Sayre <sayrer@gmail.com>
Thu, 06 Jan 2011 21:38:52 -0500
changeset 60193 15aa85ec1b043c1a776bbcf600d896128671f268
parent 60191 298b96dee3b24fdcf78e7475dff84738eb02bfde (current diff)
parent 60192 1cd2c3d9f5623b4e8958eaaf3cf79d38e78b1a64 (diff)
child 60195 b20f4eb4a59c2ce383071086c6ac73c09b985661
push id17881
push usercleary@mozilla.com
push dateFri, 07 Jan 2011 19:57:21 +0000
treeherdermozilla-central@54576be62860 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0b9pre
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
Merge backout.
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -6261,37 +6261,27 @@ ResolvePrototype(nsIXPConnect *aXPConnec
 
         if (JSVAL_IS_OBJECT(val)) {
           proto = JSVAL_TO_OBJECT(val);
         }
       }
     }
 
     if (dot_prototype) {
-      JSAutoEnterCompartment ac;
-      if (!ac.enter(cx, dot_prototype)) {
-        return NS_ERROR_UNEXPECTED;
-      }
-
       JSObject *xpc_proto_proto = ::JS_GetPrototype(cx, dot_prototype);
 
       if (proto &&
           (!xpc_proto_proto ||
            JS_GET_CLASS(cx, xpc_proto_proto) == sObjectClass)) {
         if (!JS_WrapObject(cx, &proto) ||
             !JS_SetPrototype(cx, dot_prototype, proto)) {
           return NS_ERROR_UNEXPECTED;
         }
       }
     } else {
-      JSAutoEnterCompartment ac;
-      if (!ac.enter(cx, winobj)) {
-        return NS_ERROR_UNEXPECTED;
-      }
-
       dot_prototype = ::JS_NewObject(cx, &sDOMConstructorProtoClass, proto,
                                      winobj);
       NS_ENSURE_TRUE(dot_prototype, NS_ERROR_OUT_OF_MEMORY);
     }
   }
 
   v = OBJECT_TO_JSVAL(dot_prototype);