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

Issue 288673002: Make ScriptLoader into a ResourceOwner (Closed)

Created:
6 years, 7 months ago by Hajime Morrita
Modified:
6 years, 7 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, gavinp+loader_chromium.org, Nate Chapin, 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. This is the second attempt to land this change. The original one was reverted at r173996 because it caused a lot of crashes. These crahses shouldn't happen with this revised version. TEST=script-cancel-crash.html BUG=368551, 372242 TBR=eseidel@chromium.org, japhet@chromium.org, dglazkov@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174019

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -77 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 6 chunks +27 lines, -6 lines 0 comments Download
M Source/core/dom/ScriptLoader.cpp View 13 chunks +47 lines, -51 lines 0 comments Download
M Source/core/fetch/ResourceOwner.h View 4 chunks +11 lines, -6 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 4 chunks +9 lines, -10 lines 0 comments Download
M Source/core/xml/parser/XMLDocumentParser.cpp View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Hajime Morrita
The CQ bit was checked by morrita@chromium.org
6 years, 7 months ago (2014-05-14 08:14:24 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/morrita@chromium.org/288673002/1
6 years, 7 months ago (2014-05-14 08:14:37 UTC) #2
Hajime Morrita
The CQ bit was unchecked by morrita@chromium.org
6 years, 7 months ago (2014-05-14 09:53:48 UTC) #3
Hajime Morrita
The CQ bit was checked by morrita@chromium.org
6 years, 7 months ago (2014-05-14 09:53:48 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/morrita@chromium.org/288673002/1
6 years, 7 months ago (2014-05-14 09:54:06 UTC) #5
commit-bot: I haz the power
6 years, 7 months ago (2014-05-14 11:07:37 UTC) #6
Message was sent while issue was closed.
Change committed as 174019

Powered by Google App Engine
This is Rietveld 408576698