Bug 656171 - Just remove this mutual subsumption assertion; with document.domain it's not strictly true (r=mrbkap)
authorLuke Wagner <luke@mozilla.com>
Thu, 02 Jun 2011 16:35:31 -0700
changeset 71167 c8e12e8c281bcf1d0490a577bc56807877716990
parent 71166 b4ddabc55995331000b1b7e8bbfc74d918e7e330
child 71168 abd2dcd555f45b539b63f5ad0943803b7253dc88
push id159
push usereakhgari@mozilla.com
push dateTue, 16 Aug 2011 17:53:11 +0000
treeherdermozilla-beta@8786e3e49240 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs656171
milestone6.0a1
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
Bug 656171 - Just remove this mutual subsumption assertion; with document.domain it's not strictly true (r=mrbkap)
js/src/jsobj.cpp
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -1326,29 +1326,17 @@ PrincipalsForCompiledCode(const CallArgs
      *
      * In the converse situation, where the callee has lower privileges than the
      * caller, we might initially guess that the caller would want to retain
      * their higher privileges in the generated code. However, since the
      * compiled code will be run with the callee's scope chain, this would make
      * fp->script()->compartment() != fp->compartment().
      */
 
-    JSPrincipals *calleePrincipals = call.callee().principals(cx);
-
-#ifdef DEBUG
-    if (calleePrincipals) {
-        if (StackFrame *caller = js_GetScriptedCaller(cx, NULL)) {
-            if (JSPrincipals *callerPrincipals = caller->scopeChain().principals(cx)) {
-                JS_ASSERT(callerPrincipals->subsume(callerPrincipals, calleePrincipals));
-            }
-        }
-    }
-#endif
-
-    return calleePrincipals;
+    return call.callee().principals(cx);
 }
 
 }  /* namespace js */
 
 #if JS_HAS_OBJ_WATCHPOINT
 
 static JSBool
 obj_watch_handler(JSContext *cx, JSObject *obj, jsid id, jsval old,