1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00

eval.prototype === undefined

This commit is contained in:
Robert Krimen 2013-04-28 11:25:06 +02:00
parent 2c4c22ca81
commit 6a4e5a904e
2 changed files with 3 additions and 0 deletions

View File

@ -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

View File

@ -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) {