Bug 923390 - Fix assertion failure in getpda() shell function r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Mon, 07 Oct 2013 13:40:44 +0100
changeset 150383 4c6899cf5799b37e433291c131f2bde0ff194e90
parent 150382 f82ddd5f63a3a9c3a6054167eeafbb16c3771816
child 150384 d6e9ef4f7dc01c549259d54caee117f6c8c88383
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewerssfink
bugs923390
milestone27.0a1
Bug 923390 - Fix assertion failure in getpda() shell function r=sfink
js/src/jit-test/tests/basic/bug923390.js
js/src/shell/js.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug923390.js
@@ -0,0 +1,3 @@
+if (getpda) {
+  getpda();
+}
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -2392,17 +2392,17 @@ static bool
 GetPDA(JSContext *cx, unsigned argc, jsval *vp)
 {
     RootedObject vobj(cx);
     bool ok;
     JSPropertyDescArray pda;
     JSPropertyDesc *pd;
 
     CallArgs args = CallArgsFromVp(argc, vp);
-    if (!JS_ValueToObject(cx, args[0], &vobj))
+    if (!JS_ValueToObject(cx, args.get(0), &vobj))
         return false;
     if (!vobj) {
         args.rval().setUndefined();
         return true;
     }
 
     RootedObject aobj(cx, JS_NewArrayObject(cx, 0, NULL));
     if (!aobj)