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 791613 - Gecko-specific dialect of String.prototype.replace doesn't work with gjs-1.50.x
Gecko-specific dialect of String.prototype.replace doesn't work with gjs-1.50.x
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.26.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
: 789006 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-12-14 13:21 UTC by Debarshi Ray
Modified: 2018-02-16 20:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
documents, query: Use the standard dialect of String.prototype.replace (2.12 KB, patch)
2017-12-14 14:13 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2017-12-14 13:21:13 UTC
This doesn't work anymore with gjs-1.50.x:
  str.replace ('blue', 'red', 'g')

We need:
  str.replace (/blue/g, "red");

See the "Firefox-specific notes" section:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace

We missed the deprecation notice because we went from SpiderMonkey 38 in gjs-1.48.x to SpiderMonkey 52 in gjs-1.50.x.
Comment 1 Debarshi Ray 2017-12-14 14:13:32 UTC
Created attachment 365541 [details] [review]
documents, query: Use the standard dialect of String.prototype.replace
Comment 2 Cosimo Cecchi 2017-12-18 16:25:14 UTC
Review of attachment 365541 [details] [review]:

Looks good, thanks.
Comment 3 Debarshi Ray 2017-12-19 04:00:57 UTC
Comment on attachment 365541 [details] [review]
documents, query: Use the standard dialect of String.prototype.replace

Pushed to master and gnome-3-26.
Comment 4 Debarshi Ray 2018-02-16 20:01:54 UTC
*** Bug 789006 has been marked as a duplicate of this bug. ***