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

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

Issue 2981173002: Remove the debugger_ field from Isolate in a PRODUCT build (Closed)
Patch Set: Remove flag support_debugger Created 3 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/lib/async.cc ('k') | runtime/lib/stacktrace.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) 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/message.h" 12 #include "vm/message.h"
13 #include "vm/native_entry.h" 13 #include "vm/native_entry.h"
14 #include "vm/object.h" 14 #include "vm/object.h"
15 #include "vm/object_store.h" 15 #include "vm/object_store.h"
16 #include "vm/service.h" 16 #include "vm/service.h"
17 #include "vm/service_isolate.h" 17 #include "vm/service_isolate.h"
18 18
19 namespace dart { 19 namespace dart {
20 20
21 // Native implementations for the dart:developer library. 21 // Native implementations for the dart:developer library.
22 DEFINE_NATIVE_ENTRY(Developer_debugger, 2) { 22 DEFINE_NATIVE_ENTRY(Developer_debugger, 2) {
23 GET_NON_NULL_NATIVE_ARGUMENT(Bool, when, arguments->NativeArgAt(0)); 23 GET_NON_NULL_NATIVE_ARGUMENT(Bool, when, arguments->NativeArgAt(0));
24 #if !defined(PRODUCT)
24 GET_NATIVE_ARGUMENT(String, msg, arguments->NativeArgAt(1)); 25 GET_NATIVE_ARGUMENT(String, msg, arguments->NativeArgAt(1));
25 Debugger* debugger = isolate->debugger(); 26 Debugger* debugger = isolate->debugger();
26 if (!FLAG_support_debugger || !debugger) { 27 if (!debugger) {
27 return when.raw(); 28 return when.raw();
28 } 29 }
29 if (when.value()) { 30 if (when.value()) {
30 debugger->PauseDeveloper(msg); 31 debugger->PauseDeveloper(msg);
31 } 32 }
33 #endif
32 return when.raw(); 34 return when.raw();
33 } 35 }
34 36
35 DEFINE_NATIVE_ENTRY(Developer_inspect, 1) { 37 DEFINE_NATIVE_ENTRY(Developer_inspect, 1) {
36 GET_NATIVE_ARGUMENT(Instance, inspectee, arguments->NativeArgAt(0)); 38 GET_NATIVE_ARGUMENT(Instance, inspectee, arguments->NativeArgAt(0));
37 #ifndef PRODUCT 39 #ifndef PRODUCT
38 if (FLAG_support_service) { 40 if (FLAG_support_service) {
39 Service::SendInspectEvent(isolate, inspectee); 41 Service::SendInspectEvent(isolate, inspectee);
40 } 42 }
41 #endif // !PRODUCT 43 #endif // !PRODUCT
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 #if defined(PRODUCT) 169 #if defined(PRODUCT)
168 return Object::null(); 170 return Object::null();
169 #else 171 #else
170 GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0)); 172 GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
171 int64_t port_id = port.Id(); 173 int64_t port_id = port.Id();
172 return String::NewFormatted(ISOLATE_SERVICE_ID_FORMAT_STRING, port_id); 174 return String::NewFormatted(ISOLATE_SERVICE_ID_FORMAT_STRING, port_id);
173 #endif 175 #endif
174 } 176 }
175 177
176 } // namespace dart 178 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/async.cc ('k') | runtime/lib/stacktrace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698