• leszeks's avatar
    [ignition] Fix building lookup graph when search depth is 0 · 4ad35791
    leszeks authored
    In some (rare) cases, the context depth passed to a dynamic variable lookup can
    be zero. In these cases, the fast path for the lookup (i.e. load from context or
    global) can always be taken, as there is no need to search the current context.
    
    However, with no slow path checks, the bytecode graph builder had a null
    environment for the slow path, causing segfaults when this graph was built.
    
    This patch adds a null check for the slow path environment, and skips building
    the slow path if the environment is null.
    
    BUG=chromium:652186
    
    Review-Url: https://codereview.chromium.org/2385123002
    Cr-Commit-Position: refs/heads/master@{#39949}
    4ad35791
bytecode-graph-builder.cc 82.1 KB