Commit f7d41ebe authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[modules] Produce more debug output for --trace-module-status.

R=adamk@chromium.org

Bug: v8:1569
Change-Id: I3931418ef17a309789cbc5281a4542a20a1db94e
Reviewed-on: https://chromium-review.googlesource.com/596029Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47047}
parent 5ff10f20
......@@ -19857,6 +19857,17 @@ MaybeHandle<Cell> Module::ResolveExportUsingStarExports(
bool Module::Instantiate(Handle<Module> module, v8::Local<v8::Context> context,
v8::Module::ResolveCallback callback) {
#ifdef DEBUG
if (FLAG_trace_module_status) {
OFStream os(stdout);
os << "Instantiating module ";
module->script()->GetNameOrSourceURL()->Print(os);
#ifndef OBJECT_PRINT
os << "\n";
#endif // OBJECT_PRINT
}
#endif // DEBUG
Isolate* isolate = module->GetIsolate();
if (module->status() == kErrored) {
isolate->Throw(module->GetException());
......@@ -20072,6 +20083,17 @@ bool Module::FinishInstantiate(Handle<Module> module,
}
MaybeHandle<Object> Module::Evaluate(Handle<Module> module) {
#ifdef DEBUG
if (FLAG_trace_module_status) {
OFStream os(stdout);
os << "Evaluating module ";
module->script()->GetNameOrSourceURL()->Print(os);
#ifndef OBJECT_PRINT
os << "\n";
#endif // OBJECT_PRINT
}
#endif // DEBUG
Isolate* isolate = module->GetIsolate();
if (module->status() == kErrored) {
isolate->Throw(module->GetException());
......
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