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

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

Issue 1377733007: Error quickly if the embedder tries to load after Dart_Precompile. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | runtime/vm/dart_api_impl.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 VM_DART_API_IMPL_H_ 5 #ifndef VM_DART_API_IMPL_H_
6 #define VM_DART_API_IMPL_H_ 6 #define VM_DART_API_IMPL_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/native_arguments.h" 9 #include "vm/native_arguments.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 // End a no Dart API call backs Scope. 310 // End a no Dart API call backs Scope.
311 #define END_NO_CALLBACK_SCOPE(isolate) \ 311 #define END_NO_CALLBACK_SCOPE(isolate) \
312 isolate->DecrementNoCallbackScopeDepth() 312 isolate->DecrementNoCallbackScopeDepth()
313 313
314 #define CHECK_CALLBACK_STATE(isolate) \ 314 #define CHECK_CALLBACK_STATE(isolate) \
315 if (isolate->no_callback_scope_depth() != 0) { \ 315 if (isolate->no_callback_scope_depth() != 0) { \
316 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ 316 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \
317 } \ 317 } \
318 318
319 #define CHECK_COMPILATION_ALLOWED(isolate) \
320 if (!isolate->compilation_allowed()) { \
321 return Api::NewError("%s: Cannot load after Dart_Precompile", \
322 CURRENT_FUNC); \
323 } \
324
319 #define ASSERT_CALLBACK_STATE(isolate) \ 325 #define ASSERT_CALLBACK_STATE(isolate) \
320 ASSERT(isolate->no_callback_scope_depth() == 0) 326 ASSERT(isolate->no_callback_scope_depth() == 0)
321 327
322 } // namespace dart. 328 } // namespace dart.
323 329
324 #endif // VM_DART_API_IMPL_H_ 330 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698