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

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

Issue 1965823002: Initial isolate reload support (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
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"
11 #include "vm/flags.h" 11 #include "vm/flags.h"
12 #include "vm/native_entry.h" 12 #include "vm/native_entry.h"
13 #include "vm/object.h" 13 #include "vm/object.h"
14 #include "vm/object_store.h" 14 #include "vm/object_store.h"
15 #include "vm/service.h" 15 #include "vm/service.h"
16 #include "vm/service_isolate.h" 16 #include "vm/service_isolate.h"
17 17
18 namespace dart { 18 namespace dart {
19 19
20 // Native implementations for the dart:developer library. 20 // Native implementations for the dart:developer library.
21
22 DEFINE_NATIVE_ENTRY(Developer_debugger, 2) { 21 DEFINE_NATIVE_ENTRY(Developer_debugger, 2) {
23 GET_NON_NULL_NATIVE_ARGUMENT(Bool, when, arguments->NativeArgAt(0)); 22 GET_NON_NULL_NATIVE_ARGUMENT(Bool, when, arguments->NativeArgAt(0));
24 GET_NATIVE_ARGUMENT(String, msg, arguments->NativeArgAt(1)); 23 GET_NATIVE_ARGUMENT(String, msg, arguments->NativeArgAt(1));
25 Debugger* debugger = isolate->debugger(); 24 Debugger* debugger = isolate->debugger();
26 if (!FLAG_support_debugger || !debugger) { 25 if (!FLAG_support_debugger || !debugger) {
27 return when.raw(); 26 return when.raw();
28 } 27 }
29 if (when.value()) { 28 if (when.value()) {
30 debugger->PauseDeveloper(msg); 29 debugger->PauseDeveloper(msg);
31 } 30 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // service isolate. This can happen, for example, because the 96 // service isolate. This can happen, for example, because the
98 // service isolate uses dart:io. If we decide that we want to start 97 // service isolate uses dart:io. If we decide that we want to start
99 // supporting this in the future, it will take some work. 98 // supporting this in the future, it will take some work.
100 if (!ServiceIsolate::IsServiceIsolateDescendant(isolate)) { 99 if (!ServiceIsolate::IsServiceIsolateDescendant(isolate)) {
101 isolate->RegisterServiceExtensionHandler(name, handler); 100 isolate->RegisterServiceExtensionHandler(name, handler);
102 } 101 }
103 return Object::null(); 102 return Object::null();
104 } 103 }
105 104
106 } // namespace dart 105 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698