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

Side by Side Diff: runtime/bin/dartutils.h

Issue 1665433002: Adds SecurityContext.setTrustedCertificatesBytes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 | « CHANGELOG.md ('k') | runtime/bin/io_natives.cc » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #ifndef BIN_DARTUTILS_H_ 5 #ifndef BIN_DARTUTILS_H_
6 #define BIN_DARTUTILS_H_ 6 #define BIN_DARTUTILS_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "include/dart_native_api.h" 9 #include "include/dart_native_api.h"
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 /* Handles error handles returned from Dart API functions. If a value 23 /* Handles error handles returned from Dart API functions. If a value
24 * is an error, uses Dart_PropagateError to throw it to the enclosing 24 * is an error, uses Dart_PropagateError to throw it to the enclosing
25 * Dart activation. Otherwise, returns the original handle. 25 * Dart activation. Otherwise, returns the original handle.
26 * 26 *
27 * This function can be used to wrap most API functions, but API 27 * This function can be used to wrap most API functions, but API
28 * functions can also be nested without this error check, since all 28 * functions can also be nested without this error check, since all
29 * API functions return any error handles passed in as arguments, unchanged. 29 * API functions return any error handles passed in as arguments, unchanged.
30 */ 30 */
31 static inline Dart_Handle ThrowIfError(Dart_Handle handle) { 31 static inline Dart_Handle ThrowIfError(Dart_Handle handle) {
32 if (Dart_IsError(handle)) Dart_PropagateError(handle); 32 if (Dart_IsError(handle)) {
33 Dart_PropagateError(handle);
34 }
33 return handle; 35 return handle;
34 } 36 }
35 37
36 class CommandLineOptions { 38 class CommandLineOptions {
37 public: 39 public:
38 explicit CommandLineOptions(int max_count) 40 explicit CommandLineOptions(int max_count)
39 : count_(0), max_count_(max_count), arguments_(NULL) { 41 : count_(0), max_count_(max_count), arguments_(NULL) {
40 static const int kWordSize = sizeof(intptr_t); 42 static const int kWordSize = sizeof(intptr_t);
41 arguments_ = reinterpret_cast<const char **>(malloc(max_count * kWordSize)); 43 arguments_ = reinterpret_cast<const char **>(malloc(max_count * kWordSize));
42 if (arguments_ == NULL) { 44 if (arguments_ == NULL) {
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 584
583 ~ScopedBlockingCall() { 585 ~ScopedBlockingCall() {
584 Dart_ThreadEnableProfiling(); 586 Dart_ThreadEnableProfiling();
585 } 587 }
586 }; 588 };
587 589
588 } // namespace bin 590 } // namespace bin
589 } // namespace dart 591 } // namespace dart
590 592
591 #endif // BIN_DARTUTILS_H_ 593 #endif // BIN_DARTUTILS_H_
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | runtime/bin/io_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698