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

Unified Diff: chrome/content/frameScript.js

Issue 29332893: Issue 3431 - Element Hiding Helper shutdown fails (shutdown is not a function) (Closed)
Patch Set: Fixed style Created Dec. 21, 2015, 7:01 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 | « chrome/content/actor.jsm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/frameScript.js
===================================================================
--- a/chrome/content/frameScript.js
+++ b/chrome/content/frameScript.js
@@ -14,17 +14,25 @@
addMessageListener("ElemHideHelper:Shutdown", onShutdown);
addMessageListener("ElemHideHelper:GetNodeInfo", onGetNodeInfo);
addMessageListener("ElemHideHelper:Preview", onTogglePreview);
function onShutdown()
{
shutdown();
- Cu.unload(module);
+ try
+ {
+ Cu.unload(module);
+ }
+ catch (e)
+ {
+ Cu.reportError(e);
+ }
+
removeMessageListener("ElemHideHelper:Shutdown", onShutdown);
removeMessageListener("ElemHideHelper:GetNodeInfo", onGetNodeInfo);
removeMessageListener("ElemHideHelper:Preview", onTogglePreview);
}
function onGetNodeInfo(message)
{
let nodeInfo = getNodeInfo(message.objects.element);
« no previous file with comments | « chrome/content/actor.jsm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld