Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: ext/background.js

Issue 29458601: Issue 5315 - Add support for Microsoft Edge (Closed)
Patch Set: Make copyProperties more generic Created June 21, 2017, 11:34 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ext/background.js
===================================================================
--- a/ext/background.js
+++ b/ext/background.js
@@ -617,7 +617,9 @@
{
sender.page = new Page(rawSender.tab);
sender.frame = {
- url: new URL(rawSender.url),
+ // In Edge requests from internal extension pages
+ // (protocol ms-browser-extension://) do no have a sender URL.
+ url: rawSender.url ? new URL(rawSender.url) : null,
get parent()
{
let frames = framesOfTabs.get(rawSender.tab.id);
@@ -699,7 +701,10 @@
{
chrome.windows.getLastFocused(win =>
{
- let optionsUrl = chrome.extension.getURL("options.html");
+ // NOTE: we expect this else branch to run only on Edge.
kzar 2017/06/22 11:23:37 Isn't this comment kind of the same as the one on
Oleksandr 2017/06/22 13:34:59 Done.
+ // We are not using extension.getURL here because of the Edge issue:
+ // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10276332/
+ let optionsUrl = "options.html";
let queryInfo = {url: optionsUrl};
// extension pages can't be accessed in incognito windows. In order to

Powered by Google App Engine
This is Rietveld