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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 "use strict"; 1 "use strict";
2 2
3 chrome.runtime.onMessage.addListener((message, sender, sendResponse) => 3 chrome.runtime.onMessage.addListener((message, sender, sendResponse) =>
4 { 4 {
5 return ext.onMessage._dispatch(message, {}, sendResponse).indexOf(true) != -1; 5 return !("tab" in sender) &&
6 ext.onMessage._dispatch(message, {}, sendResponse).indexOf(true) != -1;
6 }); 7 });
7 8
8 (function() 9 (function()
9 { 10 {
10 let port = null; 11 let port = null;
11 12
12 ext.onExtensionUnloaded = { 13 ext.onExtensionUnloaded = {
13 addListener(listener) 14 addListener(listener)
14 { 15 {
15 if (!port) 16 if (!port)
(...skipping 11 matching lines...) Expand all
27 28
28 if (!port.onDisconnect.hasListeners()) 29 if (!port.onDisconnect.hasListeners())
29 { 30 {
30 port.disconnect(); 31 port.disconnect();
31 port = null; 32 port = null;
32 } 33 }
33 } 34 }
34 } 35 }
35 }; 36 };
36 }()); 37 }());
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld