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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 1384403002: Preparation for moving reusable handles to thread and more cleanups: isolate -> thread based handle… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixed import 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/allocation.cc ('k') | runtime/vm/coverage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 7819783ef194611256ee9184e9dc0ce588114c56..763885088a074a9b5c0524838a6f8f84ad8bbf10 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -3136,21 +3136,23 @@ void ClassFinalizer::ReportError(const Class& cls,
void ClassFinalizer::VerifyImplicitFieldOffsets() {
#ifdef DEBUG
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
+ Zone* zone = thread->zone();
const ClassTable& class_table = *(isolate->class_table());
- Class& cls = Class::Handle(isolate);
- Array& fields_array = Array::Handle(isolate);
- Field& field = Field::Handle(isolate);
- String& name = String::Handle(isolate);
- String& expected_name = String::Handle(isolate);
- Error& error = Error::Handle(isolate);
+ Class& cls = Class::Handle(zone);
+ Array& fields_array = Array::Handle(zone);
+ Field& field = Field::Handle(zone);
+ String& name = String::Handle(zone);
+ String& expected_name = String::Handle(zone);
+ Error& error = Error::Handle(zone);
// First verify field offsets of all the TypedDataView classes.
for (intptr_t cid = kTypedDataInt8ArrayViewCid;
cid <= kTypedDataFloat32x4ArrayViewCid;
cid++) {
cls = class_table.At(cid); // Get the TypedDataView class.
- error = cls.EnsureIsFinalized(isolate);
+ error = cls.EnsureIsFinalized(thread);
ASSERT(error.IsNull());
cls = cls.SuperClass(); // Get it's super class '_TypedListView'.
cls = cls.SuperClass();
@@ -3173,7 +3175,7 @@ void ClassFinalizer::VerifyImplicitFieldOffsets() {
// Now verify field offsets of '_ByteDataView' class.
cls = class_table.At(kByteDataViewCid);
- error = cls.EnsureIsFinalized(isolate);
+ error = cls.EnsureIsFinalized(thread);
ASSERT(error.IsNull());
fields_array ^= cls.fields();
ASSERT(fields_array.Length() == TypedDataView::NumberOfFields());
@@ -3194,7 +3196,7 @@ void ClassFinalizer::VerifyImplicitFieldOffsets() {
// Now verify field offsets of '_ByteBuffer' class.
cls = class_table.At(kByteBufferCid);
- error = cls.EnsureIsFinalized(isolate);
+ error = cls.EnsureIsFinalized(thread);
ASSERT(error.IsNull());
fields_array ^= cls.fields();
ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields());
« no previous file with comments | « runtime/vm/allocation.cc ('k') | runtime/vm/coverage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698