From 6a4e5a904e5bd70b342d69b1abd998827d1378dc Mon Sep 17 00:00:00 2001 From: Robert Krimen Date: Sun, 28 Apr 2013 11:25:06 +0200 Subject: [PATCH] eval.prototype === undefined --- global.go | 2 ++ global_test.go | 1 + 2 files changed, 3 insertions(+) diff --git a/global.go b/global.go index 0c1782f..28f233f 100644 --- a/global.go +++ b/global.go @@ -722,6 +722,8 @@ func newContext() *_runtime { self._newError["URIError"] = self.defineError("URIError") self.eval = self.GlobalObject.get("eval")._object() + // eval.prototype === undefined + self.eval.stash.delete("prototype") self.GlobalObject.prototype = self.Global.ObjectPrototype return self diff --git a/global_test.go b/global_test.go index a6dfcb7..735397d 100644 --- a/global_test.go +++ b/global_test.go @@ -45,6 +45,7 @@ func TestGlobal(t *testing.T) { test(`this.hasOwnProperty`, "[function]") test(`eval.length === 1`, "true") + test(`eval.prototype === undefined`, "true") } func TestGlobalLength(t *testing.T) {