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

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

Issue 1715123003: - Add DEBUG_ONLY and NOT_IN_PRODUCT macros. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update status files. 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/dart.cc ('k') | runtime/vm/globals.h » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 5699 matching lines...) Expand 10 before | Expand all | Expand 10 after
5710 } 5710 }
5711 Service::SetEmbedderStreamCallbacks(listen_callback, cancel_callback); 5711 Service::SetEmbedderStreamCallbacks(listen_callback, cancel_callback);
5712 return Api::Success(); 5712 return Api::Success();
5713 } 5713 }
5714 5714
5715 5715
5716 DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id, 5716 DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id,
5717 const char* event_kind, 5717 const char* event_kind,
5718 const uint8_t* bytes, 5718 const uint8_t* bytes,
5719 intptr_t bytes_length) { 5719 intptr_t bytes_length) {
5720 #ifdef PRODUCT 5720 #if defined(PRODUCT)
5721 return Api::Success(); 5721 return Api::Success();
5722 #else 5722 #else // defined(PRODUCT)
5723 DARTSCOPE(Thread::Current()); 5723 DARTSCOPE(Thread::Current());
5724 Isolate* I = T->isolate(); 5724 Isolate* I = T->isolate();
5725 if (stream_id == NULL) { 5725 if (stream_id == NULL) {
5726 RETURN_NULL_ERROR(stream_id); 5726 RETURN_NULL_ERROR(stream_id);
5727 } 5727 }
5728 if (event_kind == NULL) { 5728 if (event_kind == NULL) {
5729 RETURN_NULL_ERROR(event_kind); 5729 RETURN_NULL_ERROR(event_kind);
5730 } 5730 }
5731 if (bytes == NULL) { 5731 if (bytes == NULL) {
5732 RETURN_NULL_ERROR(bytes); 5732 RETURN_NULL_ERROR(bytes);
5733 } 5733 }
5734 if (bytes_length < 0) { 5734 if (bytes_length < 0) {
5735 return Api::NewError("%s expects argument 'bytes_length' to be >= 0.", 5735 return Api::NewError("%s expects argument 'bytes_length' to be >= 0.",
5736 CURRENT_FUNC); 5736 CURRENT_FUNC);
5737 } 5737 }
5738 Service::SendEmbedderEvent(I, stream_id, event_kind, 5738 Service::SendEmbedderEvent(I, stream_id, event_kind,
5739 bytes, bytes_length); 5739 bytes, bytes_length);
5740 return Api::Success(); 5740 return Api::Success();
5741 #endif // PRODUCT 5741 #endif // defined(PRODUCT)
5742 } 5742 }
5743 5743
5744 5744
5745 DART_EXPORT int64_t Dart_TimelineGetMicros() { 5745 DART_EXPORT int64_t Dart_TimelineGetMicros() {
5746 return OS::GetCurrentMonotonicMicros(); 5746 return OS::GetCurrentMonotonicMicros();
5747 } 5747 }
5748 5748
5749 5749
5750 DART_EXPORT void Dart_TimelineSetRecordedStreams(int64_t stream_mask) { 5750 DART_EXPORT void Dart_TimelineSetRecordedStreams(int64_t stream_mask) {
5751 if (!FLAG_support_timeline) { 5751 if (!FLAG_support_timeline) {
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
6170 return Api::Success(); 6170 return Api::Success();
6171 } 6171 }
6172 #endif // DART_PRECOMPILER 6172 #endif // DART_PRECOMPILER
6173 6173
6174 6174
6175 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 6175 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
6176 return Dart::IsRunningPrecompiledCode(); 6176 return Dart::IsRunningPrecompiledCode();
6177 } 6177 }
6178 6178
6179 } // namespace dart 6179 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698