aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/contentscript.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-09-28 07:04:51 +0800
committerGitHub <noreply@github.com>2017-09-28 07:04:51 +0800
commit15b2823e546cfefd7e867f078b4385ddc6be3a0f (patch)
tree448a321264f3d648d6edee7e90c6f487bc31084b /app/scripts/contentscript.js
parent734490c58c25587a247e48eea086880bcb6a14fe (diff)
parentecf909e140b2fc99afbd15f6f0882dd17e3ecb88 (diff)
downloadtangerine-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.js11
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,