• Clemens Hammacher's avatar
    [wasm] Use pending exceptions consistently · d6aed443
    Clemens Hammacher authored
    In our internal code, we should only use pending exceptions. They will
    be converted to scheduled exceptions on the API boundary.
    Hence, the ErrorThrower just sets a pending exception; it should never
    have to think about scheduled exceptions. The new
    ScheduledErrorThrower inherits from ErrorThrower and reschedules any
    pending exceptions in its destructor (turning them into scheduled
    exceptions).
    In some situations, there might already be a scheduled exception, e.g.
    when calling other API methods (v8::Value::Get). In this case, the
    ErrorThrower should also not set another pending exception. For the
    reasons mentioned above, this can only be handled in the
    ScheduledErrorThrower, which is used the API methods.
    
    This fixes one DCHECK failure and one TODO about scheduled exceptions
    if no instance can be created, because the start function throws.
    
    R=mtrofin@chromium.org, mstarzinger@chromium.org
    BUG=v8:6232,chromium:736256
    
    Change-Id: I4905be04c565df9495de18fb26adbb5c05d193d2
    Reviewed-on: https://chromium-review.googlesource.com/548641
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46314}
    d6aed443
wasm-module-runner.cc 5.97 KB