From 9a761f36345c7f482fb1316113f4f692f270a5e6 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 17 Feb 2011 16:32:08 -0500 Subject: [PATCH] Fix running the REPL with certain arbitrary contexts, e.g., 'commands'. --- common/modules/javascript.jsm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/modules/javascript.jsm b/common/modules/javascript.jsm index 6503e8c8..95561a2a 100644 --- a/common/modules/javascript.jsm +++ b/common/modules/javascript.jsm @@ -4,6 +4,8 @@ // given in the LICENSE.txt file included with this file. "use strict"; +let { getOwnPropertyNames } = Object; + try { Components.utils.import("resource://dactyl/bootstrap.jsm"); @@ -334,7 +336,7 @@ var JavaScript = Module("javascript", { _complete: function (objects, key, compl, string, last) { const self = this; - if (!this.window.Object.getOwnPropertyNames && !services.debugger.isOn && !this.context.message) + if (!getOwnPropertyNames && !services.debugger.isOn && !this.context.message) this.context.message = "For better completion data, please enable the JavaScript debugger (:set jsdebugger)"; let base = this.context.fork("js", this._top.offset);