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

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

Issue 2252533002: Fix race in GC sweeper and isolate reload rollback. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/isolate.h ('k') | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 "vm/isolate_reload.h" 5 #include "vm/isolate_reload.h"
6 6
7 #include "vm/become.h" 7 #include "vm/become.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 return !FLAG_reload_force_rollback && !HasReasonsForCancelling(); 1317 return !FLAG_reload_force_rollback && !HasReasonsForCancelling();
1318 } 1318 }
1319 1319
1320 1320
1321 RawClass* IsolateReloadContext::FindOriginalClass(const Class& cls) { 1321 RawClass* IsolateReloadContext::FindOriginalClass(const Class& cls) {
1322 return MappedClass(cls); 1322 return MappedClass(cls);
1323 } 1323 }
1324 1324
1325 1325
1326 RawClass* IsolateReloadContext::GetClassForHeapWalkAt(intptr_t cid) { 1326 RawClass* IsolateReloadContext::GetClassForHeapWalkAt(intptr_t cid) {
1327 if (saved_class_table_ != NULL) { 1327 RawClass** class_table = AtomicOperations::LoadRelaxed(&saved_class_table_);
1328 if (class_table != NULL) {
1328 ASSERT(cid > 0); 1329 ASSERT(cid > 0);
1329 ASSERT(cid < saved_num_cids_); 1330 ASSERT(cid < saved_num_cids_);
1330 return saved_class_table_[cid]; 1331 return class_table[cid];
1331 } else { 1332 } else {
1332 return isolate_->class_table()->At(cid); 1333 return isolate_->class_table()->At(cid);
1333 } 1334 }
1334 } 1335 }
1335 1336
1336 1337
1337 RawLibrary* IsolateReloadContext::saved_root_library() const { 1338 RawLibrary* IsolateReloadContext::saved_root_library() const {
1338 return saved_root_library_; 1339 return saved_root_library_;
1339 } 1340 }
1340 1341
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 ASSERT(!super_cls.IsNull()); 1666 ASSERT(!super_cls.IsNull());
1666 super_cls.AddDirectSubclass(cls); 1667 super_cls.AddDirectSubclass(cls);
1667 } 1668 }
1668 } 1669 }
1669 } 1670 }
1670 } 1671 }
1671 1672
1672 #endif // !PRODUCT 1673 #endif // !PRODUCT
1673 1674
1674 } // namespace dart 1675 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698