mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
b27f23d520
Upon start-up, uBlock runs all content scripts in manifest.json using `chrome.tabs.executeScript`. When this API is used, the value of the last expression is automatically cloned and transferred to the callback of `chrome.tabs.executeScript`. This is convenient if needed, and a performance burden otherwise (the latter is the case for uBlock). There are three content scripts that need to be checked: - vapi.js The last expression is often the vAPI object, and it is relatively expensive to clone this object. This commit sets the value of the last expression to `void 0` to solve this inefficiency. - vapi-client.js No action needed yet; The last expression is `vAPI.shutdown.add(...)`, which has a void return value. - contentscript.js No action needed yet; The last expression is an immediately-invoked function expression without return value. |
||
---|---|---|
.. | ||
img/browsericons | ||
is-webrtc-supported.html | ||
is-webrtc-supported.js | ||
managed_storage.json | ||
manifest.json | ||
options_ui.html | ||
options_ui.js | ||
vapi-background.js | ||
vapi-cachestorage.js | ||
vapi-client.js | ||
vapi-common.js | ||
vapi-usercss.js | ||
vapi-usercss.pseudo.js | ||
vapi-usercss.real.js | ||
vapi-webrequest.js | ||
vapi.js |