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

Issue 298863010: Oilpan: have PendingScripts trace their script elements. (Closed)

Created:
6 years, 7 months ago by sof
Modified:
6 years, 6 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, rwlbuis, tonyg, Hajime Morrita
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Oilpan: have PendingScripts trace their script elements. To complete the move to transition types for Element in html/ and dom/, convert PendingScript and the script runner objects to trace their embedded script element references. The script runner objects (ScriptRunner and HTMLScriptRunner) are now garbage collected objects, with PendingScript being kept in-line or as a part objects of those runner objects. To enable detaching of HTMLScriptRunner without having to rely on its host (HTMLDocumentParser), the HTMLScriptRunner is instead made the client of the resources it loads. This simplifies dependencies, but requiring some follow-on changes to the HTMLScriptRunnerHost interface. Besides script element references, convert a few other remaining Element {Pass}RefPtr uses to transition types. R=ager@chromium.org,haraken@chromium.org,eseidel@chromium.org BUG=357163 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175127

Patch Set 1 #

Patch Set 2 : PendingScript is now a part object #

Patch Set 3 : Also trace document's script runner #

Patch Set 4 : Add PendingScript::m_element comment + GC plugin annotation. #

Total comments: 7

Patch Set 5 : Make HTMLScriptRunner a ResourceClient #

Total comments: 30

Patch Set 6 : Improve comment + code style #

Total comments: 7

Patch Set 7 : Trace HTMLScriptRunnerHost from HTMLScriptRunner #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -80 lines) Patch
M Source/core/dom/Document.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 6 3 chunks +1 line, -2 lines 0 comments Download
M Source/core/dom/PendingScript.h View 1 3 4 3 chunks +7 lines, -3 lines 0 comments Download
M Source/core/dom/PendingScript.cpp View 1 3 4 2 chunks +6 lines, -1 line 0 comments Download
M Source/core/dom/ScriptLoader.cpp View 1 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/dom/ScriptRunner.h View 1 2 3 4 3 chunks +12 lines, -4 lines 0 comments Download
M Source/core/dom/ScriptRunner.cpp View 1 2 3 4 4 chunks +11 lines, -8 lines 0 comments Download
M Source/core/html/HTMLImageLoader.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLSelectElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLTableSectionElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLViewSourceDocument.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/html/HTMLViewSourceDocument.cpp View 1 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/html/parser/HTMLDocumentParser.h View 1 2 3 4 5 6 3 chunks +4 lines, -7 lines 0 comments Download
M Source/core/html/parser/HTMLDocumentParser.cpp View 1 2 3 4 5 6 3 chunks +3 lines, -15 lines 0 comments Download
M Source/core/html/parser/HTMLScriptRunner.h View 1 2 3 4 5 6 4 chunks +14 lines, -7 lines 0 comments Download
M Source/core/html/parser/HTMLScriptRunner.cpp View 1 2 3 4 5 6 5 chunks +39 lines, -10 lines 0 comments Download
M Source/core/html/parser/HTMLScriptRunnerHost.h View 1 2 3 4 5 6 1 chunk +5 lines, -9 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
sof
Please take a look. I think I'm comfortable with PendingScript as handled here, but perhaps ...
6 years, 7 months ago (2014-05-25 16:39:31 UTC) #1
haraken
https://codereview.chromium.org/298863010/diff/60001/Source/core/dom/PendingScript.h File Source/core/dom/PendingScript.h (right): https://codereview.chromium.org/298863010/diff/60001/Source/core/dom/PendingScript.h#newcode113 Source/core/dom/PendingScript.h:113: // PendingScript off heap, along with its immediate owner. ...
6 years, 7 months ago (2014-05-26 01:08:24 UTC) #2
sof
https://codereview.chromium.org/298863010/diff/60001/Source/core/dom/PendingScript.h File Source/core/dom/PendingScript.h (right): https://codereview.chromium.org/298863010/diff/60001/Source/core/dom/PendingScript.h#newcode113 Source/core/dom/PendingScript.h:113: // PendingScript off heap, along with its immediate owner. ...
6 years, 7 months ago (2014-05-26 09:41:33 UTC) #3
Mads Ager (chromium)
On 2014/05/26 09:41:33, sof wrote: > https://codereview.chromium.org/298863010/diff/60001/Source/core/dom/PendingScript.h > File Source/core/dom/PendingScript.h (right): > > https://codereview.chromium.org/298863010/diff/60001/Source/core/dom/PendingScript.h#newcode113 > ...
6 years, 7 months ago (2014-05-26 10:46:30 UTC) #4
Mads Ager (chromium)
Can we move ScriptRunner to the heap, I'm not sure why that one would cause ...
6 years, 7 months ago (2014-05-26 13:55:36 UTC) #5
sof
https://codereview.chromium.org/298863010/diff/60001/Source/core/dom/PendingScript.h File Source/core/dom/PendingScript.h (right): https://codereview.chromium.org/298863010/diff/60001/Source/core/dom/PendingScript.h#newcode113 Source/core/dom/PendingScript.h:113: // PendingScript off heap, along with its immediate owner. ...
6 years, 7 months ago (2014-05-26 21:10:18 UTC) #6
tkent
We need to move the content of ~HTMLScriptRunner to HTMLScriptRunner::detach, and make sure HTMLDocumentParser::detach is ...
6 years, 7 months ago (2014-05-27 01:04:45 UTC) #7
sof
On 2014/05/27 01:04:45, tkent wrote: > We need to move the content of ~HTMLScriptRunner to ...
6 years, 7 months ago (2014-05-27 08:30:52 UTC) #8
sof
https://codereview.chromium.org/298863010/diff/60001/Source/core/dom/ScriptRunner.h File Source/core/dom/ScriptRunner.h (right): https://codereview.chromium.org/298863010/diff/60001/Source/core/dom/ScriptRunner.h#newcode44 Source/core/dom/ScriptRunner.h:44: class ScriptRunner { On 2014/05/26 13:55:36, Mads Ager (chromium) ...
6 years, 7 months ago (2014-05-27 08:31:03 UTC) #9
sof
https://codereview.chromium.org/298863010/diff/80001/Source/core/html/parser/HTMLDocumentParser.h File Source/core/html/parser/HTMLDocumentParser.h (left): https://codereview.chromium.org/298863010/diff/80001/Source/core/html/parser/HTMLDocumentParser.h#oldcode145 Source/core/html/parser/HTMLDocumentParser.h:145: // ResourceClient Will remove this line.
6 years, 7 months ago (2014-05-27 08:41:18 UTC) #10
tkent
On 2014/05/27 08:30:52, sof wrote: > On 2014/05/27 01:04:45, tkent wrote: > > We need ...
6 years, 7 months ago (2014-05-27 12:19:26 UTC) #11
Mads Ager (chromium)
On 2014/05/27 12:19:26, tkent wrote: > On 2014/05/27 08:30:52, sof wrote: > > On 2014/05/27 ...
6 years, 7 months ago (2014-05-27 12:34:17 UTC) #12
sof
japhet, abarth: in order to make finalization of HTMLScriptRunner objects possible with Oilpan enabled, HTMLScriptRunner ...
6 years, 7 months ago (2014-05-27 12:44:14 UTC) #13
Mads Ager (chromium)
Here is a null pointer crash that I just caught in my oilpan build. We ...
6 years, 7 months ago (2014-05-27 12:48:59 UTC) #14
sof
On 2014/05/27 12:48:59, Mads Ager (chromium) wrote: > Here is a null pointer crash that ...
6 years, 7 months ago (2014-05-27 13:03:18 UTC) #15
tkent
+eseidel, morrita We have a similar crash without Oilpan. crbug.com/376143.
6 years, 7 months ago (2014-05-27 23:31:49 UTC) #16
sof
tkent: are you ok with moving ahead with this CL?
6 years, 6 months ago (2014-05-28 08:16:47 UTC) #17
tkent
On 2014/05/28 08:16:47, sof wrote: > tkent: are you ok with moving ahead with this ...
6 years, 6 months ago (2014-05-28 22:18:26 UTC) #18
eseidel
lgtm I'm not sure I have all this paged back into my mind, but what ...
6 years, 6 months ago (2014-05-28 22:43:38 UTC) #19
haraken
https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/PendingScript.h File Source/core/dom/PendingScript.h (right): https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/PendingScript.h#newcode48 Source/core/dom/PendingScript.h:48: ALLOW_ONLY_INLINE_ALLOCATION(); I think you need to add WTF_ALLOW_INIT_WITH_MEM_FUNCTION (which ...
6 years, 6 months ago (2014-05-29 01:46:08 UTC) #20
sof
Thanks for the reviews. I hope I've managed to clarify some issues and problems when ...
6 years, 6 months ago (2014-05-29 06:02:06 UTC) #21
haraken
LGTM with some questions. https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/ScriptRunner.h File Source/core/dom/ScriptRunner.h (right): https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/ScriptRunner.h#newcode70 Source/core/dom/ScriptRunner.h:70: // PendingScript does have a ...
6 years, 6 months ago (2014-05-29 11:32:07 UTC) #22
sof
https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/ScriptRunner.h File Source/core/dom/ScriptRunner.h (right): https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/ScriptRunner.h#newcode70 Source/core/dom/ScriptRunner.h:70: // PendingScript does have a (trivial) destructor, however. On ...
6 years, 6 months ago (2014-05-29 20:39:54 UTC) #23
haraken
https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/ScriptRunner.h File Source/core/dom/ScriptRunner.h (right): https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/ScriptRunner.h#newcode70 Source/core/dom/ScriptRunner.h:70: // PendingScript does have a (trivial) destructor, however. On ...
6 years, 6 months ago (2014-05-30 01:28:50 UTC) #24
sof
https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/ScriptRunner.h File Source/core/dom/ScriptRunner.h (right): https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/ScriptRunner.h#newcode70 Source/core/dom/ScriptRunner.h:70: // PendingScript does have a (trivial) destructor, however. On ...
6 years, 6 months ago (2014-05-30 06:26:39 UTC) #25
haraken
https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/ScriptRunner.h File Source/core/dom/ScriptRunner.h (right): https://codereview.chromium.org/298863010/diff/80001/Source/core/dom/ScriptRunner.h#newcode70 Source/core/dom/ScriptRunner.h:70: // PendingScript does have a (trivial) destructor, however. On ...
6 years, 6 months ago (2014-05-30 06:49:41 UTC) #26
sof
Thanks everyone; will try to land this now. Oilpan bots are temporarily red in unit ...
6 years, 6 months ago (2014-05-30 09:43:39 UTC) #27
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 6 months ago (2014-05-30 09:43:51 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/298863010/120001
6 years, 6 months ago (2014-05-30 09:44:59 UTC) #29
commit-bot: I haz the power
6 years, 6 months ago (2014-05-30 13:36:00 UTC) #30
Message was sent while issue was closed.
Change committed as 175127

Powered by Google App Engine
This is Rietveld 408576698