mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-02 17:19:38 +02:00
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. |
||
---|---|---|
.. | ||
chromium | ||
firefox | ||
opera | ||
safari | ||
webext |