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

Unified Diff: src/heap/heap.h

Issue 1312763006: [heap] User safer root set accessor when possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-heap-root-set-1
Patch Set: 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
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index ce731cfd5fc81722f4e15a1100793153072c5e11..6a7ddee7e75430a9895044534cd00ebd61f34845 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -1246,6 +1246,9 @@ class Heap {
#undef SYMBOL_ACCESSOR
Object* root(RootListIndex index) { return roots_[index]; }
+ Handle<Object> root_handle(RootListIndex index) {
+ return Handle<Object>(&roots_[index]);
+ }
// Generated code can embed this address to get access to the roots.
Object** roots_array_start() { return roots_; }
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/heap/heap.cc » ('j') | src/snapshot/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698