From e11a64fda63c2bfb26f46c2dd008bebfb11fe5f7 Mon Sep 17 00:00:00 2001 From: Blake Kaplan Date: Thu, 10 Jun 2010 14:11:09 -0700 Subject: [PATCH] Bug 564208 - Don't run getters while enumerating. r=jst --HG-- extra : rebase_source : 64df2342d0946b232543ae935cdff6162a05358c --- dom/base/nsDOMClassInfo.cpp | 2 +- dom/tests/mochitest/bugs/Makefile.in | 1 + dom/tests/mochitest/bugs/test_bug564208.html | 33 ++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 dom/tests/mochitest/bugs/test_bug564208.html diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index efeff1ccce25..0240cb951bc2 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -8021,7 +8021,7 @@ nsGenericArraySH::Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, jsval len_val; JSAutoRequest ar(cx); - JSBool ok = ::JS_GetProperty(cx, obj, "length", &len_val); + JSBool ok = JS_LookupProperty(cx, obj, "length", &len_val); if (ok && JSVAL_IS_INT(len_val)) { PRInt32 length = JSVAL_TO_INT(len_val); diff --git a/dom/tests/mochitest/bugs/Makefile.in b/dom/tests/mochitest/bugs/Makefile.in index 5e5de84a30f7..d4ee13a0f2e8 100644 --- a/dom/tests/mochitest/bugs/Makefile.in +++ b/dom/tests/mochitest/bugs/Makefile.in @@ -116,6 +116,7 @@ _TEST_FILES = \ test_bug563487.html \ test_bug545314.html \ test_bug548828.html \ + test_bug564208.html \ test_DOMWindowCreated_chromeonly.html \ $(NULL) diff --git a/dom/tests/mochitest/bugs/test_bug564208.html b/dom/tests/mochitest/bugs/test_bug564208.html new file mode 100644 index 000000000000..cde59efe43a9 --- /dev/null +++ b/dom/tests/mochitest/bugs/test_bug564208.html @@ -0,0 +1,33 @@ + + + + + Test for Bug 564208 + + + + + +Mozilla Bug 564208 +

+ +
+
+
+ +