diff options
author | kumavis <kumavis@users.noreply.github.com> | 2017-09-28 07:04:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-28 07:04:51 +0800 |
commit | 15b2823e546cfefd7e867f078b4385ddc6be3a0f (patch) | |
tree | 448a321264f3d648d6edee7e90c6f487bc31084b /app/scripts/contentscript.js | |
parent | 734490c58c25587a247e48eea086880bcb6a14fe (diff) | |
parent | ecf909e140b2fc99afbd15f6f0882dd17e3ecb88 (diff) | |
download | tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar.gz tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar.bz2 tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar.lz tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar.xz tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar.zst tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.zip |
Merge branch 'master' into new-currency-test
Diffstat (limited to 'app/scripts/contentscript.js')
-rw-r--r-- | app/scripts/contentscript.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 90a0f1f22..b4708189e 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -42,16 +42,21 @@ function setupStreams () { name: 'contentscript', target: 'inpage', }) - pageStream.on('error', console.error) const pluginPort = extension.runtime.connect({ name: 'contentscript' }) const pluginStream = new PortStream(pluginPort) - pluginStream.on('error', console.error) // forward communication plugin->inpage - pageStream.pipe(pluginStream).pipe(pageStream) + pump( + pageStream, + pluginStream, + pageStream, + (err) => logStreamDisconnectWarning('MetaMask Contentscript Forwarding', err) + ) // setup local multistream channels const mux = new ObjectMultiplex() + mux.setMaxListeners(25) + pump( mux, pageStream, |