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

Unified Diff: lib/cssInjection.js

Issue 29720585: Noissue - Explicitly ignore asynchronous errors from tabs.insertCSS (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created March 12, 2018, 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
« 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
===================================================================
--- a/lib/cssInjection.js
+++ b/lib/cssInjection.js
@@ -71,17 +71,18 @@
try
{
browser.tabs.insertCSS(tabId, {
code: styleSheet,
cssOrigin: "user",
frameId,
matchAboutBlank: true,
runAt: "document_start"
- });
+ })
+ .catch(() => {});
Sebastian Noack 2018/03/12 22:41:25 To clarify, so the catch-block below is essentiall
Manish Jethani 2018/03/13 06:09:47 On both Firefox and Chrome 65 the error for "cssOr
Sebastian Noack 2018/03/13 15:38:45 I see. Perhaps add some comments here, clarifying
Manish Jethani 2018/03/13 17:14:20 Done.
}
catch (error)
{
if (/\bcssOrigin\b/.test(error.message))
userStyleSheetsSupported = false;
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld