Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Bug 647180 - Exceptions in context-menu context listeners interfere w…
Browse files Browse the repository at this point in the history
…ith the context menu. r=myk
  • Loading branch information
0c0w3 committed Apr 4, 2011
1 parent ee2e610 commit 61a2a43
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/addon-kit/lib/context-menu.js
Expand Up @@ -474,9 +474,15 @@ const ContextMenuWorker = Worker.compose({
// true. popupNode is the node that was context-clicked.
isAnyContextCurrent: function CMW_isAnyContextCurrent(popupNode) {
let listeners = this._port._listeners("context");
for (let i = 0; i < listeners.length; i++)
if (listeners[i].call(this._port._sandbox, popupNode))
return true;
for (let i = 0; i < listeners.length; i++) {
try {
if (listeners[i].call(this._port._sandbox, popupNode))
return true;
}
catch (err) {
console.exception(err);
}
}
return false;
},

Expand Down

0 comments on commit 61a2a43

Please sign in to comment.