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

Delta Between Two Patch Sets: lib/messaging.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Left Patch Set: Addressed some of Sebastian's feedback, made other improvements Created Feb. 20, 2017, 10:06 a.m.
Right Patch Set: Use .includes again Created March 31, 2017, 8:37 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « lib/io.js ('k') | lib/notificationHelper.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 sendResponse, 49 sendResponse,
50 reason => 50 reason =>
51 { 51 {
52 console.error(reason); 52 console.error(reason);
53 sendResponse(undefined); 53 sendResponse(undefined);
54 } 54 }
55 ); 55 );
56 async = true; 56 async = true;
57 } 57 }
58 else if (typeof response != "undefined") 58 else if (typeof response != "undefined")
59 {
59 sendResponse(response); 60 sendResponse(response);
61 }
60 } 62 }
61 63
62 return async; 64 return async;
63 }, 65 },
64 66
65 /** 67 /**
66 * Function to be called when a particular message is received. 68 * Function to be called when a particular message is received.
67 * 69 *
68 * @callback Port~messageCallback 70 * @callback Port~messageCallback
69 * @param {object} message 71 * @param {object} message
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 exports.getPort = function(window) 123 exports.getPort = function(window)
122 { 124 {
123 let port = new Port(); 125 let port = new Port();
124 window.addEventListener("unload", () => 126 window.addEventListener("unload", () =>
125 { 127 {
126 port.disconnect(); 128 port.disconnect();
127 }); 129 });
128 return port; 130 return port;
129 }; 131 };
130 132
LEFTRIGHT

Powered by Google App Engine
This is Rietveld