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

Unified Diff: runtime/vm/object.cc

Issue 514833003: Add a new Sentinel type for sentinel responses. (They are not Null). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js, fix tests Created 6 years, 4 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/bin/vmservice/observatory/lib/src/elements/observatory_element.dart ('k') | runtime/vm/service.cc » ('j') | 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 43d45935dd1a93a3298f678055c7787ad6fff78a..526e86738d857dc2e58b559a2e2eb2e59dd36d30 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -13597,12 +13597,12 @@ void Instance::PrintJSONImpl(JSONStream* stream, bool ref) const {
// Handle certain special instance values.
if (raw() == Object::sentinel().raw()) {
- jsobj.AddProperty("type", ref ? "@Null" : "Null");
+ jsobj.AddProperty("type", "Sentinel");
jsobj.AddProperty("id", "objects/not-initialized");
jsobj.AddProperty("valueAsString", "<not initialized>");
return;
} else if (raw() == Object::transition_sentinel().raw()) {
- jsobj.AddProperty("type", ref ? "@Null" : "Null");
+ jsobj.AddProperty("type", "Sentinel");
jsobj.AddProperty("id", "objects/being-initialized");
jsobj.AddProperty("valueAsString", "<being initialized>");
return;
@@ -17148,7 +17148,7 @@ void String::PrintJSONImpl(JSONStream* stream, bool ref) const {
// TODO(turnidge): This is a hack. The user could have this
// special string in their program. Fixing this involves updating
// the debugging api a bit.
- jsobj.AddProperty("type", ref ? "@Null" : "Null");
+ jsobj.AddProperty("type", "Sentinel");
jsobj.AddProperty("id", "objects/optimized-out");
jsobj.AddProperty("valueAsString", "<optimized out>");
return;
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/src/elements/observatory_element.dart ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698