summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/readonly.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/readonly.js')
-rw-r--r--deps/v8/test/mjsunit/readonly.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/deps/v8/test/mjsunit/readonly.js b/deps/v8/test/mjsunit/readonly.js
index 4d06b7cf43..050e256275 100644
--- a/deps/v8/test/mjsunit/readonly.js
+++ b/deps/v8/test/mjsunit/readonly.js
@@ -25,7 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --harmony-proxies --es5_readonly
+// Flags: --allow-natives-syntax --es5_readonly
+// Flags: --harmony-proxies
// Different ways to create an object.
@@ -120,8 +121,12 @@ function ReadonlyByProto(o, name) {
o.__proto__ = p;
}
+// Allow Proxy to be undefined, so test can run in non-Harmony mode as well.
+var global = this;
+
function ReadonlyByProxy(o, name) {
- var p = Proxy.create({
+ if (!global.Proxy) return ReadonlyByFreeze(o, name); // Dummy.
+ var p = global.Proxy.create({
getPropertyDescriptor: function() {
return {value: -46, writable: false, configurable: true};
}