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

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

Issue 1660063002: Remove many features when building product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/debugger.cc ('k') | runtime/vm/debugger_api_impl_test.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) 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 "include/dart_tools_api.h" 5 #include "include/dart_tools_api.h"
6 6
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_api_state.h" 10 #include "vm/dart_api_state.h"
11 #include "vm/debugger.h" 11 #include "vm/debugger.h"
12 #include "vm/isolate.h" 12 #include "vm/isolate.h"
13 #include "vm/object_store.h" 13 #include "vm/object_store.h"
14 #include "vm/symbols.h" 14 #include "vm/symbols.h"
15 15
16 namespace dart { 16 namespace dart {
17 17
18 // Facilitate quick access to the current zone once we have the curren thread. 18 // Facilitate quick access to the current zone once we have the curren thread.
19 #define Z (T->zone()) 19 #define Z (T->zone())
20 20
21 #ifndef PRODUCT
21 22
22 #define UNWRAP_AND_CHECK_PARAM(type, var, param) \ 23 #define UNWRAP_AND_CHECK_PARAM(type, var, param) \
23 type& var = type::Handle(); \ 24 type& var = type::Handle(); \
24 do { \ 25 do { \
25 const Object& tmp = Object::Handle(Api::UnwrapHandle(param)); \ 26 const Object& tmp = Object::Handle(Api::UnwrapHandle(param)); \
26 if (tmp.IsNull()) { \ 27 if (tmp.IsNull()) { \
27 return Api::NewError("%s expects argument '%s' to be non-null.", \ 28 return Api::NewError("%s expects argument '%s' to be non-null.", \
28 CURRENT_FUNC, #param); \ 29 CURRENT_FUNC, #param); \
29 } else if (tmp.IsApiError()) { \ 30 } else if (tmp.IsApiError()) { \
30 return param; \ 31 return param; \
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 Isolate* isolate = PortMap::GetIsolate(isolate_id); 954 Isolate* isolate = PortMap::GetIsolate(isolate_id);
954 return Api::CastIsolate(isolate); 955 return Api::CastIsolate(isolate);
955 } 956 }
956 957
957 958
958 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { 959 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) {
959 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); 960 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate);
960 return isolate->debugger()->GetIsolateId(); 961 return isolate->debugger()->GetIsolateId();
961 } 962 }
962 963
964 #else
965
966 DART_EXPORT void Dart_SetPausedEventHandler(Dart_PausedEventHandler handler) {
967 // NOOP.
968 }
969
970 #endif // !PRODUCT
971
963 } // namespace dart 972 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698