Commit 4b0ab464 authored by Shane Caraveo's avatar Shane Caraveo
Browse files

Bug 1601357 prevent self-monitoring in activityLog api r=zombie

Differential Revision: https://phabricator.services.mozilla.com/D55841

--HG--
extra : moz-landing-system : lando
parent b0376a86
......@@ -22,6 +22,12 @@ this.activityLog = class extends ExtensionAPI {
context,
name: "activityLog.onExtensionActivity",
register: (fire, id) => {
// A logger cannot log itself.
if (id === context.extension.id) {
throw new ExtensionUtils.ExtensionError(
"Extension cannot monitor itself."
);
}
function handler(details) {
fire.async(details);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment