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

Unified Diff: runtime/vm/snapshot.cc

Issue 1414493003: Remove some Isolate::current_zone() calls, as it gets the zone from mutator thread not the current … (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: cleanup 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
« runtime/vm/object.cc ('K') | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index f121a0d47886e6e7c3341bb9d76b1b3fffdb1f49..870b2ad8a14136a588e1b7ce81fadf02e7b02092 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -1729,15 +1729,15 @@ bool SnapshotWriter::HandleVMIsolateObject(RawObject* rawobj) {
// objects and their accompanying token streams.
class ScriptVisitor : public ObjectVisitor {
public:
- explicit ScriptVisitor(Isolate* isolate) :
- ObjectVisitor(isolate),
- objHandle_(Object::Handle(isolate->current_zone())),
+ explicit ScriptVisitor(Thread* thread) :
+ ObjectVisitor(thread->isolate()),
+ objHandle_(Object::Handle(thread->zone())),
count_(0),
scripts_(NULL) {}
- ScriptVisitor(Isolate* isolate, const Array* scripts) :
- ObjectVisitor(isolate),
- objHandle_(Object::Handle(isolate->current_zone())),
+ ScriptVisitor(Thread* thread, const Array* scripts) :
+ ObjectVisitor(thread->isolate()),
+ objHandle_(Object::Handle(thread->zone())),
count_(0),
scripts_(scripts) {}
@@ -1797,11 +1797,11 @@ FullSnapshotWriter::FullSnapshotWriter(uint8_t** vm_isolate_snapshot_buffer,
// into an array so that we can write it out as part of the VM isolate
// snapshot. We first count the number of script objects, allocate an array
// and then fill it up with the script objects.
- ScriptVisitor scripts_counter(isolate());
+ ScriptVisitor scripts_counter(thread());
heap()->IterateOldObjects(&scripts_counter);
intptr_t count = scripts_counter.count();
scripts_ = Array::New(count, Heap::kOld);
- ScriptVisitor script_visitor(isolate(), &scripts_);
+ ScriptVisitor script_visitor(thread(), &scripts_);
heap()->IterateOldObjects(&script_visitor);
// Stash the symbol table away for writing and reading into the vm isolate,
« runtime/vm/object.cc ('K') | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698