• littledan's avatar
    Avoid calling out to JS during stack overflow · 5975c47a
    littledan authored
    If an exception is thrown when there is a Promise being created, the Promise
    catch prediction code would call into a part implemented in JavaScript to see if
    the Promise has a catch handler. If it is not possible to call back into JS,
    e.g., due to a stack overflow, then this would lead to a crash. This patch
    "speculates" that, if it's impossible to call back into JavaScript, then the
    error is unhandled, avoding the issue. In a future patch, the catch prediction
    logic should be entirely written in C++, but this patch adds a minimal fix to
    be more friendly to backports.
    
    BUG=chromium:662935
    R=jgruber
    
    Review-Url: https://codereview.chromium.org/2487833002
    Cr-Commit-Position: refs/heads/master@{#40851}
    5975c47a
isolate.cc 119 KB