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

Unified Diff: runtime/lib/developer.cc

Issue 2146713004: More changes to use #ifndef PRODUCT ... #endif explicitly instead of relying on compiler magic. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/developer.cc
diff --git a/runtime/lib/developer.cc b/runtime/lib/developer.cc
index a2811ee3f39afcffc77430dc8ff78c296dc45e57..57a1a4c295abbd3ed4f96fc7ae94f1fb249c9869 100644
--- a/runtime/lib/developer.cc
+++ b/runtime/lib/developer.cc
@@ -34,14 +34,19 @@ DEFINE_NATIVE_ENTRY(Developer_debugger, 2) {
DEFINE_NATIVE_ENTRY(Developer_inspect, 1) {
GET_NATIVE_ARGUMENT(Instance, inspectee, arguments->NativeArgAt(0));
+#ifndef PRODUCT
if (FLAG_support_service) {
Service::SendInspectEvent(isolate, inspectee);
}
+#endif // !PRODUCT
return inspectee.raw();
}
DEFINE_NATIVE_ENTRY(Developer_log, 8) {
+#if defined(PRODUCT)
+ return Object::null();
+#else
if (!FLAG_support_service) {
return Object::null();
}
@@ -63,10 +68,14 @@ DEFINE_NATIVE_ENTRY(Developer_log, 8) {
error,
stack_trace);
return Object::null();
+#endif // PRODUCT
}
DEFINE_NATIVE_ENTRY(Developer_postEvent, 2) {
+#if defined(PRODUCT)
+ return Object::null();
+#else
if (!FLAG_support_service) {
return Object::null();
}
@@ -74,19 +83,27 @@ DEFINE_NATIVE_ENTRY(Developer_postEvent, 2) {
GET_NON_NULL_NATIVE_ARGUMENT(String, event_data, arguments->NativeArgAt(1));
Service::SendExtensionEvent(isolate, event_kind, event_data);
return Object::null();
+#endif // PRODUCT
}
DEFINE_NATIVE_ENTRY(Developer_lookupExtension, 1) {
+#if defined(PRODUCT)
+ return Object::null();
+#else
if (!FLAG_support_service) {
return Object::null();
}
GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0));
return isolate->LookupServiceExtensionHandler(name);
+#endif // PRODUCT
}
DEFINE_NATIVE_ENTRY(Developer_registerExtension, 2) {
+#if defined(PRODUCT)
+ return Object::null();
+#else
if (!FLAG_support_service) {
return Object::null();
}
@@ -100,6 +117,7 @@ DEFINE_NATIVE_ENTRY(Developer_registerExtension, 2) {
isolate->RegisterServiceExtensionHandler(name, handler);
}
return Object::null();
+#endif // PRODUCT
}
} // namespace dart
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698