зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1142768 - Return the original document URI from ServiceWorkerClient.url; r=bkelly
This commit is contained in:
Родитель
ce49978208
Коммит
ec2c39ef0c
|
@ -46,7 +46,12 @@ ServiceWorkerClientInfo::ServiceWorkerClientInfo(nsIDocument* aDoc)
|
|||
mWindowId = innerWindow->WindowID();
|
||||
}
|
||||
|
||||
aDoc->GetURL(mUrl);
|
||||
nsCOMPtr<nsIURI> originalURI = aDoc->GetOriginalURI();
|
||||
if (originalURI) {
|
||||
nsAutoCString spec;
|
||||
originalURI->GetSpec(spec);
|
||||
CopyUTF8toUTF16(spec, mUrl);
|
||||
}
|
||||
mVisibilityState = aDoc->VisibilityState();
|
||||
|
||||
ErrorResult result;
|
||||
|
|
|
@ -1,2 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Empty doc</title>
|
||||
<!--
|
||||
Change the page URL using the History API to ensure that ServiceWorkerClient
|
||||
uses the creation URL.
|
||||
-->
|
||||
<body onload="history.pushState({}, 'title', 'new-url.html')">
|
||||
</body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче