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

Unified Diff: runtime/vm/object.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/native_api_impl.cc ('k') | runtime/vm/object_graph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index eba6959a351cab4c89a568619b753520d433b40e..73a0489b61d054be58e86cfa47ef45647f99f803 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -9027,7 +9027,8 @@ RawInstance* Library::TransitiveLoadError() const {
if (LoadError() != Instance::null()) {
return LoadError();
}
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
ObjectStore* object_store = isolate->object_store();
LibraryLoadErrorSet set(object_store->library_load_error_table());
bool present = false;
@@ -9042,7 +9043,7 @@ RawInstance* Library::TransitiveLoadError() const {
Library& lib = Library::Handle(isolate);
Instance& error = Instance::Handle(isolate);
for (intptr_t i = 0; i < num_imp; i++) {
- HANDLESCOPE(isolate);
+ HANDLESCOPE(thread);
lib = ImportLibraryAt(i);
error = lib.TransitiveLoadError();
if (!error.IsNull()) {
@@ -10312,7 +10313,8 @@ RawLibrary* LibraryPrefix::GetLibrary(int index) const {
RawInstance* LibraryPrefix::LoadError() const {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
ObjectStore* object_store = isolate->object_store();
GrowableObjectArray& libs =
GrowableObjectArray::Handle(isolate, object_store->libraries());
@@ -10324,7 +10326,7 @@ RawInstance* LibraryPrefix::LoadError() const {
for (int32_t i = 0; i < num_imports(); i++) {
lib = GetLibrary(i);
ASSERT(!lib.IsNull());
- HANDLESCOPE(isolate);
+ HANDLESCOPE(thread);
error = lib.TransitiveLoadError();
if (!error.IsNull()) {
break;
@@ -14188,7 +14190,7 @@ void UnhandledException::set_stacktrace(const Instance& stacktrace) const {
const char* UnhandledException::ToErrorCString() const {
Thread* thread = Thread::Current();
Isolate* isolate = thread->isolate();
- HANDLESCOPE(isolate);
+ HANDLESCOPE(thread);
Object& strtmp = Object::Handle();
const char* exc_str;
if (exception() == isolate->object_store()->out_of_memory()) {
« no previous file with comments | « runtime/vm/native_api_impl.cc ('k') | runtime/vm/object_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698