Bug 630340 - Fix undefined value in compartment assertion (r=Waldo)
authorBill McCloskey <wmccloskey@mozilla.com>
Mon, 31 Jan 2011 13:54:28 -0800
changeset 61707 d3e265afe157b64a720ee2dfe66b84d9009005bd
parent 61706 02d1466338929adbfb4365c47402f8a617ad0bf0
child 61708 8eb17a6a39aa001ca3f44e56889db1cdc1bb3956
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersWaldo
bugs630340
milestone2.0b11pre
Bug 630340 - Fix undefined value in compartment assertion (r=Waldo)
js/src/jsobj.cpp
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -2326,17 +2326,17 @@ DefinePropertyOnObject(JSContext *cx, JS
      * side effects during setting, we must make them aware that they have been
      * "assigned"; deleting the property before redefining it does the trick.
      * See bug 539766, where we ran into problems when we redefined
      * arguments.length without making the property aware that its value had
      * been changed (which would have happened if we had deleted it before
      * redefining it or we had invoked its setter to change its value).
      */
     if (callDelProperty) {
-        Value dummy;
+        Value dummy = UndefinedValue();
         if (!CallJSPropertyOp(cx, obj2->getClass()->delProperty, obj2, desc.id, &dummy))
             return false;
     }
 
     return js_DefineProperty(cx, obj, desc.id, &v, getter, setter, attrs);
 }
 
 static JSBool