Use the Navigator's frame in navigator.serviceWorker and associated container.
NavigatorServiceWorker's use of CallWith=ExecutionContext meant the container was configured depending on how it was accessed: for example, navigator.serviceWorker would associate it with the frame's execution context; but iframe.contentWindow.navigator.serviceWorker, window.opener.navigator.serviceWorker, window.parent.navigator.serviceWorker, etc. would associate it with a different execution context. This change always retrieves the execution context from the frame associated with the Navigator object. Separately, the ServiceWorkerContainerClient was a supplement to the page, which meant a main frame and an iframe could end up sharing a ServiceWorkerContainerClient, violating the assumption of a 1:1 relationship between provider and client. This change associates it with the document. BUG=358979 Review URL: https://codereview.chromium.org/213223005 git-svn-id: svn://svn.chromium.org/blink/trunk@170641 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment