aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-05-06 22:27:24 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-05-06 22:27:24 +0800
commitaa884c052ddf7c5e8f673972b34681982de1cd52 (patch)
tree87d7ad9df9e580854412bb6bc8f72d20559ba556 /cmd
parent2e9ed6f7aa84519a5d209dfc9649a0381e89e8ee (diff)
parentc54d123b31cc66f81de815493ab83f019190f241 (diff)
downloadgo-tangerine-aa884c052ddf7c5e8f673972b34681982de1cd52.tar
go-tangerine-aa884c052ddf7c5e8f673972b34681982de1cd52.tar.gz
go-tangerine-aa884c052ddf7c5e8f673972b34681982de1cd52.tar.bz2
go-tangerine-aa884c052ddf7c5e8f673972b34681982de1cd52.tar.lz
go-tangerine-aa884c052ddf7c5e8f673972b34681982de1cd52.tar.xz
go-tangerine-aa884c052ddf7c5e8f673972b34681982de1cd52.tar.zst
go-tangerine-aa884c052ddf7c5e8f673972b34681982de1cd52.zip
Merge pull request #771 from zsfelfoldi/develop
jsre: support for setTimeout, sendAsync
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/js.go4
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)) {