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

Side by Side Diff: runtime/include/dart_native_api.h

Issue 1499853004: Adds a special case for sending an int over a port with the native API. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | runtime/vm/message.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 * for details. All rights reserved. Use of this source code is governed by a 3 * for details. All rights reserved. Use of this source code is governed by a
4 * BSD-style license that can be found in the LICENSE file. 4 * BSD-style license that can be found in the LICENSE file.
5 */ 5 */
6 6
7 #ifndef INCLUDE_DART_NATIVE_API_H_ 7 #ifndef INCLUDE_DART_NATIVE_API_H_
8 #define INCLUDE_DART_NATIVE_API_H_ 8 #define INCLUDE_DART_NATIVE_API_H_
9 9
10 #include "include/dart_api.h" 10 #include "include/dart_api.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 * restored. 95 * restored.
96 * 96 *
97 * \param port_id The destination port. 97 * \param port_id The destination port.
98 * \param message The message to send. 98 * \param message The message to send.
99 * 99 *
100 * \return True if the message was posted. 100 * \return True if the message was posted.
101 */ 101 */
102 DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message); 102 DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message);
103 103
104 /** 104 /**
105 * Posts a message on some port. The message will contain the integer 'message'.
106 *
107 * \param port_id The destination port.
108 * \param message The message to send.
109 *
110 * \return True if the message was posted.
111 */
112 DART_EXPORT bool Dart_PostInteger(Dart_Port port_id, intptr_t message);
113
114 /**
105 * A native message handler. 115 * A native message handler.
106 * 116 *
107 * This handler is associated with a native port by calling 117 * This handler is associated with a native port by calling
108 * Dart_NewNativePort. 118 * Dart_NewNativePort.
109 * 119 *
110 * The message received is decoded into the message structure. The 120 * The message received is decoded into the message structure. The
111 * lifetime of the message data is controlled by the caller. All the 121 * lifetime of the message data is controlled by the caller. All the
112 * data references from the message are allocated by the caller and 122 * data references from the message are allocated by the caller and
113 * will be reclaimed when returning to it. 123 * will be reclaimed when returning to it.
114 */ 124 */
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 164
155 /** 165 /**
156 * Forces all loaded classes and functions to be compiled eagerly in 166 * Forces all loaded classes and functions to be compiled eagerly in
157 * the current isolate.. 167 * the current isolate..
158 * 168 *
159 * TODO(turnidge): Document. 169 * TODO(turnidge): Document.
160 */ 170 */
161 DART_EXPORT Dart_Handle Dart_CompileAll(); 171 DART_EXPORT Dart_Handle Dart_CompileAll();
162 172
163 #endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */ 173 #endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | runtime/vm/message.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698