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

Unified Diff: vm/raw_object_snapshot.cc

Issue 10892026: Add StorePointer when updating fields from a snapshot for (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/raw_object_snapshot.cc
===================================================================
--- vm/raw_object_snapshot.cc (revision 11482)
+++ vm/raw_object_snapshot.cc (working copy)
@@ -385,7 +385,9 @@
intptr_t num_flds = (instantiated_type_arguments.raw()->to() -
instantiated_type_arguments.raw()->from());
for (intptr_t i = 0; i <= num_flds; i++) {
- *(instantiated_type_arguments.raw()->from() + i) = reader->ReadObjectRef();
+ instantiated_type_arguments.StorePointer(
+ (instantiated_type_arguments.raw()->from() + i),
+ reader->ReadObjectRef());
}
return instantiated_type_arguments.raw();
}
@@ -1078,7 +1080,7 @@
// allocations may happen.
intptr_t num_flds = (scope.raw()->to(num_vars) - scope.raw()->from());
for (intptr_t i = 0; i <= num_flds; i++) {
- *(scope.raw()->from() + i) = reader->ReadObjectRef();
+ scope.StorePointer((scope.raw()->from() + i), reader->ReadObjectRef());
}
return scope.raw();
@@ -2099,7 +2101,7 @@
// Read and Set all the other fields.
regex.raw_ptr()->num_bracket_expressions_ = reader->ReadAsSmi();
*reader->StringHandle() ^= reader->ReadObjectImpl();
- regex.raw_ptr()->pattern_ = (*reader->StringHandle()).raw();
+ regex.set_pattern(*reader->StringHandle());
regex.raw_ptr()->type_ = reader->ReadIntptrValue();
regex.raw_ptr()->flags_ = reader->ReadIntptrValue();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698