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
R=dslomov@chromium.org

Review URL: https://codereview.chromium.org/379843002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5f2bd30b
......@@ -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>";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment