Bug 1246293 - Fix a typo in DefineSelfHostedProperty; r=till
authorTerrence Cole <terrence@mozilla.com>
Sun, 07 Feb 2016 09:08:16 -0800
changeset 283404 1cfe34ea394c66d7fa2c6dc366b05ab00e919113
parent 283403 dcea3556c181336a12e35d2055626f7e6b7b2f24
child 283412 a0d0344ed47a65f5c36802b61b25c0520cec421f
child 283413 857f110128f756387c3a07c933e81127217d5bdb
push id29980
push userphilringnalda@gmail.com
push dateSun, 07 Feb 2016 23:30:48 +0000
treeherdermozilla-central@1cfe34ea394c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill
bugs1246293
milestone47.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 1246293 - Fix a typo in DefineSelfHostedProperty; r=till
js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -3057,17 +3057,17 @@ DefineSelfHostedProperty(JSContext* cx, 
 
         RootedValue setterValue(cx);
         if (!GlobalObject::getSelfHostedFunction(cx, cx->global(), setterNameName, name, 0,
                                                  &setterValue))
         {
             return false;
         }
         MOZ_ASSERT(setterValue.isObject() && setterValue.toObject().is<JSFunction>());
-        setterFunc = &getterValue.toObject().as<JSFunction>();
+        setterFunc = &setterValue.toObject().as<JSFunction>();
     }
     JSNative setterOp = JS_DATA_TO_FUNC_PTR(JSNative, setterFunc.get());
 
     return DefinePropertyById(cx, obj, id, JS::UndefinedHandleValue,
                               NativeOpWrapper(getterOp), NativeOpWrapper(setterOp),
                               attrs, flags);
 }