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 760225 - Assume that API may return deferred object
Assume that API may return deferred object
Status: RESOLVED FIXED
Product: website
Classification: Infrastructure
Component: extensions.gnome.org
current
Other Linux
: Normal normal
: ---
Assigned To: Shell extensions maintainer(s)
Shell extensions maintainer(s)
Depends on:
Blocks: 727936
 
 
Reported: 2016-01-06 15:33 UTC by Yuri Konotopov
Modified: 2016-09-25 11:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Suggested patch (2.34 KB, patch)
2016-01-06 19:44 UTC, Yuri Konotopov
committed Details | Review

Description Yuri Konotopov 2016-01-06 15:33:49 UTC
Currently "https://extensions.gnome.org/static/js/versions/common/common.js" script wraps return values for most of API's methods to deferred object with "_makePromise" method.
In Google Chrome extensions there is no possibility to use synchronous calls to dbus and return something other than deferred/promise.

To make things easier for developing Chrome extension please assume that API may return Deferred values. For example by checking returning value for "promise" property.
Comment 1 Olav Vitters 2016-01-06 18:00:47 UTC
Could you provide a patch with the suggested change? Git repository is at https://git.gnome.org/browse/extensions-web/.
Comment 2 Yuri Konotopov 2016-01-06 19:44:12 UTC
Created attachment 318380 [details] [review]
Suggested patch

Here is patch.
Also available at github: https://github.com/nE0sIghT/extensions-web/commit/59970d0cb9d4fd474cad7a7bca30757271073360
Comment 3 Yuri Konotopov 2016-09-24 10:19:37 UTC
Any feedback?
It would be nice to drop this overrided code from chrome-gnome-shell: https://git.gnome.org/browse/chrome-gnome-shell/tree/extension/include/sweettooth-api.js#n157
Comment 4 Olav Vitters 2016-09-24 11:50:16 UTC
As you seem to know what you're doing I've committed the fix.
Comment 5 Yuri Konotopov 2016-09-25 08:25:40 UTC
Thanks!

When this change will be deployed to extensions.gnome.org (do I need to ask infra team or this is some periodical action)?
Comment 6 Olav Vitters 2016-09-25 11:42:21 UTC
That's been done now.