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

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

Issue 1140263005: Revert "Hide Isolate pointer from embedder" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/custom_isolate_test.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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 static const Instance& UnwrapInstanceHandle( 142 static const Instance& UnwrapInstanceHandle(
143 const ReusableObjectHandleScope& reused, Dart_Handle object); 143 const ReusableObjectHandleScope& reused, Dart_Handle object);
144 144
145 // Returns an Error handle if isolate is in an inconsistent state 145 // Returns an Error handle if isolate is in an inconsistent state
146 // or there was an error while finalizing classes. 146 // or there was an error while finalizing classes.
147 // Returns a Success handle when no error condition exists. 147 // Returns a Success handle when no error condition exists.
148 static Dart_Handle CheckAndFinalizePendingClasses(Isolate *isolate); 148 static Dart_Handle CheckAndFinalizePendingClasses(Isolate *isolate);
149 149
150 // Casts the internal Isolate* type to the external Dart_Isolate type. 150 // Casts the internal Isolate* type to the external Dart_Isolate type.
151 static Dart_Isolate CastIsolate(Isolate* isolate); 151 static Dart_Isolate CastIsolate(Isolate* isolate);
152 // Casts the external Dart_Isolate type to the internal Isolate* type.
153 static Isolate* CastIsolate(Dart_Isolate);
154 152
155 // Gets the handle used to designate successful return. 153 // Gets the handle used to designate successful return.
156 static Dart_Handle Success() { return Api::True(); } 154 static Dart_Handle Success() { return Api::True(); }
157 155
158 // Sets up the acquired error object after initializing an Isolate. This 156 // Sets up the acquired error object after initializing an Isolate. This
159 // object is pre-created because we will not be able to allocate this 157 // object is pre-created because we will not be able to allocate this
160 // object when the error actually occurs. When the error occurs there will 158 // object when the error actually occurs. When the error occurs there will
161 // be outstanding acquires to internal data pointers making it unsafe to 159 // be outstanding acquires to internal data pointers making it unsafe to
162 // allocate objects on the dart heap. 160 // allocate objects on the dart heap.
163 static void SetupAcquiredError(Isolate* isolate); 161 static void SetupAcquiredError(Isolate* isolate);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 if (isolate->no_callback_scope_depth() != 0) { \ 314 if (isolate->no_callback_scope_depth() != 0) { \
317 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ 315 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \
318 } \ 316 } \
319 317
320 #define ASSERT_CALLBACK_STATE(isolate) \ 318 #define ASSERT_CALLBACK_STATE(isolate) \
321 ASSERT(isolate->no_callback_scope_depth() == 0) 319 ASSERT(isolate->no_callback_scope_depth() == 0)
322 320
323 } // namespace dart. 321 } // namespace dart.
324 322
325 #endif // VM_DART_API_IMPL_H_ 323 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « runtime/vm/custom_isolate_test.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698