Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index c8966114bfef377a012dcc688fe40f7cbbd9c481..2d5655002067c71f7da121c49cf11338363d34e6 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -279,10 +279,13 @@ void CompilationInfo::LogDeoptCallPosition(int pc_offset, int inlining_id) { |
base::SmartArrayPointer<char> CompilationInfo::GetDebugName() const { |
- if (parse_info()) { |
+ if (parse_info() && parse_info()->literal()) { |
AllowHandleDereference allow_deref; |
return parse_info()->literal()->debug_name()->ToCString(); |
} |
+ if (parse_info() && !parse_info()->shared_info().is_null()) { |
+ return parse_info()->shared_info()->DebugName()->ToCString(); |
+ } |
const char* str = debug_name_ ? debug_name_ : "unknown"; |
size_t len = strlen(str) + 1; |
base::SmartArrayPointer<char> name(new char[len]); |