Index: lib/child/main.js |
=================================================================== |
--- a/lib/child/main.js |
+++ b/lib/child/main.js |
@@ -10,14 +10,22 @@ |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
* GNU General Public License for more details. |
* |
* You should have received a copy of the GNU General Public License |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
-require("child/elemHide"); |
-require("child/contentPolicy"); |
-require("child/contextMenu"); |
-require("child/dataCollector"); |
-require("child/cssProperties"); |
-require("child/subscribeLinks"); |
+let {port} = require("messaging"); |
+ |
+// Only initialize after receiving a "response" to a dummy message - this makes |
+// sure that on update the old version has enough time to receive and process |
+// the shutdown message. |
+port.emitWithResponse("ping").then(() => |
Thomas Greiner
2016/04/20 14:38:35
Where is the code that responds to the "ping" even
Wladimir Palant
2016/04/20 14:41:40
There is none, we don't need a response. Or, if yo
|
+{ |
+ require("child/elemHide"); |
+ require("child/contentPolicy"); |
+ require("child/contextMenu"); |
+ require("child/dataCollector"); |
+ require("child/cssProperties"); |
+ require("child/subscribeLinks"); |
+}); |