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

Unified Diff: runtime/vm/object_graph.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/object.cc ('k') | runtime/vm/object_graph_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_graph.cc
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index ad6f8614821e9e866f971ef954992724c482045a..b32fa2037db1eb8224f0b1614834ec0ce8b320ad 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -255,7 +255,7 @@ class RetainingPathVisitor : public ObjectGraph::Visitor {
public:
// We cannot use a GrowableObjectArray, since we must not trigger GC.
RetainingPathVisitor(RawObject* obj, const Array& path)
- : obj_(obj), path_(path), length_(0) {
+ : thread_(Thread::Current()), obj_(obj), path_(path), length_(0) {
ASSERT(Thread::Current()->no_safepoint_scope_depth() != 0);
}
@@ -281,7 +281,7 @@ class RetainingPathVisitor : public ObjectGraph::Visitor {
return kProceed;
}
} else {
- HANDLESCOPE(Isolate::Current());
+ HANDLESCOPE(thread_);
Object& current = Object::Handle();
Smi& offset_from_parent = Smi::Handle();
do {
@@ -300,6 +300,7 @@ class RetainingPathVisitor : public ObjectGraph::Visitor {
}
private:
+ Thread* thread_;
RawObject* obj_;
const Array& path_;
intptr_t length_;
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_graph_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698