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

Unified Diff: lib/contentFiltering.js

Issue 29836559: Issue 6539, 6782 - Ignore tabs.executeScript error when frame not found (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created July 23, 2018, 5:09 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/contentFiltering.js
===================================================================
--- a/lib/contentFiltering.js
+++ b/lib/contentFiltering.js
@@ -188,16 +188,21 @@
})
.catch(error =>
{
// Sometimes a frame is added and removed very quickly, in such cases we
// simply ignore the error.
if (error.message == "The frame was removed.")
return;
+ // Sometimes the frame in question is just not found. We don't know why
+ // this is exactly, but we simply ignore the error.
+ if (/^No frame with id \d+ in tab \d+\.$/.test(error.message))
+ return;
+
throw error;
});
}
catch (error)
{
// See the comment in the catch block associated with the call to
// tabs.insertCSS for why we catch and ignore any errors here.
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld