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

Side by Side Diff: runtime/lib/developer.cc

Issue 2542003002: Add getIsolateID to Service class in dart:developer (Closed)
Patch Set: fix test Created 4 years 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 | « no previous file | runtime/lib/developer.dart » ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/debugger.h" 9 #include "vm/debugger.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 GET_NON_NULL_NATIVE_ARGUMENT(Bool, enabled, arguments->NativeArgAt(1)); 165 GET_NON_NULL_NATIVE_ARGUMENT(Bool, enabled, arguments->NativeArgAt(1));
166 if (!ServiceIsolate::IsRunning()) { 166 if (!ServiceIsolate::IsRunning()) {
167 SendNull(port); 167 SendNull(port);
168 } else { 168 } else {
169 ServiceIsolate::ControlWebServer(port, enabled.value()); 169 ServiceIsolate::ControlWebServer(port, enabled.value());
170 } 170 }
171 return Object::null(); 171 return Object::null();
172 #endif 172 #endif
173 } 173 }
174 174
175
176 DEFINE_NATIVE_ENTRY(Developer_getIsolateIDFromSendPort, 1) {
177 #if defined(PRODUCT)
178 return Object::null();
179 #else
180 GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
181 int64_t port_id = port.Id();
182 return String::NewFormatted(ISOLATE_SERVICE_ID_FORMAT_STRING, port_id);
183 #endif
184 }
185
186
175 } // namespace dart 187 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/developer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698