💄 for the beforeunload handler.

Returning text in beforeunload handler should prevent the close instead
of allow the close.
This commit is contained in:
Cheng Zhao 2013-08-29 15:36:09 +08:00
parent 34e1800716
commit b1f30c1eb6

View file

@ -13,8 +13,7 @@ void AtomJavaScriptDialogManager::RunBeforeUnloadDialog(
const string16& message_text,
bool is_reload,
const DialogClosedCallback& callback) {
bool prevent_reload = message_text.empty() ||
bool prevent_reload = !message_text.empty() ||
message_text == ASCIIToUTF16("false");
callback.Run(!prevent_reload, message_text);
}