Bug 714547 - SecurityWrapper should not interfere with same-document.domain access (r=mrbkap,a=akeybl) CLOSED TREE COMM1001_2012020813_RELBRANCH
authorLuke Wagner <luke@mozilla.com>
Tue, 14 Feb 2012 16:28:27 -0500
branchCOMM1001_2012020813_RELBRANCH
changeset 81659 672934cac44901cb80ceea463adec5d7870cd58f
parent 81658 43f8b01767f289d3cae3b07c3c8ecc8a3374d518
child 82224 0be19b7d0d55055f7a6a4c40283c0553c3e1f3e2
push id10
push userlwagner@mozilla.com
push dateWed, 15 Feb 2012 02:26:10 +0000
reviewersmrbkap, akeybl
bugs714547
milestone10.0.1
Bug 714547 - SecurityWrapper should not interfere with same-document.domain access (r=mrbkap,a=akeybl) CLOSED TREE
js/src/jswrapper.cpp
--- a/js/src/jswrapper.cpp
+++ b/js/src/jswrapper.cpp
@@ -856,26 +856,28 @@ SecurityWrapper<Base>::SecurityWrapper(u
   : Base(flags)
 {}
 
 template <class Base>
 bool
 SecurityWrapper<Base>::nativeCall(JSContext *cx, JSObject *wrapper, Class *clasp, Native native,
                                   CallArgs args)
 {
-    /* Let ProxyHandler report the error. */
-    bool ret = ProxyHandler::nativeCall(cx, wrapper, clasp, native, args);
-    JS_ASSERT(!ret && cx->isExceptionPending());
-    return ret;
+    /*
+     * Let this through until compartment-per-global let's us have stronger
+     * invariants wrt document.domain (bug 714547).
+     */
+    return Base::nativeCall(cx, wrapper, clasp, native, args);
 }
 
 template <class Base>
 bool
 SecurityWrapper<Base>::objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx)
 {
-    /* Let ProxyHandler say 'no'. */
-    bool ret = ProxyHandler::objectClassIs(obj, classValue, cx);
-    JS_ASSERT(!ret && !cx->isExceptionPending());
-    return ret;
+    /*
+     * Let this through until compartment-per-global let's us have stronger
+     * invariants wrt document.domain (bug 714547).
+     */
+    return Base::objectClassIs(obj, classValue, cx);
 }
 
 template class js::SecurityWrapper<Wrapper>;
 template class js::SecurityWrapper<CrossCompartmentWrapper>;