Index: src/compilation-cache.cc |
diff --git a/src/compilation-cache.cc b/src/compilation-cache.cc |
index aca8cee9cae861a148be20ffe859752b5e746914..5aa32df6c3c3aae594db38c412f6530d3f51f64d 100644 |
--- a/src/compilation-cache.cc |
+++ b/src/compilation-cache.cc |
@@ -41,7 +41,7 @@ CompilationCache::~CompilationCache() {} |
Handle<CompilationCacheTable> CompilationSubCache::GetTable(int generation) { |
DCHECK(generation < generations_); |
Handle<CompilationCacheTable> result; |
- if (tables_[generation]->IsUndefined()) { |
+ if (tables_[generation]->IsUndefined(isolate())) { |
result = CompilationCacheTable::New(isolate(), kInitialCacheSize); |
tables_[generation] = *result; |
} else { |
@@ -56,7 +56,7 @@ Handle<CompilationCacheTable> CompilationSubCache::GetTable(int generation) { |
void CompilationSubCache::Age() { |
// Don't directly age single-generation caches. |
if (generations_ == 1) { |
- if (tables_[0] != isolate()->heap()->undefined_value()) { |
+ if (!tables_[0]->IsUndefined(isolate())) { |
CompilationCacheTable::cast(tables_[0])->Age(); |
} |
return; |
@@ -73,9 +73,8 @@ void CompilationSubCache::Age() { |
void CompilationSubCache::IterateFunctions(ObjectVisitor* v) { |
- Object* undefined = isolate()->heap()->undefined_value(); |
for (int i = 0; i < generations_; i++) { |
- if (tables_[i] != undefined) { |
+ if (!tables_[i]->IsUndefined(isolate())) { |
reinterpret_cast<CompilationCacheTable*>(tables_[i])->IterateElements(v); |
} |
} |
@@ -121,7 +120,7 @@ bool CompilationCacheScript::HasOrigin(Handle<SharedFunctionInfo> function_info, |
// If the script name isn't set, the boilerplate script should have |
// an undefined name to have the same origin. |
if (name.is_null()) { |
- return script->name()->IsUndefined(); |
+ return script->name()->IsUndefined(isolate()); |
} |
// Do the fast bailout checks first. |
if (line_offset != script->line_offset()) return false; |