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

Unified Diff: runtime/vm/dart_api_impl.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 | « runtime/lib/developer.cc ('k') | runtime/vm/flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 215f35db8d615014b21c030fff46505d67b6e424..34a8d33f97af77b721ac7514d7c0b81924c5279b 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5807,6 +5807,71 @@ DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort() {
}
+DART_EXPORT int64_t Dart_TimelineGetMicros() {
+ return OS::GetCurrentMonotonicMicros();
+}
+
+
+#if defined(PRODUCT)
+DART_EXPORT void Dart_RegisterIsolateServiceRequestCallback(
+ const char* name,
+ Dart_ServiceRequestCallback callback,
+ void* user_data) {
+ return;
+}
+
+
+DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
+ const char* name,
+ Dart_ServiceRequestCallback callback,
+ void* user_data) {
+ return;
+}
+
+
+DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks(
+ Dart_ServiceStreamListenCallback listen_callback,
+ Dart_ServiceStreamCancelCallback cancel_callback) {
+ return Api::Success();
+}
+
+
+DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id,
+ const char* event_kind,
+ const uint8_t* bytes,
+ intptr_t bytes_length) {
+ return Api::Success();
+}
+
+
+DART_EXPORT void Dart_GlobalTimelineSetRecordedStreams(int64_t stream_mask) {
+ return;
+}
+
+
+DART_EXPORT void Dart_SetEmbedderTimelineCallbacks(
+ Dart_EmbedderTimelineStartRecording start_recording,
+ Dart_EmbedderTimelineStopRecording stop_recording) {
+ return;
+}
+
+
+DART_EXPORT bool Dart_GlobalTimelineGetTrace(Dart_StreamConsumer consumer,
+ void* user_data) {
+ return false;
+}
+
+
+DART_EXPORT void Dart_TimelineEvent(const char* label,
+ int64_t timestamp0,
+ int64_t timestamp1_or_async_id,
+ Dart_Timeline_Event_Type type,
+ intptr_t argument_count,
+ const char** argument_names,
+ const char** argument_values) {
+ return;
+}
+#else // defined(PRODUCT)
DART_EXPORT void Dart_RegisterIsolateServiceRequestCallback(
const char* name,
Dart_ServiceRequestCallback callback,
@@ -5866,48 +5931,6 @@ DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks(
}
-DART_EXPORT int64_t Dart_TimelineGetMicros() {
- return OS::GetCurrentMonotonicMicros();
-}
-
-
-#if defined(PRODUCT)
-DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id,
- const char* event_kind,
- const uint8_t* bytes,
- intptr_t bytes_length) {
- return Api::Success();
-}
-
-
-DART_EXPORT void Dart_GlobalTimelineSetRecordedStreams(int64_t stream_mask) {
- return;
-}
-
-
-DART_EXPORT void Dart_SetEmbedderTimelineCallbacks(
- Dart_EmbedderTimelineStartRecording start_recording,
- Dart_EmbedderTimelineStopRecording stop_recording) {
- return;
-}
-
-
-DART_EXPORT bool Dart_GlobalTimelineGetTrace(Dart_StreamConsumer consumer,
- void* user_data) {
- return false;
-}
-
-
-DART_EXPORT void Dart_TimelineEvent(const char* label,
- int64_t timestamp0,
- int64_t timestamp1_or_async_id,
- Dart_Timeline_Event_Type type,
- intptr_t argument_count,
- const char** argument_names,
- const char** argument_values) {
- return;
-}
-#else // defined(PRODUCT)
DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id,
const char* event_kind,
const uint8_t* bytes,
« no previous file with comments | « runtime/lib/developer.cc ('k') | runtime/vm/flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698