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

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

Issue 241253002: VM Service: Include a response id when enumerating scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/service.h" 5 #include "vm/service.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 obj.PrintToJSONStream(js, false); 1245 obj.PrintToJSONStream(js, false);
1246 return true; 1246 return true;
1247 } 1247 }
1248 return HandleInstanceCommands(isolate, obj, js, 2); 1248 return HandleInstanceCommands(isolate, obj, js, 2);
1249 } 1249 }
1250 1250
1251 1251
1252 static bool HandleScriptsEnumerate(Isolate* isolate, JSONStream* js) { 1252 static bool HandleScriptsEnumerate(Isolate* isolate, JSONStream* js) {
1253 JSONObject jsobj(js); 1253 JSONObject jsobj(js);
1254 jsobj.AddProperty("type", "ScriptList"); 1254 jsobj.AddProperty("type", "ScriptList");
1255 jsobj.AddProperty("id", "scripts");
1255 JSONArray members(&jsobj, "members"); 1256 JSONArray members(&jsobj, "members");
1256 const GrowableObjectArray& libs = 1257 const GrowableObjectArray& libs =
1257 GrowableObjectArray::Handle(isolate->object_store()->libraries()); 1258 GrowableObjectArray::Handle(isolate->object_store()->libraries());
1258 int num_libs = libs.Length(); 1259 int num_libs = libs.Length();
1259 Library &lib = Library::Handle(); 1260 Library &lib = Library::Handle();
1260 Script& script = Script::Handle(); 1261 Script& script = Script::Handle();
1261 for (intptr_t i = 0; i < num_libs; i++) { 1262 for (intptr_t i = 0; i < num_libs; i++) {
1262 lib ^= libs.At(i); 1263 lib ^= libs.At(i);
1263 ASSERT(!lib.IsNull()); 1264 ASSERT(!lib.IsNull());
1264 ASSERT(Smi::IsValid(lib.index())); 1265 ASSERT(Smi::IsValid(lib.index()));
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 while (current != NULL) { 1900 while (current != NULL) {
1900 if (strcmp(name, current->name()) == 0) { 1901 if (strcmp(name, current->name()) == 0) {
1901 return current; 1902 return current;
1902 } 1903 }
1903 current = current->next(); 1904 current = current->next();
1904 } 1905 }
1905 return NULL; 1906 return NULL;
1906 } 1907 }
1907 1908
1908 } // namespace dart 1909 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698