Reviewers: Dmitry Lomov (chromium),
Description:
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
Please review this at https://codereview.chromium.org/379843002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+2, -2 lines):
M src/serialize.cc
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index
ca7adcbaa1a0910f371b4918b10949ba79cd7c91..0a3e6a47cb99f77ce09bb795df0f00b4557fccb5
100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -561,8 +561,8 @@ uint32_t ExternalReferenceEncoder::Encode(Address key)
const {
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.