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

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

Issue 2153593002: More ifndef PRODUCT. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/isolate.cc ('k') | runtime/vm/object.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 #ifndef PRODUCT
184 if (!FLAG_support_service) { 185 if (!FLAG_support_service) {
185 return; 186 return;
186 } 187 }
187 JSONArray messages(stream); 188 JSONArray messages(stream);
188 189
189 Object& msg_handler = Object::Handle(); 190 Object& msg_handler = Object::Handle();
190 191
191 MessageQueue::Iterator it(this); 192 MessageQueue::Iterator it(this);
192 intptr_t depth = 0; 193 intptr_t depth = 0;
193 while (it.HasNext()) { 194 while (it.HasNext()) {
(...skipping 20 matching lines...) Expand all
214 const Function& function = Function::Cast(msg_handler); 215 const Function& function = Function::Cast(msg_handler);
215 message.AddProperty("handler", function); 216 message.AddProperty("handler", function);
216 217
217 const Script& script = Script::Handle(function.script()); 218 const Script& script = Script::Handle(function.script());
218 if (!script.IsNull()) { 219 if (!script.IsNull()) {
219 message.AddLocation(script, function.token_pos(), 220 message.AddLocation(script, function.token_pos(),
220 function.end_token_pos()); 221 function.end_token_pos());
221 } 222 }
222 } 223 }
223 } 224 }
225 #endif // !PRODUCT
224 } 226 }
225 227
226 } // namespace dart 228 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698