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

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

Issue 1310463005: - Ensure that HandleScope is initialized with a thread. (Remove (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 3 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/mirrors_api_impl.cc ('k') | runtime/vm/object.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) 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const Error& error = Error::Handle(isolate, Precompiler::CompileAll()); 85 const Error& error = Error::Handle(isolate, Precompiler::CompileAll());
86 if (error.IsNull()) { 86 if (error.IsNull()) {
87 *result = Api::Success(); 87 *result = Api::Success();
88 } else { 88 } else {
89 *result = Api::NewHandle(isolate, error.raw()); 89 *result = Api::NewHandle(isolate, error.raw());
90 } 90 }
91 } 91 }
92 92
93 93
94 DART_EXPORT Dart_Handle Dart_CompileAll() { 94 DART_EXPORT Dart_Handle Dart_CompileAll() {
95 Isolate* isolate = Isolate::Current(); 95 DARTSCOPE(Thread::Current());
96 DARTSCOPE(isolate); 96 Dart_Handle result = Api::CheckAndFinalizePendingClasses(I);
97 Dart_Handle result = Api::CheckAndFinalizePendingClasses(isolate);
98 if (::Dart_IsError(result)) { 97 if (::Dart_IsError(result)) {
99 return result; 98 return result;
100 } 99 }
101 CHECK_CALLBACK_STATE(isolate); 100 CHECK_CALLBACK_STATE(I);
102 CompileAll(isolate, &result); 101 CompileAll(I, &result);
103 return result; 102 return result;
104 } 103 }
105 104
106 105
107 DART_EXPORT Dart_Handle Dart_Precompile() { 106 DART_EXPORT Dart_Handle Dart_Precompile() {
108 Isolate* isolate = Isolate::Current(); 107 DARTSCOPE(Thread::Current());
109 DARTSCOPE(isolate); 108 Dart_Handle result = Api::CheckAndFinalizePendingClasses(I);
110 Dart_Handle result = Api::CheckAndFinalizePendingClasses(isolate);
111 if (::Dart_IsError(result)) { 109 if (::Dart_IsError(result)) {
112 return result; 110 return result;
113 } 111 }
114 CHECK_CALLBACK_STATE(isolate); 112 CHECK_CALLBACK_STATE(I);
115 Precompile(isolate, &result); 113 Precompile(I, &result);
116 return result; 114 return result;
117 } 115 }
118 116
119 } // namespace dart 117 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/mirrors_api_impl.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698