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

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

Issue 1166433008: 2nd attempt at adding streamListen/streamCancel to the service protocol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix context objects Created 5 years, 6 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.h ('k') | runtime/vm/service.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 13013 matching lines...) Expand 10 before | Expand all | Expand 10 after
13024 AddCommonObjectProperties(&jsobj, "Context", ref); 13024 AddCommonObjectProperties(&jsobj, "Context", ref);
13025 jsobj.AddServiceId(*this); 13025 jsobj.AddServiceId(*this);
13026 13026
13027 jsobj.AddProperty("length", num_variables()); 13027 jsobj.AddProperty("length", num_variables());
13028 13028
13029 if (ref) { 13029 if (ref) {
13030 return; 13030 return;
13031 } 13031 }
13032 13032
13033 const Context& parent_context = Context::Handle(parent()); 13033 const Context& parent_context = Context::Handle(parent());
13034 jsobj.AddProperty("parent", parent_context); 13034 if (!parent_context.IsNull()) {
13035 jsobj.AddProperty("parent", parent_context);
13036 }
13035 13037
13036 JSONArray jsarr(&jsobj, "variables"); 13038 JSONArray jsarr(&jsobj, "variables");
13037 Object& var = Object::Handle(); 13039 Object& var = Object::Handle();
13038 for (intptr_t index = 0; index < num_variables(); index++) { 13040 for (intptr_t index = 0; index < num_variables(); index++) {
13039 var = At(index); 13041 var = At(index);
13040 JSONObject jselement(&jsarr); 13042 JSONObject jselement(&jsarr);
13041 jselement.AddProperty("value", var); 13043 jselement.AddProperty("value", var);
13042 } 13044 }
13043 } 13045 }
13044 13046
(...skipping 7763 matching lines...) Expand 10 before | Expand all | Expand 10 after
20808 return tag_label.ToCString(); 20810 return tag_label.ToCString();
20809 } 20811 }
20810 20812
20811 20813
20812 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 20814 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
20813 Instance::PrintJSONImpl(stream, ref); 20815 Instance::PrintJSONImpl(stream, ref);
20814 } 20816 }
20815 20817
20816 20818
20817 } // namespace dart 20819 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698