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

Unified Diff: lib/cssInjection.js

Issue 29696583: Issue 6385 - Don't attempt to inject styles for frames we can't find (Closed)
Patch Set: Created Feb. 13, 2018, 3 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: lib/cssInjection.js
diff --git a/lib/cssInjection.js b/lib/cssInjection.js
index e5a918d54c1eef5e016a7fc80b729ce31328ebe3..acf6274d7340a14cc8626018036923c5371cd3b2 100644
--- a/lib/cssInjection.js
+++ b/lib/cssInjection.js
@@ -106,6 +106,9 @@ function updateFrameStyles(tabId, frameId, selectors, groupName)
styleSheet = createStyleSheet(selectors);
let frame = ext.getFrame(tabId, frameId);
+ if (!frame)
+ return;
Manish Jethani 2018/02/14 13:41:16 OK, I guess this is the right thing to do. But we
Manish Jethani 2018/02/14 14:03:41 If this is reproduceable, we should check why it i
kzar 2018/02/14 14:52:58 This is reproducible, the issue description is up
kzar 2018/02/14 14:52:58 Done.
Manish Jethani 2018/02/15 14:06:22 See my comment here: https://issues.adblockplus.o
+
if (!frame.injectedStyleSheets)
frame.injectedStyleSheets = new Map();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld