Commit d049239c authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[asm.js] Fix [[Configurable]] attribute of exports.

R=clemensh@chromium.org
TEST=mjsunit/asm/asm-validation
BUG=chromium:715068,v8:5877

Change-Id: I26e0b84c94e5f036336f39e9d764f0588ff3ec0d
Reviewed-on: https://chromium-review.googlesource.com/486882Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44861}
parent c59f78f6
......@@ -1865,6 +1865,7 @@ class InstantiationHelper {
PropertyDescriptor desc;
desc.set_writable(module_->is_asm_js());
desc.set_enumerable(true);
desc.set_configurable(module_->is_asm_js());
// Count up export indexes.
int export_index = 0;
......
......@@ -474,6 +474,11 @@ function assertValidAsm(func) {
assertFalse(o instanceof WebAssembly.Instance);
assertTrue(o instanceof Object);
assertTrue(o.__proto__ === Object.prototype);
var p = Object.getOwnPropertyDescriptor(o, "x")
assertTrue(p.writable);
assertTrue(p.enumerable);
assertTrue(p.configurable);
assertTrue(typeof o.x === 'function');
o.x = 5;
assertTrue(typeof o.x === 'number');
assertTrue(o.__single_function__ === undefined);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment