[Webkit-unassigned] [Bug 20940] [GTK] use of confirm dialog (yes/no) causes segfault
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Mar 15 12:49:34 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=20940
------- Comment #8 from christian at twotoasts.de 2009-03-15 12:49 PDT -------
(In reply to comment #7)
> (In reply to comment #4)
> > > -static gboolean webViewScriptConfirm(WebKitWebView* view, WebKitWebFrame* frame, const gchar* > message, gboolean* didConfirm, gpointer data)
> > > +static gboolean webViewScriptConfirm(WebKitWebView* view, WebKitWebFrame* frame, const gchar* > message, gboolean didConfirm, gpointer data)
> > > {
> > > fprintf(stdout, "CONFIRM: %s\n", message);
> > > - *didConfirm = TRUE;
> > > + didConfirm = TRUE;
> > > return TRUE;
> > > }
> >
> > This is bogus if I may say that. Assigning a value to a local variable doesn't
> > do anything at all. If anything, the marshaller must be wrong.
> >
> > didConfirm represents the action of the user, ie. did confirm or did not
> > confirm.
> >
>
> This doesn't look quite right. It won't be possible to support this pattern in
> language bindings. Why not just use the return value and remove the third
> argument to the callbacks instead of always returning TRUE?
Because the return value determines whether the signal was handled or not.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list