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

Unified Diff: lib/requestNotifier.js

Issue 5681038109966336: issue #362 - firefox: block image broken on youtube thumbnails (recommended videos) (Closed)
Patch Set: Created Aug. 10, 2014, 11:52 a.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: lib/requestNotifier.js
===================================================================
--- a/lib/requestNotifier.js
+++ b/lib/requestNotifier.js
@@ -241,19 +241,12 @@
{
while (node)
{
- let data = getEntry(nodeData, node);
- if (typeof data != "undefined")
+ let entry = getEntry(nodeData, node);
+ if (typeof entry != "undefined" &&
+ (typeof type == "undefined" || entry.type == type) &&
+ (typeof location == "undefined" || entry.location == location))
{
- // Look for matching entry
- for (let k in data)
- {
- let entry = data[k];
- if ((typeof type == "undefined" || entry.type == type) &&
- (typeof location == "undefined" || entry.location == location))
- {
- return [node, entry];
- }
- }
+ return [node, entry];
}
// If we don't have any match on this node then maybe its parent will do
@@ -365,14 +358,6 @@
*/
attachToNode: function(/**Node*/ node)
{
- let existingData = getEntry(nodeData, node);
- if (typeof existingData == "undefined")
- {
- existingData = {};
- setEntry(nodeData, node, existingData);
- }
-
- // Add this request to the node data
- existingData[this.type + " " + this.location] = this;
+ setEntry(nodeData, node, this);
Wladimir Palant 2014/08/14 20:44:57 The the list of blockable items is broken now beca
saroyanm 2014/08/17 14:25:21 Oops, Thanks for that.
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld