Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Unified Diff: runtime/vm/object.cc

Issue 154733002: Fix disassembler crash with profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/disassembler_x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index a9e3d2625512b63288ec584677569d6f95fc6070..a2da1b60fdf348a524bb3c86793af73836b7d121 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -10203,8 +10203,11 @@ void Code::PrintToJSONStream(JSONStream* stream, bool ref) const {
jsobj.AddProperty("is_alive", is_alive());
jsobj.AddProperty("function", Object::Handle(function()));
JSONArray jsarr(&jsobj, "disassembly");
- DisassembleToJSONStream formatter(jsarr);
- Disassemble(&formatter);
+ if (is_alive()) {
+ // Only disassemble alive code objects.
+ DisassembleToJSONStream formatter(jsarr);
+ Disassemble(&formatter);
+ }
}
« no previous file with comments | « runtime/vm/disassembler_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698