From af5d4d993fc37da9f7bd8bbb1d7c793502799ebd Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Fri, 3 Oct 2014 10:05:50 +0200 Subject: [PATCH] Bug 1065185 - Explicitly expose indexed properties in COW array test. r=bz --- js/xpconnect/tests/chrome/test_bug760109.xul | 6 +++++- js/xpconnect/tests/unit/test_bug853709.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/js/xpconnect/tests/chrome/test_bug760109.xul b/js/xpconnect/tests/chrome/test_bug760109.xul index d8045d464524..b71f094056c7 100644 --- a/js/xpconnect/tests/chrome/test_bug760109.xul +++ b/js/xpconnect/tests/chrome/test_bug760109.xul @@ -80,7 +80,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=760109 const Cu = Components.utils; var sb = new Cu.Sandbox('http://www.example.org'); sb.chromeArray = ['a', 'b', 'z']; - sb.chromeArray.__exposedProps__ = {}; + sb.chromeArray.__exposedProps__ = { length: 'rw' }; + for (var i = 0; i < 10; ++i) { + sb.chromeArray.__exposedProps__[i] = 'rw'; + } + sb.chromeObject = new SomeConstructor(); sb.ok = ok; sb.is = is; diff --git a/js/xpconnect/tests/unit/test_bug853709.js b/js/xpconnect/tests/unit/test_bug853709.js index 502c656425ea..6e80759ae546 100644 --- a/js/xpconnect/tests/unit/test_bug853709.js +++ b/js/xpconnect/tests/unit/test_bug853709.js @@ -7,6 +7,7 @@ function setupChromeSandbox() { get: function() { return _b; }, set: function(val) { _b = val; } }); this.chromeArr = [4, 2, 1]; + this.chromeArr["__exposedProps__"] = { "1": "rw" }; } function checkDefineThrows(sb, obj, prop, desc) {