fix: let Node.js perform microtask checkpoint in the main process (#24131)
* fix: let Node.js perform microtask checkpoint in the main process * fix: don't specify v8::MicrotasksScope for explicit policy * fix: remove checkpoint from some call-sites We already perform checkpoint at the end of a task, either through MicrotaskRunner or through NodeBindings. There isn't a need to add them again when calling into JS except when dealing with promises. * fix: remove checkpoint from some call-sites We already perform checkpoint at the end of a task, either through MicrotaskRunner or through NodeBindings. There isn't a need to add them again when calling into JS except when dealing with promises. * fix incorrect specs * default constructor arguments are considered for explicit mark * add regression spec
This commit is contained in:
parent
59f9d75324
commit
7cc780d077
18 changed files with 145 additions and 39 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/event_emitter_caller.h"
|
||||
#include "shell/common/gin_helper/locker.h"
|
||||
#include "shell/common/gin_helper/microtasks_scope.h"
|
||||
#include "shell/common/mac/main_application_bundle.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
|
||||
|
@ -475,8 +476,7 @@ void NodeBindings::UvRunOnce() {
|
|||
v8::Context::Scope context_scope(env->context());
|
||||
|
||||
// Perform microtask checkpoint after running JavaScript.
|
||||
v8::MicrotasksScope script_scope(env->isolate(),
|
||||
v8::MicrotasksScope::kRunMicrotasks);
|
||||
gin_helper::MicrotasksScope microtasks_scope(env->isolate());
|
||||
|
||||
if (browser_env_ != BrowserEnvironment::BROWSER)
|
||||
TRACE_EVENT_BEGIN0("devtools.timeline", "FunctionCall");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue