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

Side by Side Diff: runtime/vm/native_api_impl.cc

Issue 1473403003: Move ApiLocalScope out of class ApiState into class Thread so that the API local handles and zone e… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-code-review Created 5 years 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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #include "include/dart_native_api.h" 5 #include "include/dart_native_api.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/dart_api_message.h" 9 #include "vm/dart_api_message.h"
10 #include "vm/dart_api_state.h" 10 #include "vm/dart_api_state.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 88
89 // --- Verification tools --- 89 // --- Verification tools ---
90 90
91 static void CompileAll(Thread* thread, Dart_Handle* result) { 91 static void CompileAll(Thread* thread, Dart_Handle* result) {
92 ASSERT(thread != NULL); 92 ASSERT(thread != NULL);
93 const Error& error = Error::Handle(thread->zone(), Library::CompileAll()); 93 const Error& error = Error::Handle(thread->zone(), Library::CompileAll());
94 if (error.IsNull()) { 94 if (error.IsNull()) {
95 *result = Api::Success(); 95 *result = Api::Success();
96 } else { 96 } else {
97 *result = Api::NewHandle(thread->isolate(), error.raw()); 97 *result = Api::NewHandle(thread, error.raw());
98 } 98 }
99 } 99 }
100 100
101 101
102 DART_EXPORT Dart_Handle Dart_CompileAll() { 102 DART_EXPORT Dart_Handle Dart_CompileAll() {
103 DARTSCOPE(Thread::Current()); 103 DARTSCOPE(Thread::Current());
104 Dart_Handle result = Api::CheckAndFinalizePendingClasses(I); 104 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T);
105 if (::Dart_IsError(result)) { 105 if (::Dart_IsError(result)) {
106 return result; 106 return result;
107 } 107 }
108 CHECK_CALLBACK_STATE(T); 108 CHECK_CALLBACK_STATE(T);
109 CompileAll(T, &result); 109 CompileAll(T, &result);
110 return result; 110 return result;
111 } 111 }
112 112
113 } // namespace dart 113 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698