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

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

Issue 682913002: Don't crash when importing a 404 (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/engine/core/html/imports/HTMLImportLoader.cpp » ('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 38f1942d6e3cb463f692b192789cde3bcdcf677a..e257975a347a1d1f97825fcb19af9bca6dcab051 100644
--- a/sky/engine/bindings/core/v8/ScriptController.cpp
+++ b/sky/engine/bindings/core/v8/ScriptController.cpp
@@ -353,7 +353,10 @@ void ScriptController::executeModuleScript(Document& document, const String& sou
String name = link->as();
if (!name.isEmpty()) {
module.formalDependenciesAndSource.append(v8String(m_isolate, name));
- module.resolvedDependencies.append(child->document() ? child->document()->exports().v8Value() : v8Undefined());
+ v8::Handle<v8::Value> actual = v8::Undefined(m_isolate);
+ if (child->document())
+ actual = child->document()->exports().v8Value();
+ module.resolvedDependencies.append(actual);
}
}
}
« no previous file with comments | « no previous file | sky/engine/core/html/imports/HTMLImportLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698