Commit 1596e5e8 authored by Jochen Eisinger's avatar Jochen Eisinger Committed by Commit Bot

Update Module::Instantiate to Maybe<bool> API

R=neis@chromium.org,gsathya@chromium.org

Change-Id: Ia547dff4600ccb4618e791528a784771f05cb038
Reviewed-on: https://chromium-review.googlesource.com/518104
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#475872}
parent ebf06025
...@@ -68,9 +68,11 @@ ScriptValue ScriptModule::Instantiate(ScriptState* script_state) { ...@@ -68,9 +68,11 @@ ScriptValue ScriptModule::Instantiate(ScriptState* script_state) {
DCHECK(!IsNull()); DCHECK(!IsNull());
v8::Local<v8::Context> context = script_state->GetContext(); v8::Local<v8::Context> context = script_state->GetContext();
bool success = NewLocal(script_state->GetIsolate()) bool success;
->Instantiate(context, &ResolveModuleCallback); if (!NewLocal(script_state->GetIsolate())
if (!success) { ->InstantiateModule(context, &ResolveModuleCallback)
.To(&success) ||
!success) {
DCHECK(try_catch.HasCaught()); DCHECK(try_catch.HasCaught());
return ScriptValue(script_state, try_catch.Exception()); return ScriptValue(script_state, try_catch.Exception());
} }
......
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