From cdf69d83204edfe13861be9361c027627d697440 Mon Sep 17 00:00:00 2001 From: Brian Clifton Date: Thu, 14 Dec 2017 23:02:49 -0700 Subject: [PATCH] Merge pull request #12256 from bsclifton/fix/c63httpse Don't ignore internal requests in app/filtering --- app/filtering.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/filtering.js b/app/filtering.js index 4fd57ae5bb5..16723a7bd22 100644 --- a/app/filtering.js +++ b/app/filtering.js @@ -674,11 +674,6 @@ module.exports.initPartition = initPartition const filterableProtocols = ['http:', 'https:', 'ws:', 'wss:', 'magnet:', 'file:'] function shouldIgnoreUrl (details) { - // internal requests - if (details.tabId === -1) { - return true - } - // data:, is a special origin from SecurityOrigin::urlWithUniqueSecurityOrigin // and usually occurs when there is an https in an http main frame if (details.firstPartyUrl === 'data:,') { @@ -860,10 +855,10 @@ module.exports.getMainFrameUrl = (details) => { return details.url } const tab = webContents.fromTabID(details.tabId) - if (tab && !tab.isDestroyed()) { + try { return tab.getURL() - } - return null + } catch (ex) {} + return details.firstPartyUrl || null } module.exports.alwaysAllowFullscreen = () => {