From 8e73fb32b58dedf08b3538808b706950ef647a9a Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 1 Apr 2017 10:00:09 -0400 Subject: [PATCH] fix https://bugs.chromium.org/p/project-zero/issues/detail?id=1225&desc=6#c10 --- platform/chromium/vapi-common.js | 9 +++++++-- platform/firefox/vapi-common.js | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/platform/chromium/vapi-common.js b/platform/chromium/vapi-common.js index 803081a28..70fa49292 100644 --- a/platform/chromium/vapi-common.js +++ b/platform/chromium/vapi-common.js @@ -1,7 +1,7 @@ /******************************************************************************* uBlock Origin - a browser extension to block requests. - Copyright (C) 2014-2016 The uBlock Origin authors + Copyright (C) 2014-2017 The uBlock Origin authors This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,7 +28,12 @@ (function() { -var vAPI = self.vAPI = self.vAPI || {}; +// https://bugs.chromium.org/p/project-zero/issues/detail?id=1225&desc=6#c10 +if ( !self.vAPI || !self.vAPI.uBO ) { + self.vAPI = { uBO: true }; +} + +var vAPI = self.vAPI; var chrome = self.chrome; /******************************************************************************/ diff --git a/platform/firefox/vapi-common.js b/platform/firefox/vapi-common.js index 5ba6ba795..6fc7f5b85 100644 --- a/platform/firefox/vapi-common.js +++ b/platform/firefox/vapi-common.js @@ -1,7 +1,7 @@ /******************************************************************************* uBlock Origin - a browser extension to block requests. - Copyright (C) 2014-2016 The uBlock Origin authors + Copyright (C) 2014-2017 The uBlock Origin authors This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,7 +36,12 @@ const {Services} = Components.utils.import( null ); -var vAPI = self.vAPI = self.vAPI || {}; +// https://bugs.chromium.org/p/project-zero/issues/detail?id=1225&desc=6#c10 +if ( !self.vAPI || !self.vAPI.uBO ) { + self.vAPI = { uBO: true }; +} + +var vAPI = self.vAPI; /******************************************************************************/