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

View File

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