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: Addressed comments Created April 11, 2014, 2:47 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 | « 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
@@ -47,9 +47,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);
@@ -69,7 +69,7 @@
showNotification(notificationToShow);
}
- FilterNotifier.triggerListeners("filter.hitCount", filter, 0, 0, tab);
+ FilterNotifier.triggerListeners("filter.hitCount", filter, 0, 0, page);
return !(filter instanceof BlockingFilter);
}
@@ -85,8 +85,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;
@@ -95,7 +95,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);
}
var notificationToShow = Notification.getNextToShow(details.url);
« no previous file with comments | « stats.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld