Skip to content
  • gsennton's avatar
    Properly throw java exceptions from shouldOverrideUrlLoading · ebe2e203
    gsennton authored
    [WebView]
    Since all our java methods called through the jni-interface are
    annotated with @CalledByNative (rather than @CalledByNativeUnchecked)
    any java crash in those methods will cause a native crash since we call
    jni_android::CheckException (which aborts in native code) when returning
    from those methods.
    
    In this CL we annotate the jni-call for shouldOverrideUrlLoading with
    @CalledByNativeUnchecked to avoid crashing directly after the jni-call.
    
    We also add an Abort function for the android specific message loop and
    message pump to ensure no new tasks will be run before we return to the
    Java handler (at which point the original Java exception will be
    rethrown and thus correctly reported).
    
    BUG=592556
    
    Review-Url: https://codereview.chromium.org/2169553002
    Cr-Commit-Position: refs/heads/master@{#412956}
    ebe2e203