| Index: safari/ext/background.js |
| =================================================================== |
| --- a/safari/ext/background.js |
| +++ b/safari/ext/background.js |
| @@ -167,34 +167,11 @@ |
| var pages = Object.create(null); |
| var pageCounter = 0; |
| - var Frame = function(url, parent) |
|
Sebastian Noack
2016/01/14 17:27:21
Note that all changes in this file are the result
|
| - { |
| - this._urlString = url; |
| - this._urlObj = null; |
| - |
| - this.parent = parent; |
| - } |
| - Frame.prototype = { |
| - get url() |
| - { |
| - // On Safari 6 and before, the URL constuctor doesn't exist. |
| - // The "urls" module provides a polifill, but it might not |
| - // be loaded yet. So we have to lazily parse URLs. |
| - if (!this._urlObj) |
| - { |
| - this._urlObj = new URL(this._urlString); |
| - this._urlString = null; |
| - } |
| - |
| - return this._urlObj; |
| - } |
| - }; |
| - |
| var Page = function(id, tab, url) |
| { |
| this._id = id; |
| this._tab = tab; |
| - this._frames = [new Frame(url, null)]; |
| + this._frames = [{url: new URL(url), parent: null}]; |
| if (tab.page) |
| this._messageProxy = new ext._MessageProxy(tab.page); |
| @@ -644,7 +621,7 @@ |
| } |
| frameId = page._frames.length; |
| - page._frames.push(new Frame(message.url, parentFrame)); |
| + page._frames.push({url: new URL(message.url), parent: parentFrame}); |
| } |
| event.message = {pageId: pageId, frameId: frameId}; |
| break; |