diff options
author | zsfelfoldi <zsfelfoldi@gmail.com> | 2015-04-22 08:31:59 +0800 |
---|---|---|
committer | zsfelfoldi <zsfelfoldi@gmail.com> | 2015-05-06 21:58:27 +0800 |
commit | c54d123b31cc66f81de815493ab83f019190f241 (patch) | |
tree | 87d7ad9df9e580854412bb6bc8f72d20559ba556 /cmd | |
parent | 2e9ed6f7aa84519a5d209dfc9649a0381e89e8ee (diff) | |
download | dexon-c54d123b31cc66f81de815493ab83f019190f241.tar.gz dexon-c54d123b31cc66f81de815493ab83f019190f241.tar.zst dexon-c54d123b31cc66f81de815493ab83f019190f241.zip |
setTimeout and sendAsync implemented
added and eval queue for serializing JSRE vm execution
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/geth/js.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/geth/js.go b/cmd/geth/js.go index a545de1d0..d8c26eb2f 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -103,6 +103,7 @@ func (js *jsre) apiBindings() { t, _ := js.re.Get("jeth") jethObj := t.Object() jethObj.Set("send", jeth.Send) + jethObj.Set("sendAsync", jeth.Send) err := js.re.Compile("bignumber.js", re.BigNumber_JS) if err != nil { @@ -172,8 +173,10 @@ func (self *jsre) UnlockAccount(addr []byte) bool { func (self *jsre) exec(filename string) error { if err := self.re.Exec(filename); err != nil { + self.re.Stop(false) return fmt.Errorf("Javascript Error: %v", err) } + self.re.Stop(true) return nil } @@ -201,6 +204,7 @@ func (self *jsre) interactive() { if self.atexit != nil { self.atexit() } + self.re.Stop(false) } func (self *jsre) withHistory(op func(*os.File)) { |