Bug 1054630 - Part 5a: Replace some deprecated expression closures with arrow functions in browser/. r=till

This commit is contained in:
Chris Peterson 2014-08-17 17:21:23 -07:00
parent 8314f6540a
commit 12ec7c251a
2 changed files with 6 additions and 4 deletions

View File

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const SEARCH_ENGINES = {
"Google": {
// This is the "2x" image designed for OS X retina resolution, Windows at 192dpi, etc.;
@ -269,13 +271,13 @@ function ensureSnippetsMapThen(aCallback)
// The cache has been filled up, create the snippets map.
gSnippetsMap = Object.freeze({
get: function (aKey) cache.get(aKey),
get: (aKey) => cache.get(aKey),
set: function (aKey, aValue) {
db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite")
.objectStore(SNIPPETS_OBJECTSTORE_NAME).put(aValue, aKey);
return cache.set(aKey, aValue);
},
has: function (aKey) cache.has(aKey),
has: (aKey) => cache.has(aKey),
delete: function (aKey) {
db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite")
.objectStore(SNIPPETS_OBJECTSTORE_NAME).delete(aKey);
@ -286,7 +288,7 @@ function ensureSnippetsMapThen(aCallback)
.objectStore(SNIPPETS_OBJECTSTORE_NAME).clear();
return cache.clear();
},
get size() cache.size
get size() { return cache.size; },
});
setTimeout(invokeCallbacks, 0);

View File

@ -712,7 +712,7 @@
ontextreverted="return this.handleRevert();"
pageproxystate="invalid"
onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
onblur="setTimeout(() => { document.getElementById('identity-box').style.MozUserFocus = ''; }, 0);">
<box id="notification-popup-box" hidden="true" align="center">
<image id="default-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="identity-notification-icon" class="notification-anchor-icon" role="button"/>