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

Side by Side Diff: runtime/vm/object_store.cc

Issue 2002253005: Speculatively revert "Make the object store visible in Observatory." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object_store.h" 5 #include "vm/object_store.h"
6 6
7 #include "vm/exceptions.h" 7 #include "vm/exceptions.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 115
116 void ObjectStore::Init(Isolate* isolate) { 116 void ObjectStore::Init(Isolate* isolate) {
117 ASSERT(isolate->object_store() == NULL); 117 ASSERT(isolate->object_store() == NULL);
118 ObjectStore* store = new ObjectStore(); 118 ObjectStore* store = new ObjectStore();
119 isolate->set_object_store(store); 119 isolate->set_object_store(store);
120 } 120 }
121 121
122 122
123 void ObjectStore::PrintToJSONObject(JSONObject* jsobj, bool ref) {
124 if (!FLAG_support_service) {
125 return;
126 }
127 jsobj->AddProperty("type", (ref ? "@_ObjectStore" : "_ObjectStore"));
128 jsobj->AddFixedServiceId("object_store");
129
130 {
131 JSONObject fields(jsobj, "fields");
132 Object& value = Object::Handle();
133 #define PRINT_OBJECT_STORE_FIELD(type, name) \
134 value = name; \
135 fields.AddProperty(#name, value);
136 OBJECT_STORE_FIELD_LIST(PRINT_OBJECT_STORE_FIELD);
137 #undef PRINT_OBJECT_STORE_FIELD
138 }
139 }
140
141
142 RawError* ObjectStore::PreallocateObjects() { 123 RawError* ObjectStore::PreallocateObjects() {
143 Thread* thread = Thread::Current(); 124 Thread* thread = Thread::Current();
144 Isolate* isolate = thread->isolate(); 125 Isolate* isolate = thread->isolate();
145 Zone* zone = thread->zone(); 126 Zone* zone = thread->zone();
146 ASSERT(isolate != NULL && isolate->object_store() == this); 127 ASSERT(isolate != NULL && isolate->object_store() == this);
147 if (this->stack_overflow() != Instance::null()) { 128 if (this->stack_overflow() != Instance::null()) {
148 ASSERT(this->out_of_memory() != Instance::null()); 129 ASSERT(this->out_of_memory() != Instance::null());
149 ASSERT(this->preallocated_stack_trace() != Stacktrace::null()); 130 ASSERT(this->preallocated_stack_trace() != Stacktrace::null());
150 return Error::null(); 131 return Error::null();
151 } 132 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 ASSERT(!cls.IsNull()); 207 ASSERT(!cls.IsNull());
227 set_stream_iterator_class(cls); 208 set_stream_iterator_class(cls);
228 209
229 const Library& internal_lib = Library::Handle(internal_library()); 210 const Library& internal_lib = Library::Handle(internal_library());
230 cls = internal_lib.LookupClass(Symbols::Symbol()); 211 cls = internal_lib.LookupClass(Symbols::Symbol());
231 set_symbol_class(cls); 212 set_symbol_class(cls);
232 #endif 213 #endif
233 } 214 }
234 215
235 } // namespace dart 216 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698