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

Unified Diff: gin/modules/module_registry.cc

Issue 69843003: Implement Mojo message codec in JavaScript (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Aaron's comments Created 7 years, 1 month 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 | gin/modules/module_runner_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/modules/module_registry.cc
diff --git a/gin/modules/module_registry.cc b/gin/modules/module_registry.cc
index 20ee287ea008147f7ebbb886e213d7602ae413e5..dc0a1ec3c259ede453dc3495131f21b82f0f69d0 100644
--- a/gin/modules/module_registry.cc
+++ b/gin/modules/module_registry.cc
@@ -96,6 +96,8 @@ std::string GetImplicitModuleName(const std::string& explicit_name) {
return explicit_name;
std::string implicit_name;
Handle<StackTrace> trace = StackTrace::CurrentStackTrace(1);
+ if (!trace->GetFrameCount())
+ return implicit_name;
Handle<String> script_name = trace->GetFrame(0)->GetScriptName();
if (!script_name.IsEmpty())
ConvertFromV8(script_name, &implicit_name);
« no previous file with comments | « no previous file | gin/modules/module_runner_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698