• yutak's avatar
    BlinkGCPlugin: Fix detection of trace dispatching after inlined tracing. · 8747aee1
    yutak authored
    This patch actually fixes three different issues, as I could not separate the
    updated tests in a meaningful way.
    
    1. CheckDispatchVisitor needs to look for UnresolvedMemberExpr*, since inlined
    tracing introduces unresolved member references.
    
    This visitor looks at every function call within a trace dispatching method,
    and returns whether there is a call delegating to the class in question. We
    need to take care of UnresolvedMemberExpr* cases in addition to MemberExpr*.
    
    2. RecordInfo::DetermineTracingMethods() should return traceImpl() instead of
    trace() as trace_dispatch_method_.
    
    The plugin inspects the definition of trace_dispatch_method_ in order to detect
    missing or inappropriate delegation to subclasses. Therefore, the method should
    be something that has actual delegation calls in its body (i.e. traceImpl())
    instead of a trampoline stub (i.e. trace()).
    
    3. A silly typo in Config::GetTraceMethodType(). Really silly. Not sure why
    I did this way.
    
    This patch comes with updated tests for traceAfterDispatchImpl(). Now the tests
    are more closer to real cases, using traceImpl to implement trace dispatching.
    
    BUG=462511
    R=kouhei@chromium.org
    CC=zerny@chromium.org, oilpan-reviews@chromium.org
    
    Review URL: https://codereview.chromium.org/968143002
    
    Cr-Commit-Position: refs/heads/master@{#318673}
    8747aee1
BlinkGCPlugin.cpp 72.9 KB