Commit 5eeea05d authored by Shu-yu Guo's avatar Shu-yu Guo Committed by Commit Bot

Use local instead of global Handles in async module builtins

Bug: v8:9344
Change-Id: I6f0bb4fa81f70c5c2f8744c153d5662c576d23d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2414786
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69967}
parent 4093cf3e
...@@ -11,8 +11,7 @@ namespace internal { ...@@ -11,8 +11,7 @@ namespace internal {
BUILTIN(CallAsyncModuleFulfilled) { BUILTIN(CallAsyncModuleFulfilled) {
HandleScope handle_scope(isolate); HandleScope handle_scope(isolate);
Handle<SourceTextModule> module( Handle<SourceTextModule> module(args.at<SourceTextModule>(0));
isolate->global_handles()->Create(*args.at<SourceTextModule>(0)));
SourceTextModule::AsyncModuleExecutionFulfilled(isolate, module); SourceTextModule::AsyncModuleExecutionFulfilled(isolate, module);
return ReadOnlyRoots(isolate).undefined_value(); return ReadOnlyRoots(isolate).undefined_value();
} }
...@@ -22,8 +21,7 @@ BUILTIN(CallAsyncModuleRejected) { ...@@ -22,8 +21,7 @@ BUILTIN(CallAsyncModuleRejected) {
// Arguments should be a SourceTextModule and an exception object. // Arguments should be a SourceTextModule and an exception object.
DCHECK_EQ(args.length(), 2); DCHECK_EQ(args.length(), 2);
Handle<SourceTextModule> module( Handle<SourceTextModule> module(args.at<SourceTextModule>(0));
isolate->global_handles()->Create(*args.at<SourceTextModule>(0)));
Handle<Object> exception(args.at(1)); Handle<Object> exception(args.at(1));
SourceTextModule::AsyncModuleExecutionRejected(isolate, module, exception); SourceTextModule::AsyncModuleExecutionRejected(isolate, module, exception);
return ReadOnlyRoots(isolate).undefined_value(); return ReadOnlyRoots(isolate).undefined_value();
......
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