After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792541 - epub: Fix runtime JavaScript warnings
epub: Fix runtime JavaScript warnings
Status: RESOLVED DUPLICATE of bug 768003
Product: gnome-documents
Classification: Core
Component: books
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Books Maintainers
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2018-01-15 17:47 UTC by Bastien Nocera
Modified: 2018-01-17 08:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
epub: Fix runtime JavaScript warnings (2.17 KB, patch)
2018-01-15 17:47 UTC, Bastien Nocera
accepted-commit_now Details | Review

Description Bastien Nocera 2018-01-15 17:47:21 UTC
.
Comment 1 Bastien Nocera 2018-01-15 17:47:25 UTC
Created attachment 366855 [details] [review]
epub: Fix runtime JavaScript warnings

Gjs-Message: 18:37:27.180: JS WARNING: [resource:///org/gnome/Books/js/epubview.js 89]: Too many arguments to method WebKit2.WebView.run_javascript: expected 3, got 4
Gjs-Message: 18:37:27.181: JS WARNING: [resource:///org/gnome/Books/js/epubview.js 98]: Too many arguments to method Gio.File.read: expected 1, got 2
Gjs-Message: 18:37:27.183: JS WARNING: [resource:///org/gnome/Books/js/epubview.js 109]: Too many arguments to method WebKit2.WebView.run_javascript: expected 3, got 4
Comment 2 Bastien Nocera 2018-01-16 09:30:09 UTC
This is run_javascript in C:

void
webkit_web_view_run_javascript (WebKitWebView *web_view,
                                const gchar *script,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Which one of cancellable, callback and user_data is chopped off when we only have  3 arguments (in addition to the web_view we call this on)?
Comment 3 Cosimo Cecchi 2018-01-17 05:43:39 UTC
Review of attachment 366855 [details] [review]:

Looks good to me.
Comment 4 Cosimo Cecchi 2018-01-17 05:53:11 UTC
(In reply to Bastien Nocera from comment #2)
> Which one of cancellable, callback and user_data is chopped off when we only
> have  3 arguments (in addition to the web_view we call this on)?

Yeah, there's no user_data in the JS bindings, since you can pass parameters in many other ways.
Comment 5 Bastien Nocera 2018-01-17 08:37:09 UTC
Those were bugs in the patch from bug 768003.

*** This bug has been marked as a duplicate of bug 768003 ***