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

Unified Diff: src/bootstrapper.h

Issue 2801073006: Decouple root visitors from object visitors. (Closed)
Patch Set: rebase Created 3 years, 8 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 | « src/api-arguments.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.h
diff --git a/src/bootstrapper.h b/src/bootstrapper.h
index 059d3725735a711b42110015885e1d4329690b5d..286ec1ad54175cc8a9ef67ca1b6ea3527a26a235 100644
--- a/src/bootstrapper.h
+++ b/src/bootstrapper.h
@@ -7,6 +7,7 @@
#include "src/factory.h"
#include "src/snapshot/natives.h"
+#include "src/visitors.h"
namespace v8 {
namespace internal {
@@ -24,8 +25,9 @@ class SourceCodeCache final BASE_EMBEDDED {
cache_ = create_heap_objects ? isolate->heap()->empty_fixed_array() : NULL;
}
- void Iterate(ObjectVisitor* v) {
- v->VisitPointer(bit_cast<Object**, FixedArray**>(&cache_));
+ void Iterate(RootVisitor* v) {
+ v->VisitRootPointer(Root::kExtensions,
+ bit_cast<Object**, FixedArray**>(&cache_));
}
bool Lookup(Vector<const char> name, Handle<SharedFunctionInfo>* handle) {
@@ -94,7 +96,7 @@ class Bootstrapper final {
void DetachGlobal(Handle<Context> env);
// Traverses the pointers for memory management.
- void Iterate(ObjectVisitor* v);
+ void Iterate(RootVisitor* v);
// Accessor for the native scripts source code.
Handle<String> GetNativeSource(NativeType type, int index);
« no previous file with comments | « src/api-arguments.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698