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

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

Issue 1401413002: Move no_callback_scope_depth_ and cha_ from isolate -> thread (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Spelling fix 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 | « runtime/vm/compiler.cc ('k') | 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 Thread::EnterIsolate(saved_isolate_); 297 Thread::EnterIsolate(saved_isolate_);
298 } 298 }
299 } 299 }
300 private: 300 private:
301 Isolate* saved_isolate_; 301 Isolate* saved_isolate_;
302 302
303 DISALLOW_COPY_AND_ASSIGN(IsolateSaver); 303 DISALLOW_COPY_AND_ASSIGN(IsolateSaver);
304 }; 304 };
305 305
306 // Start a scope in which no Dart API call backs are allowed. 306 // Start a scope in which no Dart API call backs are allowed.
307 #define START_NO_CALLBACK_SCOPE(isolate) \ 307 #define START_NO_CALLBACK_SCOPE(thread) \
308 isolate->IncrementNoCallbackScopeDepth() 308 thread->IncrementNoCallbackScopeDepth()
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(thread) \
312 isolate->DecrementNoCallbackScopeDepth() 312 thread->DecrementNoCallbackScopeDepth()
313 313
314 #define CHECK_CALLBACK_STATE(isolate) \ 314 #define CHECK_CALLBACK_STATE(thread) \
315 if (isolate->no_callback_scope_depth() != 0) { \ 315 if (thread->no_callback_scope_depth() != 0) { \
316 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ 316 return reinterpret_cast<Dart_Handle>( \
317 Api::AcquiredError(thread->isolate())); \
317 } \ 318 } \
318 319
319 #define CHECK_COMPILATION_ALLOWED(isolate) \ 320 #define CHECK_COMPILATION_ALLOWED(isolate) \
320 if (!isolate->compilation_allowed()) { \ 321 if (!isolate->compilation_allowed()) { \
321 return Api::NewError("%s: Cannot load after Dart_Precompile", \ 322 return Api::NewError("%s: Cannot load after Dart_Precompile", \
322 CURRENT_FUNC); \ 323 CURRENT_FUNC); \
323 } \ 324 } \
324 325
325 #define ASSERT_CALLBACK_STATE(isolate) \ 326 #define ASSERT_CALLBACK_STATE(thread) \
326 ASSERT(isolate->no_callback_scope_depth() == 0) 327 ASSERT(thread->no_callback_scope_depth() == 0)
327 328
328 } // namespace dart. 329 } // namespace dart.
329 330
330 #endif // VM_DART_API_IMPL_H_ 331 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698