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

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

Issue 1389353004: Remove isolate argument from handle allocation: Part II (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: c Created 5 years, 2 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/json_stream.cc ('k') | runtime/vm/native_api_impl.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/message.h" 5 #include "vm/message.h"
6 6
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/json_stream.h" 8 #include "vm/json_stream.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/port.h" 10 #include "vm/port.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 ASSERT(current != NULL); 174 ASSERT(current != NULL);
175 if (current->Id() == id) { 175 if (current->Id() == id) {
176 return current; 176 return current;
177 } 177 }
178 } 178 }
179 return NULL; 179 return NULL;
180 } 180 }
181 181
182 182
183 void MessageQueue::PrintJSON(JSONStream* stream) { 183 void MessageQueue::PrintJSON(JSONStream* stream) {
184 Isolate* isolate = Isolate::Current();
185 JSONArray messages(stream); 184 JSONArray messages(stream);
186 185
187 Object& msg_handler = Object::Handle(isolate); 186 Object& msg_handler = Object::Handle();
188 187
189 MessageQueue::Iterator it(this); 188 MessageQueue::Iterator it(this);
190 intptr_t depth = 0; 189 intptr_t depth = 0;
191 while (it.HasNext()) { 190 while (it.HasNext()) {
192 Message* current = it.Next(); 191 Message* current = it.Next();
193 JSONObject message(&messages); 192 JSONObject message(&messages);
194 message.AddProperty("type", "Message"); 193 message.AddProperty("type", "Message");
195 message.AddPropertyF("name", "Isolate Message (%" Px ")", current->Id()); 194 message.AddPropertyF("name", "Isolate Message (%" Px ")", current->Id());
196 message.AddPropertyF("messageObjectId", "messages/%" Px "", 195 message.AddPropertyF("messageObjectId", "messages/%" Px "",
197 current->Id()); 196 current->Id());
(...skipping 17 matching lines...) Expand all
215 const Script& script = Script::Handle(function.script()); 214 const Script& script = Script::Handle(function.script());
216 if (!script.IsNull()) { 215 if (!script.IsNull()) {
217 message.AddLocation(script, function.token_pos(), 216 message.AddLocation(script, function.token_pos(),
218 function.end_token_pos()); 217 function.end_token_pos());
219 } 218 }
220 } 219 }
221 } 220 }
222 } 221 }
223 222
224 } // namespace dart 223 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/native_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698