Index: src/heap/objects-visiting-inl.h |
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h |
index ab0b357f40499c07305e9c2cd1ea6eba50ca77d4..2bf2afbb2b386b893ac11a9be73949dfaf54efb7 100644 |
--- a/src/heap/objects-visiting-inl.h |
+++ b/src/heap/objects-visiting-inl.h |
@@ -667,9 +667,8 @@ void StaticMarkingVisitor<StaticVisitor>::MarkInlinedFunctionsCode(Heap* heap, |
} |
-inline static bool IsValidNonBuiltinContext(Object* context) { |
- return context->IsContext() && |
- !Context::cast(context)->global_object()->IsJSBuiltinsObject(); |
+inline static bool HasValidNonBuiltinContext(JSFunction* function) { |
+ return function->context()->IsContext() && !function->IsBuiltin(); |
} |
@@ -693,7 +692,7 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(Heap* heap, |
} |
// The function must have a valid context and not be a builtin. |
- if (!IsValidNonBuiltinContext(function->context())) { |
+ if (!HasValidNonBuiltinContext(function)) { |
return false; |
} |