Commit 9c601fbf authored by Camillo Bruni's avatar Camillo Bruni Committed by V8 LUCI CQ

[api] Replace a few auto's

Change-Id: I4c2347e9b75ef36c37b46d527ad6c4338dc20819
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3162047Reviewed-by: 's avatarPatrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76863}
parent ac95e024
......@@ -2534,7 +2534,7 @@ MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context,
!source->GetResourceOptions().IsModule(), "v8::ScriptCompiler::Compile",
"v8::ScriptCompiler::CompileModule must be used to compile modules");
auto isolate = context->GetIsolate();
auto maybe =
MaybeLocal<UnboundScript> maybe =
CompileUnboundInternal(isolate, source, options, no_cache_reason);
Local<UnboundScript> result;
if (!maybe.ToLocal(&result)) return MaybeLocal<Script>();
......@@ -2551,11 +2551,10 @@ MaybeLocal<Module> ScriptCompiler::CompileModule(
Utils::ApiCheck(source->GetResourceOptions().IsModule(),
"v8::ScriptCompiler::CompileModule",
"Invalid ScriptOrigin: is_module must be true");
auto maybe =
MaybeLocal<UnboundScript> maybe =
CompileUnboundInternal(isolate, source, options, no_cache_reason);
Local<UnboundScript> unbound;
if (!maybe.ToLocal(&unbound)) return MaybeLocal<Module>();
i::Handle<i::SharedFunctionInfo> shared = Utils::OpenHandle(*unbound);
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
return ToApiHandle<Module>(i_isolate->factory()->NewSourceTextModule(shared));
......
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