Closed
Bug 1133282
Opened 8 years ago
Closed 8 years ago
Remove nonstandard expression closures from netwerk
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(1 file)
11.42 KB,
patch
|
mcmanus
:
review+
|
Details | Diff | Splinter Review |
Expression closures (shorthand function syntax) are a nonstandard SpiderMonkey feature we would like to remove (in bug 1083459).
Attachment #8564658 -
Flags: review?(mcmanus)
Comment 1•8 years ago
|
||
Comment on attachment 8564658 [details] [diff] [review] exclo-netwerk.patch Review of attachment 8564658 [details] [diff] [review]: ----------------------------------------------------------------- thanks rs=mcmanus
Attachment #8564658 -
Flags: review?(mcmanus) → review+
Comment 2•8 years ago
|
||
Comment on attachment 8564658 [details] [diff] [review] exclo-netwerk.patch >+ _getParameters() { >+ return { >+ "%DATE%": function() { return Date.now().toString(); }, >+ "%PRODUCT%": function() { return gApp.name; }, >+ "%APP_ID%": function() { return gApp.ID; }, >+ "%APP_VERSION%": function() { return gApp.version; }, >+ "%BUILD_ID%": function() { return gApp.appBuildID; }, >+ "%OS%": function() { return gApp.OS; }, >+ "%CHANNEL%": function() { return UpdateChannel.get(); }, >+ "%DISTRIBUTION%": function() { return this._getPref(PREF_APP_DISTRIBUTION, ""); }, >+ "%DISTRIBUTION_VERSION%": function() { return this._getPref(PREF_APP_DISTRIBUTION_VERSION, ""); }, >+ }; >+ }, > > _getUpdateURL: function() { > let url = this._getPref(PREF_UPDATES_URL, ""); > let params = this._getParameters(); > return url.replace(/%[A-Z_]+%/g, function(match) { > let param = params[match]; > // preserve the %FOO% string (e.g. as an encoding) if it's not a valid parameter > return param ? encodeURIComponent(param()) : match; _getParameters() is missing the colon & function keyword.
Assignee | ||
Comment 3•8 years ago
|
||
(In reply to Dave Garrett from comment #2) > Comment on attachment 8564658 [details] [diff] [review] > exclo-netwerk.patch > > >+ _getParameters() { > ... > > _getParameters() is missing the colon & function keyword. ES6 method syntax allows `: function` to be omitted in object literals: https://github.com/google/traceur-compiler/wiki/LanguageFeatures#property-method-assignment
Assignee | ||
Comment 4•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad824f6cef5f
Comment 5•8 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ad824f6cef5f
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox38:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•