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

Unified Diff: chrome/ext/background.js

Issue 5186743326212096: Issue 1843 - Deactivate "Block element" dialog when extension is disabled/uninstalled/reloaded (Closed)
Patch Set: Created Jan. 23, 2015, 9:47 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 | chrome/ext/content.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/ext/background.js
===================================================================
--- a/chrome/ext/background.js
+++ b/chrome/ext/background.js
@@ -391,6 +391,11 @@
return ext.onMessage._dispatch(message, sender, sendResponse).indexOf(true) != -1;
});
+ // We have to register any listener for the onConnect event. Otherwise
+ // you can't connect any ports. However, we need to connect from the
+ // content script, in order to detect extension reload/disable/uninstall.
+ chrome.runtime.onConnect.addListener(function() {});
kzar 2015/01/26 16:05:22 The comment doesn't read quite right, how about th
Sebastian Noack 2015/01/26 16:13:56 Doesn't read that much differently for me. But I g
+
/* Storage */
« no previous file with comments | « no previous file | chrome/ext/content.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld