Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp

Issue 2798533002: [ES6 modules] ScriptModule::compile() exceptions are handled via isolate's MessageListener (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptModule.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
index e4efbbab966ba95a0ed3823638dd9abcaa49e01e..e31f8543edef4422fc650afabce14bb90ae91034 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
@@ -23,9 +23,14 @@ ScriptModule ScriptModule::compile(v8::Isolate* isolate,
v8::Local<v8::Module> module;
if (!v8Call(V8ScriptRunner::compileModule(isolate, source, fileName), module,
tryCatch)) {
- // TODO(adamk): Signal failure somehow.
- return ScriptModule(isolate, module);
+ // Compilation error is not used in Blink implementaion logic.
+ // Note: Error message is delivered to user (e.g. console) by message
+ // listeners set on v8::Isolate. See V8Initializer::initalizeMainThread().
+ // TODO(nhiroki): Revisit this when supporting modules on worker threads.
+ DCHECK(tryCatch.HasCaught());
+ return ScriptModule();
}
+ DCHECK(!tryCatch.HasCaught());
return ScriptModule(isolate, module);
}
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptModule.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698