Remove always-true --harmony-global runtime flag

It shipped in Chrome 71.

Bug: v8:5537
Change-Id: Ia78c58dc0af941ec87c05c933419f7e93d2b26f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1675951
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62374}
This commit is contained in:
Mathias Bynens 2019-06-26 10:53:17 +02:00 committed by Commit Bot
parent 0edbb7a372
commit eb0dd1da71
6 changed files with 7 additions and 19 deletions

View File

@ -240,7 +240,6 @@ DEFINE_IMPLICATION(harmony_import_meta, harmony_dynamic_import)
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
V(harmony_import_meta, "harmony import.meta property") \
V(harmony_dynamic_import, "harmony dynamic import") \
V(harmony_global, "harmony global") \
V(harmony_numeric_separator, "harmony numeric separator between digits") \
V(harmony_promise_all_settled, "harmony Promise.allSettled")

View File

@ -2696,6 +2696,13 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Handle<EmbedderDataArray> embedder_data = factory->NewEmbedderDataArray(0);
native_context()->set_embedder_data(*embedder_data);
{ // -- g l o b a l T h i s
Handle<JSGlobalProxy> global_proxy(native_context()->global_proxy(),
isolate_);
JSObject::AddProperty(isolate_, global, factory->globalThis_string(),
global_proxy, DONT_ENUM);
}
{ // -- J S O N
Handle<JSObject> json_object =
factory->NewJSObject(isolate_->object_function(), AllocationType::kOld);
@ -4252,17 +4259,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_intl_numberformat_unified)
#undef EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE
void Genesis::InitializeGlobal_harmony_global() {
if (!FLAG_harmony_global) return;
Factory* factory = isolate()->factory();
Handle<JSGlobalObject> global(native_context()->global_object(), isolate());
Handle<JSGlobalProxy> global_proxy(native_context()->global_proxy(),
isolate());
JSObject::AddProperty(isolate_, global, factory->globalThis_string(),
global_proxy, DONT_ENUM);
}
void Genesis::InitializeGlobal_harmony_sharedarraybuffer() {
if (!FLAG_harmony_sharedarraybuffer) return;

View File

@ -2,7 +2,5 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-global
assertTrue(delete globalThis);
assertEquals(this.globalThis, undefined);

View File

@ -2,7 +2,5 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-global
globalThis = '[[Writable]]';
assertEquals(globalThis, '[[Writable]]');

View File

@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-global
assertEquals(globalThis, this);
assertEquals(this.globalThis, this);
assertEquals(globalThis.globalThis, this);

View File

@ -53,7 +53,6 @@ FEATURE_FLAGS = {
'Intl.DateTimeFormat-quarter': '--harmony-intl-dateformat-quarter',
'Intl.DateTimeFormat-fractionalSecondDigits': '--harmony-intl-dateformat-fractional-second-digits',
'Symbol.prototype.description': '--harmony-symbol-description',
'globalThis': '--harmony-global',
'export-star-as-namespace-from-module': '--harmony-namespace-exports',
'BigInt': '--harmony-intl-bigint',
'Promise.allSettled': '--harmony-promise-all-settled',