Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: ext/background.js

Issue 29445648: Issue 5264 - Return page objects instead of page IDs (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Return page objects instead of page IDs Created May 22, 2017, 5:08 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/background.js
===================================================================
--- a/ext/background.js
+++ b/ext/background.js
@@ -30,17 +30,17 @@
{
this._map.delete(id);
if (this._map.size == 0)
nonEmptyPageMaps.delete(this);
},
keys()
{
- return this._map.keys();
+ return Array.from(this._map.keys()).map(ext.getPage);
kzar 2017/05/23 11:47:59 I wonder if you could do `return Array.prototype.m
Sebastian Noack 2017/05/23 12:16:54 Please don't. Array generics are non-standard and
Manish Jethani 2017/05/23 12:32:27 I think Dave meant Array.prototype.map rather than
Sebastian Noack 2017/05/23 15:09:18 Sorry, you are right, I mixed things up, calling a
kzar 2017/05/23 16:15:04 Acknowledged.
},
get(page)
{
return this._map.get(page.id);
},
set(page, value)
{
this._map.set(page.id, value);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld