bug 580128 - Initialize vp before calling property op in JSProxyHandler::get. r=mrbkap
authorPeter Van der Beken <peterv@propagandism.org>
Sun, 10 Oct 2010 15:46:34 -0700
changeset 55682 276bcbeb0ab2c4bc114a3453f1051256c18d03ae
parent 55681 f19f569f01a5d82d4883ac26aa6b8e99591e031f
child 55683 1916a5ca667a604b418e87c227cb4425a60b981d
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs580128
milestone2.0b8pre
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 580128 - Initialize vp before calling property op in JSProxyHandler::get. r=mrbkap
js/src/jsproxy.cpp
--- a/js/src/jsproxy.cpp
+++ b/js/src/jsproxy.cpp
@@ -127,16 +127,18 @@ JSProxyHandler::get(JSContext *cx, JSObj
         return true;
     }
     if (desc.attrs & JSPROP_GETTER) {
         return ExternalGetOrSet(cx, proxy, id, CastAsObjectJsval(desc.getter),
                                 JSACC_READ, 0, NULL, vp);
     }
     if (!(desc.attrs & JSPROP_SHARED))
         *vp = desc.value;
+    else
+        vp->setUndefined();
     if (desc.attrs & JSPROP_SHORTID)
         id = INT_TO_JSID(desc.shortid);
     return CallJSPropertyOp(cx, desc.getter, proxy, id, vp);
 }
 
 bool
 JSProxyHandler::set(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, Value *vp)
 {