diff --git a/common/content/buffer.js b/common/content/buffer.js index 1642f3118..2cf6277d9 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1814,6 +1814,9 @@ const Buffer = Module("buffer", { }); /* Expose Buffer constructor */ -Object.defineProperty(this, "Buffer", { value: Buffer }); +Object.defineProperty(modules, "Buffer", { + value: Buffer, + enumerable: true +}); // vim: set fdm=marker sw=4 ts=4 et: diff --git a/common/content/commands.js b/common/content/commands.js index 45dcd7fca..388cb4726 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -1188,7 +1188,10 @@ const Commands = Module("commands", { (function () { /* Expose Command constructor for user-defined sub-commands. */ - Object.defineProperty(this, "Command", { value: Command }); + Object.defineProperty(modules, "Command", { + value: Command, + enumerable: true + }); Commands.quoteMap = { "\n": "n",