Revision: 22302
Author:   [email protected]
Date:     Wed Jul  9 12:12:21 2014 UTC
Log:      Fixed printing of external references.

Previously we relied on undefined behavior (printf("%s", NULL)), now
we explicitly emit "<unknown>" when we hit an external reference with
an unknown name.

BUG=392068
LOG=y
[email protected]

Review URL: https://codereview.chromium.org/379843002
http://code.google.com/p/v8/source/detail?r=22302

Modified:
 /branches/bleeding_edge/src/serialize.cc

=======================================
--- /branches/bleeding_edge/src/serialize.cc    Wed Jul  9 11:08:26 2014 UTC
+++ /branches/bleeding_edge/src/serialize.cc    Wed Jul  9 12:12:21 2014 UTC
@@ -561,8 +561,8 @@

 const char* ExternalReferenceEncoder::NameOfAddress(Address key) const {
   int index = IndexOf(key);
-  return index >= 0 ?
-      ExternalReferenceTable::instance(isolate_)->name(index) : NULL;
+ return index >= 0 ? ExternalReferenceTable::instance(isolate_)->name(index)
+                    : "<unknown>";
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to