From 4e13b24ebc4936c1cc3a5b47363e8cedac3b32ab Mon Sep 17 00:00:00 2001 From: gozala Date: Tue, 19 Apr 2016 13:34:13 -0700 Subject: [PATCH] Use catch instead of finally On spidermonkey use of try/catch is optimized while try/finally is not. --- src/signal.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/signal.js b/src/signal.js index 1cae7d9..c21ee90 100644 --- a/src/signal.js +++ b/src/signal.js @@ -84,12 +84,16 @@ class Input /*::*/ { 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*/)/*:void*/ {