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

Unified Diff: webrequest.js

Issue 5133931611422720: Simplified and removed memory leaks from code dealing with frames on Chrome (Closed)
Patch Set: Created Feb. 25, 2014, 5:52 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
« chrome/ext/background.js ('K') | « popupBlocker.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
@@ -76,9 +76,9 @@
return;
var page = new ext.Page({id: details.tabId});
- var frame = new ext.Frame({frameId: details.frameId, tabId: details.tabId});
+ var frame = ext.getFrame(details.tabId, details.frameId);
- if (frame.url != details.url)
+ if (!frame || frame.url != details.url)
return;
for (var i = 0; i < details.responseHeaders.length; i++)
« chrome/ext/background.js ('K') | « popupBlocker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld