From 11df06b1ad3568a660fea4ba29cc462dd1191ba0 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 12 Mar 2014 15:43:05 +0000 Subject: [PATCH] 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 --- libcef/browser/javascript_dialog_manager.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcef/browser/javascript_dialog_manager.cc b/libcef/browser/javascript_dialog_manager.cc index a52c37906..cae3a2b4e 100644 --- a/libcef/browser/javascript_dialog_manager.cc +++ b/libcef/browser/javascript_dialog_manager.cc @@ -98,8 +98,11 @@ void CefJavaScriptDialogManager::RunJavaScriptDialog( static_cast(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)