Skip to content

Commit df9cae4

Browse files
author
George Mount
committed
Cancel handler for JS unload handler prevents hang.
Bug 6803309 When the alert dialog raised by the JS unload handler was pressed outside the alert region, it was canceled and no response was sent back to WebViewCore. This captures the cancel event so that WebViewCore doesn't hang. Change-Id: I0c125e759a252a803c2c77aa9533adef7fa82d3d
1 parent 437a0fb commit df9cae4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/java/android/webkit/CallbackProxy.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,14 @@ public void onClick(
736736
res.cancel();
737737
}
738738
})
739+
.setOnCancelListener(
740+
new DialogInterface.OnCancelListener() {
741+
@Override
742+
public void onCancel(
743+
DialogInterface dialog) {
744+
res.cancel();
745+
}
746+
})
739747
.show();
740748
}
741749
receiver.setReady();

0 commit comments

Comments
 (0)