зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1207496 - Part 1: Remove use of expression closure from services/common/. r=gps
--HG-- extra : commitid : EeWW6zhKp9t extra : rebase_source : b23def2c39cad03dd5e4b3a3b440e43d3b343b7a
This commit is contained in:
Родитель
4b5a0cb0ba
Коммит
95e75e96f8
|
@ -62,9 +62,9 @@ this.Observers = {
|
|||
// we can make it. We could index by topic, but we can't index by callback
|
||||
// or thisObject, as far as I know, since the keys to JavaScript hashes
|
||||
// (a.k.a. objects) can apparently only be primitive values.
|
||||
let [observer] = this._cache.filter(function(v) v.topic == topic &&
|
||||
v.callback == callback &&
|
||||
v.thisObject == thisObject);
|
||||
let [observer] = this._cache.filter(v => v.topic == topic &&
|
||||
v.callback == callback &&
|
||||
v.thisObject == thisObject);
|
||||
if (observer) {
|
||||
this._service.removeObserver(observer, topic);
|
||||
this._cache.splice(this._cache.indexOf(observer), 1);
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
_("Define some functions in well defined line positions for the test");
|
||||
function foo(v) bar(v + 1); // line 2
|
||||
function bar(v) baz(v + 1); // line 3
|
||||
function foo(v) { return bar(v + 1); } // line 2
|
||||
function bar(v) { return baz(v + 1); } // line 3
|
||||
function baz(v) { throw new Error(v + 1); } // line 4
|
||||
|
||||
_("Make sure lazy constructor calling/assignment works");
|
||||
|
|
|
@ -314,8 +314,9 @@ this.CommonUtils = {
|
|||
}
|
||||
|
||||
// Handle a left shift, restricted to bytes.
|
||||
function left(octet, shift)
|
||||
(octet << shift) & 0xff;
|
||||
function left(octet, shift) {
|
||||
return (octet << shift) & 0xff;
|
||||
}
|
||||
|
||||
advance();
|
||||
accumulate(left(val, 3));
|
||||
|
|
Загрузка…
Ссылка в новой задаче