From be9cfe072d1e3b1743d118eddc8eb52a9f3d6a47 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 3 Jun 2017 16:57:52 +0300 Subject: [PATCH] openURL should not redirect incognito NTP to chrome URLs --- messaging.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/messaging.js b/messaging.js index 5e4766c3..72a0fa0a 100644 --- a/messaging.js +++ b/messaging.js @@ -143,7 +143,8 @@ function openURL({url, currentWindow = true}) { } getActiveTab().then(tab => { if (tab && tab.url == 'chrome://newtab/' - && (!url.startsWith(URLS.ownOrigin) || !tab.incognito)) { + // prevent redirecting incognito NTP to a chrome URL as it crashes Chrome + && (!url.startsWith('chrome') || !tab.incognito)) { chrome.tabs.update({url}, resolve); } else { chrome.tabs.create(tab && !FIREFOX ? {url, openerTabId: tab.id} : {url}, resolve);