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

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

Issue 2803543006: Added synchronous socket implementation to dart:io. (Closed)
Patch Set: Addressed first round of comments Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 * Copyright (c) 2012, 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 RUNTIME_INCLUDE_DART_API_H_ 7 #ifndef RUNTIME_INCLUDE_DART_API_H_
8 #define RUNTIME_INCLUDE_DART_API_H_ 8 #define RUNTIME_INCLUDE_DART_API_H_
9 9
10 /** \mainpage Dart Embedding API Reference 10 /** \mainpage Dart Embedding API Reference
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 * 380 *
381 * \param An error handle (See Dart_IsError) 381 * \param An error handle (See Dart_IsError)
382 * 382 *
383 * \return On success, this function does not return. On failure, an 383 * \return On success, this function does not return. On failure, an
384 * error handle is returned. 384 * error handle is returned.
385 */ 385 */
386 DART_EXPORT Dart_Handle Dart_PropagateError(Dart_Handle handle); 386 DART_EXPORT Dart_Handle Dart_PropagateError(Dart_Handle handle);
387 /* TODO(turnidge): Should this really return an error handle? */ 387 /* TODO(turnidge): Should this really return an error handle? */
388 /* Consider just terminating. */ 388 /* Consider just terminating. */
389 389
390 /**
391 * Propagates error if 'handle' is an error handle.
392 *
393 * Provided for convenience.
394 */
395 #define DART_CHECK_VALID_AND_PROPAGATE(handle) \
396 { \
397 if (Dart_IsError((handle))) { \
398 Dart_PropagateError(handle); \
zra 2017/04/10 21:39:43 Dart_PropagateError is actually a little bit dange
bkonyi 2017/04/11 01:30:51 Ah okay, good to know. Removed.
399 } \
400 }
401
390 /* Internal routine used for reporting error handles. */ 402 /* Internal routine used for reporting error handles. */
391 DART_EXPORT void _Dart_ReportErrorHandle(const char* file, 403 DART_EXPORT void _Dart_ReportErrorHandle(const char* file,
392 int line, 404 int line,
393 const char* handle_string, 405 const char* handle_string,
394 const char* error); 406 const char* error);
395 407
396 /* TODO(turnidge): Move DART_CHECK_VALID to some sort of dart_utils 408 /* TODO(turnidge): Move DART_CHECK_VALID to some sort of dart_utils
397 * header instead of this header. */ 409 * header instead of this header. */
398 /** 410 /**
399 * Aborts the process if 'handle' is an error handle. 411 * Aborts the process if 'handle' is an error handle.
(...skipping 2929 matching lines...) Expand 10 before | Expand all | Expand 10 after
3329 */ 3341 */
3330 DART_EXPORT bool Dart_IsPrecompiledRuntime(); 3342 DART_EXPORT bool Dart_IsPrecompiledRuntime();
3331 3343
3332 3344
3333 /** 3345 /**
3334 * Print a native stack trace. Used for crash handling. 3346 * Print a native stack trace. Used for crash handling.
3335 */ 3347 */
3336 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); 3348 DART_EXPORT void Dart_DumpNativeStackTrace(void* context);
3337 3349
3338 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 3350 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698