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

Unified Diff: sky/engine/bindings/core/v8/ScriptController.cpp

Issue 690483002: Don't crash when importing a module that doesn't export (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | sky/tests/modules/import-without-export.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/core/v8/ScriptController.cpp
diff --git a/sky/engine/bindings/core/v8/ScriptController.cpp b/sky/engine/bindings/core/v8/ScriptController.cpp
index e257975a347a1d1f97825fcb19af9bca6dcab051..ab0bb10a21bb47c3b2192644bfa519e2d2f6cae8 100644
--- a/sky/engine/bindings/core/v8/ScriptController.cpp
+++ b/sky/engine/bindings/core/v8/ScriptController.cpp
@@ -353,9 +353,11 @@ void ScriptController::executeModuleScript(Document& document, const String& sou
String name = link->as();
if (!name.isEmpty()) {
module.formalDependenciesAndSource.append(v8String(m_isolate, name));
- v8::Handle<v8::Value> actual = v8::Undefined(m_isolate);
+ v8::Handle<v8::Value> actual;
if (child->document())
actual = child->document()->exports().v8Value();
+ if (actual.IsEmpty())
+ actual = v8::Undefined(m_isolate);
module.resolvedDependencies.append(actual);
}
}
« no previous file with comments | « no previous file | sky/tests/modules/import-without-export.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698