Ariella Vu
|
a87c1750b0
|
MV3: Update service worker restart logic and keep-alive logic for dapp support (#16075)
* dapp: add debug statements
* dapp: add retry logic [debug]
* dapp: keep SW alive on rpc request
* Revert "dapp: add debug statements"
This reverts commit ea21786f7f66c712eea02405cd68fe925d227ffa.
* dapp: try to set up ext streams asap on reset
* dapp: apply keep alive logic to phishingPageStream
* dapp:put keep-alive logic behind isManifestV3 flag
* Re-activate streams after a period of service worker in-activity
* dapp: rm extra function
* dapp: update phishing onDisconnect
* dapp: fix eslint missing global chrome
* add EXTENSION_MESSAGES const
* use EXTENSION_MESSAGES more generic comment
* update comment
* dapp: clean timeout and interval
* Fix DAPP action replay
* execute DAPP action replay for only MV3
* fix
* fix
* fix
* comment out DAPP action replay code
* fix
* fix
* fix
* scripts/background: use browser polyfill
* Revert "scripts/background: use browser polyfill"
This reverts commit 2ab6234d11b3b11e10dd993d454eeaad63bfc886.
* scripts/background: use browser polyfill
* script/background: check lastError
* dapp: use EXTENSION_MESSAGES
* scripts/background: send ready msg to all tabs
* dapp: update onMessage handler comment and name
* dapp: return values onMessage listener
see: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage#addlistener_syntax
* dapp: mv onMessage listener
* dapp: add onMessage setupPhishingExtStreams
* dapp: rn reset -> destroy streams
* dapp: rn reset -> destroy for phishing streams
* dapp: clean comment
* dapp: rm unused comments
planning to be readded in follow-up PR: #16250
* dapp: onMessage return Promise|undefined
* dapp:clean: add missing undefined return type
* dapp: use new checkForErrorAndLog for Chrome API
handy stackoverflow: https://stackoverflow.com/a/28432087/4053142
* dapp:fix: return tabs.query result
* dapp:eslint: return undefined
fix Expected to return a value at the end of arrow
function.eslintconsistent-return
* background: do not query tabs w/out url
* background: rm Could not establish... catch
- no longer needed after improved tabs query
* dapp:clean: rm unused checkForError... for now...
* dapp: prevent setupExtensionStreams called twice
- calling connect will trigger disconnect and may cause issues
- only setup streams if they are not connected
* dapp: handle onDisconnect lastError
- throwing errors from contentscript will break the dapp, so only warn
- not handling lastError when it's found will also break the dapp
* background: update tabs.query url comment
* background: update tabs.query url comment 2
* dapp: fix SW restart for multi dapp support
- ref: https://stackoverflow.com/a/54686484/4053142
* dapp:clean: rm extra "." from console.warn
* clean: comments for dapp and background
* Adding catch block (#16454)
* fix: FireFox provider injection
* lib/util: fix invalid checkForErrorAndWarn export
* bg: add explanation for tabs.sendMessage catch
* dapp: add browser-runtime.utils
* runtime.utils: add checkForLastErrorAndLog
Co-authored-by: Jyoti Puri <jyotipuri@gmail.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
|
2022-11-15 00:18:08 +07:00 |
|