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

Unified Diff: ext/content.js

Issue 29482663: Issue 5386 - Ignore messages from content scripts in devtools panel (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created July 7, 2017, 3:11 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: ext/content.js
===================================================================
--- a/ext/content.js
+++ b/ext/content.js
@@ -1,13 +1,14 @@
"use strict";
chrome.runtime.onMessage.addListener((message, sender, sendResponse) =>
{
- return ext.onMessage._dispatch(message, {}, sendResponse).indexOf(true) != -1;
+ return !("tab" in sender) &&
+ ext.onMessage._dispatch(message, {}, sendResponse).indexOf(true) != -1;
});
(function()
{
let port = null;
ext.onExtensionUnloaded = {
addListener(listener)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld