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

Unified Diff: webrequest.js

Issue 5464830253203456: Refactored the abstraction layer to address prerendered pages on Safari caused by leaky abstraction (Closed)
Patch Set: Created Feb. 22, 2014, 10:45 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
« notification.js ('K') | « stats.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrequest.js
===================================================================
--- a/webrequest.js
+++ b/webrequest.js
@@ -46,9 +46,9 @@
}
});
-function onBeforeRequest(url, type, tab, frame)
+function onBeforeRequest(url, type, page, frame)
{
- if (isFrameWhitelisted(tab, frame))
+ if (isFrameWhitelisted(page, frame))
return true;
var docDomain = extractHostFromURL(frame.url);
@@ -59,7 +59,7 @@
isThirdParty(extractHostFromURL(url), docDomain)
);
- FilterNotifier.triggerListeners("filter.hitCount", filter, 0, 0, tab);
+ FilterNotifier.triggerListeners("filter.hitCount", filter, 0, 0, page);
return !(filter instanceof BlockingFilter);
}
@@ -75,8 +75,8 @@
if (details.type != "main_frame" && details.type != "sub_frame")
return;
- var tab = new Tab({id: details.tabId});
- var frame = new Frame({id: details.frameId, tab: tab});
+ var page = new ext.Page({id: details.tabId});
+ var frame = new ext.Frame({frameId: details.frameId, tabId: details.tabId});
if (frame.url != details.url)
return;
@@ -85,7 +85,7 @@
{
var header = details.responseHeaders[i];
if (header.name.toLowerCase() == "x-adblock-key" && header.value)
- processKeyException(header.value, tab, frame);
+ processKeyException(header.value, page, frame);
}
}
« notification.js ('K') | « stats.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld