Commit ddee82c0 authored by Simon Zünd's avatar Simon Zünd Committed by V8 LUCI CQ

Reland "[inspector] Enable async stack tagging API by default"

This is a reland of commit 4bab7a8e

The reland changes the way how we install the async stack tagging API
on the console object. Instead of using `v8::Object::Set`, we use
`createDataProperty` which is sufficient. With `Set`, arbitrary
JS could run via accessors, which might not be allowed depending on
when the API is installed.

Original change's description:
> [inspector] Enable async stack tagging API by default
>
> R=bmeurer@chromium.org
>
> Fixed: chromium:1334585
> Change-Id: Id79a60bac1731ea9c60654ff15c8e23f958c6e57
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3799431
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82161}

Change-Id: I9b8c8e643705f8f043acac5af14307f2dbdb5a68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3809692Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82190}
parent 42c602fb
......@@ -1670,7 +1670,7 @@ DEFINE_BOOL(
"print debug messages for side-effect-free debug-evaluate for testing")
DEFINE_BOOL(hard_abort, true, "abort by crashing")
DEFINE_BOOL(experimental_async_stack_tagging_api, false,
DEFINE_BOOL(experimental_async_stack_tagging_api, true,
"enable experimental async stacks tagging API")
DEFINE_BOOL(experimental_value_unavailable, false,
"enable experimental <value unavailable> in scopes")
......
......@@ -823,13 +823,8 @@ void V8Console::installAsyncStackTaggingAPI(v8::Local<v8::Context> context,
v8::MicrotasksScope microtasksScope(isolate,
v8::MicrotasksScope::kDoNotRunMicrotasks);
console
->Set(context, toV8StringInternalized(isolate, "createTask"),
v8::Function::New(context, &V8Console::call<&V8Console::createTask>,
data, 0, v8::ConstructorBehavior::kThrow,
v8::SideEffectType::kHasSideEffect)
.ToLocalChecked())
.Check();
createBoundFunctionProperty(context, console, data, "createTask",
&V8Console::call<&V8Console::createTask>);
}
v8::Local<v8::Object> V8Console::createCommandLineAPI(
......
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