summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-07-03 11:57:15 -0400
committerGitHub <noreply@github.com>2020-07-03 11:57:15 -0400
commit897d85d1ac82dd2e757eefe99e4a6ac3e5e0c486 (patch)
tree00feb8a41f84bf20c3dd43127021e5d6d798ed2d /ext/bg/js
parentc13160d784caf5ca2803081171d1c01eb91f49c6 (diff)
Util refactor and fix (#638)
* Remove unused functions * Fix clone function not being visible on the window object
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/util.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index fa31b0d8..a0f31653 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -15,33 +15,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-function utilFunctionIsolate(func) {
- return function isolatedFunction(...args) {
- try {
- args = args.map((v) => clone(v));
- return func.call(this, ...args);
- } catch (e) {
- try {
- String(func);
- } catch (e2) {
- // Dead object
- return;
- }
- throw e;
- }
- };
-}
-
function utilBackgroundIsolate(data) {
const backgroundPage = chrome.extension.getBackgroundPage();
return backgroundPage.clone(data);
}
-function utilBackgroundFunctionIsolate(func) {
- const backgroundPage = chrome.extension.getBackgroundPage();
- return backgroundPage.utilFunctionIsolate(func);
-}
-
function utilBackend() {
const backend = chrome.extension.getBackgroundPage().yomichanBackend;
if (!backend.isPrepared()) {