Bug 1220929 - RemotePageManager should use documentURI and allow special URLs with query params. r=Mossop

--HG--
extra : commitid : 9RNSIkfV0gx
extra : rebase_source : d0e6f112efba1d42936fc785b098a0f8217fbbaf
extra : amend_source : 1ce76fc0b6eb47a3dc189c38ee9acb6e8451ce4e
extra : histedit_source : ea64f6ecb938c791a43465d1b401491c569e7ffc
This commit is contained in:
Mike Conley 2015-11-02 20:46:37 -05:00
parent 53e0d3bab8
commit ae38391972

View File

@ -389,7 +389,7 @@ function ChildMessagePort(contentFrame, window) {
// Tell the main process to set up its side of the message pipe.
this.messageManager.sendAsyncMessage("RemotePage:InitPort", {
portID: portID,
url: window.location.toString().replace(/\#.*$/, "")
url: window.document.documentURI.replace(/[\#|\?].*$/, ""),
});
}
@ -491,7 +491,7 @@ var registeredURLs = new Set();
var observer = (window) => {
// Strip the hash from the URL, because it's not part of the origin.
let url = window.location.toString().replace(/\#.*$/, "");
let url = window.document.documentURI.replace(/[\#|\?].*$/, "");
if (!registeredURLs.has(url))
return;