Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index e21de0b19644e39a5fc775ef5080a7f656603d23..1a3dc4e73ad46fd21d7a55d46d55319359a87b7a 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1,4 +1,4 @@ |
-// Copyright 2006-2009 the V8 project authors. All rights reserved. |
+// Copyright 2010 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -5227,6 +5227,13 @@ Object* Oddball::Initialize(const char* to_string, Object* to_number) { |
} |
+String* SharedFunctionInfo::DebugName() { |
+ Object* n = name(); |
+ if (!n->IsString() || String::cast(n)->length() == 0) return inferred_name(); |
+ return String::cast(n); |
+} |
+ |
+ |
bool SharedFunctionInfo::HasSourceCode() { |
return !script()->IsUndefined() && |
!reinterpret_cast<Script*>(script())->source()->IsUndefined(); |