mirror of
https://github.com/robertkrimen/otto
synced 2025-10-12 20:27:30 +08:00
eval.prototype === undefined
This commit is contained in:
parent
2c4c22ca81
commit
6a4e5a904e
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user