Bug 844211 - Make this-object nativeCall special-casing actually do something. r=jorendorff, a=bajaj
authorBobby Holley <bobbyholley@gmail.com>
Tue, 05 Mar 2013 15:16:36 -0800
changeset 132318 745cae64974c85ce4fb224932dc68b9033db35d6
parent 132317 21f6a4529d8ae7a3afad1601601e3852bd264493
child 132319 d2e33291adcd4716a8f5b0084cb32d9967c9be4a
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff, bajaj
bugs844211
milestone21.0a2
Bug 844211 - Make this-object nativeCall special-casing actually do something. r=jorendorff, a=bajaj
js/src/jswrapper.cpp
--- a/js/src/jswrapper.cpp
+++ b/js/src/jswrapper.cpp
@@ -721,17 +721,17 @@ CrossCompartmentWrapper::nativeCall(JSCo
             // will stymie this whole process. If that happens, unwrap the wrapper.
             // This logic can go away when same-compartment security wrappers go away.
             if ((src == srcArgs.base() + 1) && dst->isObject()) {
                 JSObject *thisObj = &dst->toObject();
                 if (thisObj->isWrapper() &&
                     !Wrapper::wrapperHandler(thisObj)->isSafeToUnwrap())
                 {
                     JS_ASSERT(!IsCrossCompartmentWrapper(thisObj));
-                    *src = ObjectValue(*Wrapper::wrappedObject(thisObj));
+                    *dst = ObjectValue(*Wrapper::wrappedObject(thisObj));
                 }
             }
         }
 
         if (!CallNonGenericMethod(cx, test, impl, dstArgs))
             return false;
 
         srcArgs.rval().set(dstArgs.rval());