commit 89990602e8217c5f53a07c8922b5acee677e9e38
Author: David Fifield <da...@bamsoftware.com>
Date:   Sat Mar 30 02:09:06 2019 -0600

    Throw an exception if headersFn is called more than once.
    
    Re-use the catch handler.
---
 webextension/browser/background.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/webextension/browser/background.js 
b/webextension/browser/background.js
index fd34a5d..038e548 100644
--- a/webextension/browser/background.js
+++ b/webextension/browser/background.js
@@ -168,8 +168,7 @@ async function roundtrip(params) {
         try {
             // Sanity assertion: per-request listeners are called at most once.
             if (headersCalled) {
-                console.log("headersFn called more than once");
-                return {cancel: true};
+                throw new Error("headersFn called more than once");
             }
             headersCalled = true;
 



_______________________________________________
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to