Commit 29a7186d authored by yurys@chromium.org's avatar yurys@chromium.org

Fix segmentation fault in CodeMap::Print

CodeEntry* is always NULL for SharedFunctionInfo entries in the CodeMap. Take this into account when printing the map.

Drive-by: removed  CodeEntry::shared_id() which is never called.

BUG=None

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1d03493d
......@@ -571,7 +571,12 @@ void CodeMap::MoveCode(Address from, Address to) {
void CodeMap::CodeTreePrinter::Call(
const Address& key, const CodeMap::CodeEntryInfo& value) {
OS::Print("%p %5d %s\n", key, value.size, value.entry->name());
// For shared function entries, 'size' field is used to store their IDs.
if (value.entry == kSharedFunctionCodeEntry) {
OS::Print("%p SharedFunctionInfo %d\n", key, value.size);
} else {
OS::Print("%p %5d %s\n", key, value.size, value.entry->name());
}
}
......
......@@ -107,7 +107,6 @@ class CodeEntry {
INLINE(const char* name() const) { return name_; }
INLINE(const char* resource_name() const) { return resource_name_; }
INLINE(int line_number() const) { return line_number_; }
INLINE(int shared_id() const) { return shared_id_; }
INLINE(void set_shared_id(int shared_id)) { shared_id_ = shared_id; }
INLINE(int security_token_id() const) { return security_token_id_; }
......
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