Commit a29f0576 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[heap] Remove eager shortcut in JSFunction visitor.

This removes an optimization in the static JSFunction visitor that
eagerly marked through to the SharedFunctionInfo for code flushing
candidates. This causes all processing in VisitJSFunction to be
side-stepped and hence might cause leaks.

R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/1476223002

Cr-Commit-Position: refs/heads/master@{#32332}
parent c47ce4cc
......@@ -464,14 +464,6 @@ void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction(Map* map,
// non-flushable, because it is required for bailing out from
// optimized code.
collector->code_flusher()->AddCandidate(function);
// Visit shared function info immediately to avoid double checking
// of its flushability later. This is just an optimization because
// the shared function info would eventually be visited.
SharedFunctionInfo* shared = function->shared();
if (StaticVisitor::MarkObjectWithoutPush(heap, shared)) {
StaticVisitor::MarkObject(heap, shared->map());
VisitSharedFunctionInfoWeakCode(heap, shared);
}
// Treat the reference to the code object weakly.
VisitJSFunctionWeakCode(map, object);
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment