Skip to content

Commit

Permalink
Use catch instead of finally
Browse files Browse the repository at this point in the history
On spidermonkey use of try/catch is optimized while try/finally is not.
  • Loading branch information
Gozala committed Apr 19, 2016
1 parent 3385fa2 commit 4e13b24
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/signal.js
Expand Up @@ -84,12 +84,16 @@ class Input /*::<a>*/ {
const addressBook = this.addressBook
Input.notify(value, addressBook, 0, addressBook.length)
}
} finally {
}
catch(error) {
this.isBlocked = false
if (this.queue != null && this.queue.length > 0) {
this.receive(value = this.queue.shift())
}

throw error
}
this.isBlocked = false
}
}
subscribe(address/*:Address<a>*/)/*:void*/ {
Expand Down

0 comments on commit 4e13b24

Please sign in to comment.