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

Issue 271533002: Make ScriptLoader into a ResourceOwner (Closed)

Created:
6 years, 7 months ago by Hajime Morrita
Modified:
6 years, 7 months ago
Reviewers:
Nate Chapin, eseidel
CC:
blink-reviews, blink-reviews-html_chromium.org, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, rwlbuis
Visibility:
Public.

Description

Make ScriptLoader into a ResourceOwner This change turns ScriptLoader a ResourceOwner, that ensures that it subscribes Resource if the owner has a reference to it, and that it unsubscribes the Resource otherwise. Before this change, There are some situation where ScriptLoader has a reference to Resource but doesn't subscribe it, that is error prone and left deleted instance being subscribed. ResourceOwner guarantees reference and subscription consistency. TEST=script-cancel-crash.html BUG=368551 R=eseidel@chromium.org, japhet@chromium.org, esprehn@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173566

Patch Set 1 #

Total comments: 5

Patch Set 2 : Landing #

Patch Set 3 : Updated to ToT #

Patch Set 4 : With a fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -76 lines) Patch
A LayoutTests/fast/dom/HTMLScriptElement/script-cancel-crash.html View 1 chunk +32 lines, -0 lines 0 comments Download
A + LayoutTests/fast/dom/HTMLScriptElement/script-cancel-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/core/dom/ScriptLoader.h View 1 6 chunks +27 lines, -6 lines 0 comments Download
M Source/core/dom/ScriptLoader.cpp View 1 2 3 13 chunks +47 lines, -51 lines 0 comments Download
M Source/core/fetch/ResourceOwner.h View 1 2 3 3 chunks +10 lines, -5 lines 0 comments Download
M Source/core/html/parser/HTMLScriptRunner.h View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/html/parser/HTMLScriptRunner.cpp View 1 4 chunks +9 lines, -10 lines 0 comments Download
M Source/core/xml/parser/XMLDocumentParser.cpp View 1 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Hajime Morrita
6 years, 7 months ago (2014-05-07 00:12:53 UTC) #1
Hajime Morrita
@esprehn: Could you take a look? I hope this stops recent ScriptLoader crash.
6 years, 7 months ago (2014-05-07 17:06:39 UTC) #2
eseidel
This ResourceOwner thing must be relatively new. This CL lgtm, but Nate is a much ...
6 years, 7 months ago (2014-05-07 17:23:07 UTC) #3
Hajime Morrita
On 2014/05/07 17:23:07, eseidel wrote: > This ResourceOwner thing must be relatively new. > Yep. ...
6 years, 7 months ago (2014-05-07 17:29:37 UTC) #4
Nate Chapin
The logic LGTM, just a couple of api questions. https://codereview.chromium.org/271533002/diff/1/Source/core/dom/ScriptLoader.cpp File Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/271533002/diff/1/Source/core/dom/ScriptLoader.cpp#newcode409 Source/core/dom/ScriptLoader.cpp:409: ...
6 years, 7 months ago (2014-05-07 18:13:10 UTC) #5
Hajime Morrita
Nate, thanks for the review. I'll fix them and land. https://codereview.chromium.org/271533002/diff/1/Source/core/dom/ScriptLoader.h File Source/core/dom/ScriptLoader.h (right): https://codereview.chromium.org/271533002/diff/1/Source/core/dom/ScriptLoader.h#newcode49 ...
6 years, 7 months ago (2014-05-07 18:27:28 UTC) #6
Hajime Morrita
The CQ bit was checked by morrita@chromium.org
6 years, 7 months ago (2014-05-07 18:48:05 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/morrita@chromium.org/271533002/20001
6 years, 7 months ago (2014-05-07 18:48:59 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-07 19:58:50 UTC) #9
Hajime Morrita
The CQ bit was checked by morrita@chromium.org
6 years, 7 months ago (2014-05-07 20:11:07 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/morrita@chromium.org/271533002/40001
6 years, 7 months ago (2014-05-07 20:12:10 UTC) #11
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-07 21:51:29 UTC) #12
Hajime Morrita
On 2014/05/07 21:51:29, I haz the power (commit-bot) wrote: > FYI, CQ is re-trying this ...
6 years, 7 months ago (2014-05-07 21:55:50 UTC) #13
Hajime Morrita
The CQ bit was checked by morrita@chromium.org
6 years, 7 months ago (2014-05-07 22:13:45 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/morrita@chromium.org/271533002/60001
6 years, 7 months ago (2014-05-07 22:14:35 UTC) #15
Hajime Morrita
6 years, 7 months ago (2014-05-07 22:18:30 UTC) #16
Message was sent while issue was closed.
Committed patchset #4 manually as r173566 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698