diff options
author | Dan Finlay <flyswatter@users.noreply.github.com> | 2017-09-15 10:40:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 10:40:00 +0800 |
commit | 693655e2da7cacf5a5326b50bddc37bcece9422e (patch) | |
tree | f5f6c429649af579d97eaa5940cab94dbc365a29 /app/scripts/background.js | |
parent | 1d3cd9768cdd372d02e7e34674dde9d86af536f5 (diff) | |
parent | 0687c822baf7dcde8e96afa25ebc84491a061d07 (diff) | |
download | tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar.gz tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar.bz2 tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar.lz tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar.xz tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar.zst tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.zip |
Merge pull request #2070 from MetaMask/filter-leak-fix3
Memory leak fixes - stream and filter life cycles
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r-- | app/scripts/background.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index f077ca7a8..1b96d68b5 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -1,6 +1,8 @@ const urlUtil = require('url') const endOfStream = require('end-of-stream') const pipe = require('pump') +const log = require('loglevel') +const extension = require('extensionizer') const LocalStorageStore = require('obs-store/lib/localStorage') const storeTransform = require('obs-store/lib/transform') const ExtensionPlatform = require('./platforms/extension') @@ -9,13 +11,11 @@ const migrations = require('./migrations/') const PortStream = require('./lib/port-stream.js') const NotificationManager = require('./lib/notification-manager.js') const MetamaskController = require('./metamask-controller') -const extension = require('extensionizer') const firstTimeState = require('./first-time-state') const STORAGE_KEY = 'metamask-config' const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG' -const log = require('loglevel') window.log = log log.setDefaultLevel(METAMASK_DEBUG ? 'debug' : 'warn') @@ -29,12 +29,12 @@ let popupIsOpen = false const diskStore = new LocalStorageStore({ storageKey: STORAGE_KEY }) // initialization flow -initialize().catch(console.error) +initialize().catch(log.error) async function initialize () { const initState = await loadStateFromPersistence() await setupController(initState) - console.log('MetaMask initialization complete.') + log.debug('MetaMask initialization complete.') } // |