mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Windows: Avoid assertion when entering zero-length text in the default JavaScript prompt dialog (issue #862).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1045 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -61,9 +61,11 @@ INT_PTR CALLBACK CefJavaScriptDialog::DialogProc(HWND dialog,
|
||||
if (owner->message_type_ == content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) {
|
||||
size_t length =
|
||||
GetWindowTextLength(GetDlgItem(dialog, IDC_PROMPTEDIT)) + 1;
|
||||
if (length > 1) {
|
||||
GetDlgItemText(dialog, IDC_PROMPTEDIT,
|
||||
WriteInto(&user_input, length), length);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case IDCANCEL:
|
||||
finish = true;
|
||||
|
Reference in New Issue
Block a user