Commit 756f6690 authored by adamk's avatar adamk Committed by Commit bot

[modules] Initialize requested_modules before recursing in Module::Instantiate

Also fix recursive call to avoid going back through the API.

R=neis@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2366063002
Cr-Commit-Position: refs/heads/master@{#39696}
parent f296dad9
......@@ -1976,10 +1976,11 @@ static bool InstantiateModule(Local<Module> v8_module,
isolate->ThrowIllegalOperation();
return false;
}
if (!requested_module->Instantiate(v8_context, callback, callback_data)) {
module->requested_modules()->set(i, *Utils::OpenHandle(*requested_module));
if (!InstantiateModule(requested_module, v8_context, callback,
callback_data)) {
return false;
}
module->requested_modules()->set(i, *Utils::OpenHandle(*requested_module));
}
// Resolve imports.
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// MODULE
export {a as b} from "modules-skip-circular-valid.js";
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
export let a = {key: 'value'};
import {b} from "modules-circular-valid.js";
assertSame(a, b);
assertEquals('value', a.key);
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