Crash early on incorrect usage of CefJSDialogHandler::OnJSDialog (issue #1206).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1637 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2014-03-12 15:43:05 +00:00
parent 1d798844b6
commit 11df06b1ad
1 changed files with 4 additions and 1 deletions

View File

@ -98,8 +98,11 @@ void CefJavaScriptDialogManager::RunJavaScriptDialog(
static_cast<cef_jsdialog_type_t>(message_type), static_cast<cef_jsdialog_type_t>(message_type),
message_text, default_prompt_text, callbackPtr.get(), message_text, default_prompt_text, callbackPtr.get(),
*did_suppress_message); *did_suppress_message);
if (handled) if (handled) {
// Invalid combination of values. Crash sooner rather than later.
CHECK(!*did_suppress_message);
return; return;
}
callbackPtr->Disconnect(); callbackPtr->Disconnect();
if (*did_suppress_message) if (*did_suppress_message)