zhangqd / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 1 forks source link

Incorrect API usage within OnJSDialog causes crash #1206

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If in OnJSDialog:
- set suppress_message = true
- call or do not call continue callback
- return true
This causes crash (and looks that no assertion happens or and no stacktrace 
appears in log).
[Tested on 1650 branch]

It is will be good to detect this situation and try react more user-friendly 
(via assert / log entry).

Original issue reported on code.google.com by fdd...@gmail.com on 15 Feb 2014 at 5:52

GoogleCodeExporter commented 9 years ago
In this case of invalid usage what should be the result? Ie, should we treat it 
as "suppress_message = true and return false" (suppress the message) or 
"suppress_message = false and return true" (custom dialog)?

Original comment by magreenb...@gmail.com on 12 Mar 2014 at 3:11

GoogleCodeExporter commented 9 years ago
There is no best choice to how treat it, 'cause it depends from client code (it 
really shows custom dialog or really don't do it).
(BTW, if application always immediately call callback, - there is equivalent 
for suppress message or no?)

I think, that assert and crash - is good enough, 'cause it does not masquerade 
erroneous API usage. But assertion message should appears in log.

PS: This issue based on CefGlue user report, and i'm re-read OnJSDialog three 
times, before understand that there is really incorrect. :)

Original comment by fdd...@gmail.com on 12 Mar 2014 at 3:25

GoogleCodeExporter commented 9 years ago
CHECK added in trunk revision 1637, 1750 branch revision 1638 and 1650 branch 
revision 1639.

Original comment by magreenb...@gmail.com on 12 Mar 2014 at 3:44