Commit d946a27e authored by neis's avatar neis Committed by Commit bot

[modules] Make @@toStringTag on namespace objects non-configurable.

See https://github.com/tc39/ecma262/pull/747.

R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2603193002
Cr-Commit-Position: refs/heads/master@{#42057}
parent da70d7aa
......@@ -2553,7 +2553,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
{ // Install @@toStringTag.
PropertyAttributes attribs =
static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY);
static_cast<PropertyAttributes>(DONT_DELETE | DONT_ENUM | READ_ONLY);
Descriptor d = Descriptor::DataConstant(
factory->to_string_tag_symbol(),
factory->NewStringFromAsciiChecked("Module"), attribs);
......
......@@ -46,10 +46,10 @@ assertSame(foo, foo.foo_again);
assertTrue(Reflect.has(foo, Symbol.toStringTag));
assertEquals("string", typeof Reflect.get(foo, Symbol.toStringTag));
assertEquals(
{value: "Module", configurable: true, writable: false, enumerable: false},
{value: "Module", configurable: false, writable: false, enumerable: false},
Reflect.getOwnPropertyDescriptor(foo, Symbol.toStringTag));
// TODO(neis): Clarify spec w.r.t. other symbols.
// TODO(neis): Spec currently says the next one should return true.
assertFalse(Reflect.deleteProperty(foo, Symbol.toStringTag));
// Nonexistant properties.
let nonexistant = ["gaga", 123, Symbol('')];
......
......@@ -419,6 +419,13 @@
'language/module-code/namespace/internals/own-property-keys-binding-types': [SKIP],
'language/module-code/namespace/internals/own-property-keys-sort': [SKIP],
# Symbol.toString on namespace objects was made non-configurable, tests need
# to be updated.
'language/module-code/namespace/Symbol.toStringTag': [SKIP],
# Possible spec bug, see comment in https://github.com/tc39/ecma262/pull/747.
'language/module-code/namespace/internals/delete-non-exported': [SKIP],
######################## NEEDS INVESTIGATION ###########################
# These test failures are specific to the intl402 suite and need investigation
......
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