From c16405e82edd3e77d37a7f7f93026444fb1e60a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Z=C3=BCnd?= Date: Wed, 11 Jan 2023 11:04:09 +0100 Subject: [PATCH] [cleanup] Remove experimental flag for [[Scopes]] removal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After we received feedback about some legitmate use-cases of the internal [[Scopes]] property, we decided to not go ahead with its removal. This CL removes the corresponding experimental flag. R=kimanh@chromium.org Bug: chromium:1365858 Change-Id: I6744889b4e2e960695838648e2f4902cbdb75890 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4154416 Auto-Submit: Simon Zünd Commit-Queue: Simon Zünd Commit-Queue: Kim-Anh Tran Reviewed-by: Kim-Anh Tran Cr-Commit-Position: refs/heads/main@{#85214} --- src/debug/debug-interface.cc | 4 ---- src/debug/debug-interface.h | 2 -- src/flags/flag-definitions.h | 3 --- src/inspector/v8-debugger.cc | 4 ---- test/inspector/debugger/suspended-generator-scopes.js | 2 -- test/inspector/regress/regress-crbug-1246896.js | 2 -- test/inspector/runtime/function-scopes.js | 2 -- test/inspector/runtime/internal-properties.js | 2 -- 8 files changed, 21 deletions(-) diff --git a/src/debug/debug-interface.cc b/src/debug/debug-interface.cc index 9b9c702556..a8132afc27 100644 --- a/src/debug/debug-interface.cc +++ b/src/debug/debug-interface.cc @@ -1389,10 +1389,6 @@ MaybeLocal GetMessageFromPromise(Local p) { i::Handle::cast(maybeMessage)); } -bool isExperimentalRemoveInternalScopesPropertyEnabled() { - return i::v8_flags.experimental_remove_internal_scopes_property; -} - void RecordAsyncStackTaggingCreateTaskCall(v8::Isolate* v8_isolate) { i::Isolate* isolate = reinterpret_cast(v8_isolate); isolate->CountUsage(v8::Isolate::kAsyncStackTaggingCreateTaskCall); diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h index c38459fe87..c0f9f34f34 100644 --- a/src/debug/debug-interface.h +++ b/src/debug/debug-interface.h @@ -679,8 +679,6 @@ AccessorPair* AccessorPair::Cast(v8::Value* value) { MaybeLocal GetMessageFromPromise(Local promise); -bool isExperimentalRemoveInternalScopesPropertyEnabled(); - void RecordAsyncStackTaggingCreateTaskCall(v8::Isolate* isolate); void NotifyDebuggerPausedEventSent(v8::Isolate* isolate); diff --git a/src/flags/flag-definitions.h b/src/flags/flag-definitions.h index 5062432374..6f12fae811 100644 --- a/src/flags/flag-definitions.h +++ b/src/flags/flag-definitions.h @@ -1755,9 +1755,6 @@ DEFINE_NEG_IMPLICATION(fuzzing, hard_abort) DEFINE_BOOL(experimental_value_unavailable, false, "enable experimental in scopes") -DEFINE_BOOL(experimental_remove_internal_scopes_property, false, - "don't report the artificial [[Scopes]] property for functions") - // disassembler DEFINE_BOOL(log_colour, ENABLE_LOG_COLOUR, "When logging, try to use coloured output.") diff --git a/src/inspector/v8-debugger.cc b/src/inspector/v8-debugger.cc index 04b6abc696..bfc63232f6 100644 --- a/src/inspector/v8-debugger.cc +++ b/src/inspector/v8-debugger.cc @@ -862,10 +862,6 @@ v8::MaybeLocal V8Debugger::internalProperties( createDataProperty(context, properties, properties->Length(), entries); } - if (v8::debug::isExperimentalRemoveInternalScopesPropertyEnabled()) { - return properties; - } - if (value->IsGeneratorObject()) { v8::Local scopes; if (generatorScopes(context, value).ToLocal(&scopes)) { diff --git a/test/inspector/debugger/suspended-generator-scopes.js b/test/inspector/debugger/suspended-generator-scopes.js index 4ed4796583..55a1fd57ca 100644 --- a/test/inspector/debugger/suspended-generator-scopes.js +++ b/test/inspector/debugger/suspended-generator-scopes.js @@ -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: --no-experimental-remove-internal-scopes-property - let {session, contextGroup, Protocol} = InspectorTest.start('Tests that suspended generators produce scopes'); contextGroup.addScript(` diff --git a/test/inspector/regress/regress-crbug-1246896.js b/test/inspector/regress/regress-crbug-1246896.js index 822a194ce1..6c70d44362 100644 --- a/test/inspector/regress/regress-crbug-1246896.js +++ b/test/inspector/regress/regress-crbug-1246896.js @@ -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: --no-experimental-remove-internal-scopes-property - const {Protocol} = InspectorTest.start('Don\'t crash when getting the properties of a native function'); (async () => { diff --git a/test/inspector/runtime/function-scopes.js b/test/inspector/runtime/function-scopes.js index c382ccda47..bda069bd9a 100644 --- a/test/inspector/runtime/function-scopes.js +++ b/test/inspector/runtime/function-scopes.js @@ -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: --no-experimental-remove-internal-scopes-property - let {session, contextGroup, Protocol} = InspectorTest.start('Checks [[Scopes]] for functions'); contextGroup.addScript(` diff --git a/test/inspector/runtime/internal-properties.js b/test/inspector/runtime/internal-properties.js index 3e3ce4a197..b4b0bc47fb 100644 --- a/test/inspector/runtime/internal-properties.js +++ b/test/inspector/runtime/internal-properties.js @@ -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: --no-experimental-remove-internal-scopes-property - let {session, contextGroup, Protocol} = InspectorTest.start('Checks internal properties in Runtime.getProperties output'); contextGroup.addScript(`