Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Issue 1893363003: ServiceWorker: Refer to the current provider in ServiceWorkerRegistration (Closed)

Created:
4 years, 8 months ago by shimazu
Modified:
4 years, 7 months ago
Reviewers:
nhiroki
CC:
blink-reviews, chromium-reviews, falken, haraken, horo+watch_chromium.org, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, kinuko+serviceworker, michaeln, nhiroki, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ServiceWorker: Refer to the current provider in ServiceWorkerRegistration Currently |m_provider| is kept at the constructor in ServiceWorkerRegistration. Once the provider is removed (e.g. the registration is belong to an iframe and iframe.remove() is called), the registration would refer the invalid |m_provider|. This patch removes |m_provider| and gets a corresponding provider via SWContainerClient. Additionally, reject is changed to rejectWithDOMException to reject immediately. This change enables us to get DOMException on the parent frame used to own the reclaimed iframe. A test is also added for tracking the exception. BUG=603817 TEST=./third_party/WebKit/Tools/Scripts/run-webkit-tests -t Default http/tests/serviceworker/chromium/unregister-on-detached-iframe.html Committed: https://crrev.com/e0281ef6c52c10a3baf7e0a043c944ab14c9a712 Cr-Commit-Position: refs/heads/master@{#389700}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Update messsages and make unregistration synchronous #

Total comments: 4

Patch Set 3 : Concatenated the paths and auto_remove is enabled #

Total comments: 2

Patch Set 4 : Use promise_rejects instead of assert_promise_rejects #

Total comments: 2

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -18 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html View 1 2 3 1 chunk +36 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp View 1 2 3 4 3 chunks +10 lines, -17 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
shimazu
PTAL:)
4 years, 8 months ago (2016-04-19 09:08:01 UTC) #2
nhiroki
https://codereview.chromium.org/1893363003/diff/1/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html (right): https://codereview.chromium.org/1893363003/diff/1/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html#newcode11 third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html:11: var scope = 'resources/reclam-registration-after-iframe-deletion'; s/reclam/reclaim/ BTW, "reclaim-registration" might not ...
4 years, 8 months ago (2016-04-20 03:42:16 UTC) #3
shimazu
Incorporated with the comments. PTAL again. https://codereview.chromium.org/1893363003/diff/1/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html (right): https://codereview.chromium.org/1893363003/diff/1/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html#newcode11 third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html:11: var scope = ...
4 years, 8 months ago (2016-04-21 03:57:50 UTC) #4
nhiroki
https://codereview.chromium.org/1893363003/diff/1/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html (right): https://codereview.chromium.org/1893363003/diff/1/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html#newcode33 third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html:33: return assert_promise_rejects( On 2016/04/21 03:57:50, makoto wrote: > On ...
4 years, 8 months ago (2016-04-21 08:23:30 UTC) #5
nhiroki
Can you revise the description? > Currently |m_provider| is kept at the constructor in ServiceWorkerRegistration. ...
4 years, 8 months ago (2016-04-21 08:32:15 UTC) #6
shimazu
Thanks for the reviews! I also updated the description. https://codereview.chromium.org/1893363003/diff/20001/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html (right): https://codereview.chromium.org/1893363003/diff/20001/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html#newcode10 third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html:10: ...
4 years, 8 months ago (2016-04-21 09:06:36 UTC) #8
Marijn Kruisselbrink
https://codereview.chromium.org/1893363003/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html (right): https://codereview.chromium.org/1893363003/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html#newcode32 third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html:32: return assert_promise_rejects( drive-by nit: new code should probably use ...
4 years, 8 months ago (2016-04-21 16:47:19 UTC) #9
shimazu
https://codereview.chromium.org/1893363003/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html (right): https://codereview.chromium.org/1893363003/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html#newcode32 third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html:32: return assert_promise_rejects( On 2016/04/21 16:47:18, Marijn Kruisselbrink wrote: > ...
4 years, 8 months ago (2016-04-22 05:44:02 UTC) #10
nhiroki
lgtm https://codereview.chromium.org/1893363003/diff/60001/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html (right): https://codereview.chromium.org/1893363003/diff/60001/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html#newcode28 third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html:28: scope_for_iframe); +2 space indents
4 years, 7 months ago (2016-04-25 04:56:35 UTC) #11
shimazu
https://codereview.chromium.org/1893363003/diff/60001/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html (right): https://codereview.chromium.org/1893363003/diff/60001/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html#newcode28 third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/unregister-on-detached-iframe.html:28: scope_for_iframe); On 2016/04/25 04:56:35, nhiroki wrote: > +2 space ...
4 years, 7 months ago (2016-04-26 02:33:29 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1893363003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1893363003/80001
4 years, 7 months ago (2016-04-26 02:33:56 UTC) #15
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-04-26 05:02:29 UTC) #17
commit-bot: I haz the power
4 years, 7 months ago (2016-04-26 05:03:53 UTC) #19
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/e0281ef6c52c10a3baf7e0a043c944ab14c9a712
Cr-Commit-Position: refs/heads/master@{#389700}

Powered by Google App Engine
This is Rietveld 408576698