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

Issue 216203006: Oilpan: Support the HTML parser thread in oilpan (Closed)

Created:
6 years, 8 months ago by haraken
Modified:
6 years, 8 months ago
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org, abarth-chromium, oystein (OOO til 10th of July)
Visibility:
Public.

Description

Oilpan: Support the HTML parser thread in oilpan After r170314, the HTML parser thread allocates on-heap objects such as CSSValues. So this CL supports the HTML parser thread in oilpan. Also this CL marks the CSSValue hierarchy with ThreadAffinity=AnyThread because CSSValue can be allocated by both main thread and parser threads. BUG=340522 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170564 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170741

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 14

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Total comments: 5

Patch Set 7 : #

Patch Set 8 : #

Total comments: 2

Patch Set 9 : #

Total comments: 2

Patch Set 10 : #

Total comments: 1

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -3 lines) Patch
M Source/core/html/parser/HTMLParserThread.h View 1 2 3 4 2 chunks +9 lines, -1 line 0 comments Download
M Source/core/html/parser/HTMLParserThread.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +29 lines, -1 line 0 comments Download
M Source/heap/ThreadState.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebKit.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 76 (0 generated)
haraken
PTAL. I need to land https://codereview.chromium.org/198673002/ first.
6 years, 8 months ago (2014-03-31 01:26:11 UTC) #1
Mads Ager (chromium)
LGTM It seems likely that the parser thread is not doing long-running synchronous tasks but ...
6 years, 8 months ago (2014-03-31 05:52:51 UTC) #2
tkent
I'm not sure if we should support GC heap in the parser thread yet. Is ...
6 years, 8 months ago (2014-03-31 06:17:30 UTC) #3
Mads Ager (chromium)
This code was carefully reviewed with threading in mind: https://codereview.chromium.org/201813002 So, yes, this is intentional. ...
6 years, 8 months ago (2014-03-31 06:40:31 UTC) #4
wibling-chromium
lgtm https://codereview.chromium.org/216203006/diff/1/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/1/Source/core/html/parser/HTMLParserThread.cpp#newcode82 Source/core/html/parser/HTMLParserThread.cpp:82: taskSynchronizer->taskCompleted(); Don't you want to clear m_pendingGCRunner and ...
6 years, 8 months ago (2014-03-31 07:52:16 UTC) #5
haraken
https://codereview.chromium.org/216203006/diff/1/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/1/Source/core/html/parser/HTMLParserThread.cpp#newcode82 Source/core/html/parser/HTMLParserThread.cpp:82: taskSynchronizer->taskCompleted(); On 2014/03/31 07:52:17, wibling-chromium wrote: > Don't you ...
6 years, 8 months ago (2014-03-31 09:26:21 UTC) #6
haraken
On 2014/03/31 06:40:31, Mads Ager (chromium) wrote: > This code was carefully reviewed with threading ...
6 years, 8 months ago (2014-03-31 09:27:05 UTC) #7
tkent
On 2014/03/31 09:27:05, haraken wrote: > On 2014/03/31 06:40:31, Mads Ager (chromium) wrote: > > ...
6 years, 8 months ago (2014-03-31 09:41:24 UTC) #8
haraken
On 2014/03/31 09:41:24, tkent wrote: > On 2014/03/31 09:27:05, haraken wrote: > > On 2014/03/31 ...
6 years, 8 months ago (2014-03-31 09:45:53 UTC) #9
tkent
On 2014/03/31 09:45:53, haraken wrote: > No. MediaQueryParser is always stack-allocated, and thus MediaQueryParser > ...
6 years, 8 months ago (2014-03-31 09:55:28 UTC) #10
Mads Ager (chromium)
On 2014/03/31 09:55:28, tkent wrote: > On 2014/03/31 09:45:53, haraken wrote: > > No. MediaQueryParser ...
6 years, 8 months ago (2014-03-31 09:59:54 UTC) #11
tkent
+yoav I saw crash logs and https://codereview.chromium.org/201813002/. It seems objects allocated in the parser thread ...
6 years, 8 months ago (2014-03-31 16:02:49 UTC) #12
tkent
haraken, did you confirm this CL fixed all of crashes on Debug Oilpan? Would you ...
6 years, 8 months ago (2014-04-01 01:37:34 UTC) #13
haraken
On 2014/04/01 01:37:34, tkent wrote: > haraken, did you confirm this CL fixed all of ...
6 years, 8 months ago (2014-04-01 02:19:15 UTC) #14
tkent
> As far as I understand, after r170314, it is expected that the HTML parser ...
6 years, 8 months ago (2014-04-01 02:28:23 UTC) #15
haraken
On 2014/04/01 02:28:23, tkent wrote: > > As far as I understand, after r170314, it ...
6 years, 8 months ago (2014-04-01 02:44:08 UTC) #16
eseidel
Media queries on the parser thread are a very new (last week!) addition. If they're ...
6 years, 8 months ago (2014-04-01 02:55:21 UTC) #17
haraken
On 2014/04/01 02:55:21, eseidel wrote: > Media queries on the parser thread are a very ...
6 years, 8 months ago (2014-04-01 03:30:50 UTC) #18
eseidel
Long-term CSSValue will be replaced by something simpler. Our current CSSParser uses the same internal ...
6 years, 8 months ago (2014-04-01 03:39:18 UTC) #19
Mads Ager (chromium)
Still, LGTM. Nice catch on the CSSValue allocations Kent! Luckily we have the asserts to ...
6 years, 8 months ago (2014-04-01 05:33:14 UTC) #20
tkent
lgtm
6 years, 8 months ago (2014-04-01 05:36:50 UTC) #21
eseidel
https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.cpp#newcode55 Source/core/html/parser/HTMLParserThread.cpp:55: s_sharedThread->postTask(WTF::bind(&HTMLParserThread::setupHTMLParserThread, s_sharedThread)); not lgtm. This will cause the parser ...
6 years, 8 months ago (2014-04-01 05:37:59 UTC) #22
eseidel
6 years, 8 months ago (2014-04-01 05:38:33 UTC) #23
eseidel
https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.cpp#newcode58 Source/core/html/parser/HTMLParserThread.cpp:58: void HTMLParserThread::setupHTMLParserThread() Seems we should call this method or ...
6 years, 8 months ago (2014-04-01 05:42:11 UTC) #24
eseidel
https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.h File Source/core/html/parser/HTMLParserThread.h (right): https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.h#newcode63 Source/core/html/parser/HTMLParserThread.h:63: OwnPtr<PendingGCRunner> m_pendingGCRunner; Are other threads going to need these? ...
6 years, 8 months ago (2014-04-01 05:42:49 UTC) #25
eseidel
To confirm my suspicion, yes WebThread's destructor does join: https://code.google.com/p/chromium/codesearch#chromium/src/content/child/webthread_impl.cc&sq=package:chromium&l=92 https://code.google.com/p/chromium/codesearch#chromium/src/base/threading/thread.cc&sq=package:chromium&rcl=1396248230&l=124
6 years, 8 months ago (2014-04-01 05:44:53 UTC) #26
haraken
Thanks for reviewing! Addressed your comments. PTAL. https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.cpp#newcode55 Source/core/html/parser/HTMLParserThread.cpp:55: s_sharedThread->postTask(WTF::bind(&HTMLParserThread::setupHTMLParserThread, s_sharedThread)); ...
6 years, 8 months ago (2014-04-01 06:31:26 UTC) #27
oystein (OOO til 10th of July)
https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.cpp#newcode71 Source/core/html/parser/HTMLParserThread.cpp:71: s_sharedThread->postTask(WTF::bind(&HTMLParserThread::cleanupHTMLParserThread, s_sharedThread, &taskSynchronizer)); Maybe add a check here to ...
6 years, 8 months ago (2014-04-01 06:40:10 UTC) #28
haraken
https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/50001/Source/core/html/parser/HTMLParserThread.cpp#newcode71 Source/core/html/parser/HTMLParserThread.cpp:71: s_sharedThread->postTask(WTF::bind(&HTMLParserThread::cleanupHTMLParserThread, s_sharedThread, &taskSynchronizer)); On 2014/04/01 06:40:10, Oystein wrote: > ...
6 years, 8 months ago (2014-04-01 06:47:54 UTC) #29
eseidel
https://codereview.chromium.org/216203006/diff/70001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/70001/Source/core/html/parser/HTMLParserThread.cpp#newcode53 Source/core/html/parser/HTMLParserThread.cpp:53: delete s_sharedThread; I have lead you astray. This can't ...
6 years, 8 months ago (2014-04-01 06:56:58 UTC) #30
eseidel
https://codereview.chromium.org/216203006/diff/70001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/70001/Source/core/html/parser/HTMLParserThread.cpp#newcode52 Source/core/html/parser/HTMLParserThread.cpp:52: taskSynchronizer.waitForTaskCompletion(); Do you need to wait for task completion, ...
6 years, 8 months ago (2014-04-01 06:57:51 UTC) #31
eseidel
I agree that leaving a gc'd thread wrapper for a later change is a good ...
6 years, 8 months ago (2014-04-01 06:58:32 UTC) #32
eseidel
i'm headed to sleep. don't let my previous not l-g hold this patch up. I'll ...
6 years, 8 months ago (2014-04-01 07:09:50 UTC) #33
haraken
Thanks for reviewing, Eric. PTAL. https://codereview.chromium.org/216203006/diff/70001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/70001/Source/core/html/parser/HTMLParserThread.cpp#newcode52 Source/core/html/parser/HTMLParserThread.cpp:52: taskSynchronizer.waitForTaskCompletion(); On 2014/04/01 06:57:52, ...
6 years, 8 months ago (2014-04-01 07:36:00 UTC) #34
eseidel
lgtm I think this is OK for landing. I think we're still conflating some concepts ...
6 years, 8 months ago (2014-04-01 08:03:32 UTC) #35
wibling-chromium
https://codereview.chromium.org/216203006/diff/90001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/90001/Source/core/html/parser/HTMLParserThread.cpp#newcode68 Source/core/html/parser/HTMLParserThread.cpp:68: ASSERT(m_thread); Can you assert m_thread in a static member ...
6 years, 8 months ago (2014-04-01 09:25:06 UTC) #36
haraken
Now all dependent CLs are landed, so I'm landing this CL. https://codereview.chromium.org/216203006/diff/90001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): ...
6 years, 8 months ago (2014-04-01 10:59:17 UTC) #37
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 8 months ago (2014-04-01 10:59:22 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/216203006/100001
6 years, 8 months ago (2014-04-01 10:59:26 UTC) #39
wibling-chromium
lgtm
6 years, 8 months ago (2014-04-01 11:13:01 UTC) #40
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-01 11:37:55 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_rel
6 years, 8 months ago (2014-04-01 11:37:55 UTC) #42
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 8 months ago (2014-04-01 11:42:24 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/216203006/100001
6 years, 8 months ago (2014-04-01 11:42:27 UTC) #44
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-01 11:49:01 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 8 months ago (2014-04-01 11:49:02 UTC) #46
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 8 months ago (2014-04-01 11:50:49 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/216203006/120001
6 years, 8 months ago (2014-04-01 11:50:59 UTC) #48
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-01 12:19:12 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 8 months ago (2014-04-01 12:19:13 UTC) #50
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 8 months ago (2014-04-01 12:39:03 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/216203006/120001
6 years, 8 months ago (2014-04-01 12:39:11 UTC) #52
commit-bot: I haz the power
Change committed as 170564
6 years, 8 months ago (2014-04-01 13:32:11 UTC) #53
tkent
https://codereview.chromium.org/216203006/diff/120001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/120001/Source/core/html/parser/HTMLParserThread.cpp#newcode82 Source/core/html/parser/HTMLParserThread.cpp:82: m_pendingGCRunner = nullptr; This can be use-after-free. Calling taskCompleted ...
6 years, 8 months ago (2014-04-02 01:44:04 UTC) #54
haraken
https://codereview.chromium.org/216203006/diff/120001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/120001/Source/core/html/parser/HTMLParserThread.cpp#newcode82 Source/core/html/parser/HTMLParserThread.cpp:82: m_pendingGCRunner = nullptr; On 2014/04/02 01:44:04, tkent wrote: > ...
6 years, 8 months ago (2014-04-02 02:02:19 UTC) #55
haraken
Let me summarize the current situation: Unfortunately I had to revert all changes about the ...
6 years, 8 months ago (2014-04-02 02:18:22 UTC) #56
haraken
I minimized the CL to reproduce the crash in content_unittests. Now I'm trying to somehow ...
6 years, 8 months ago (2014-04-02 05:16:26 UTC) #57
tkent
https://codereview.chromium.org/216203006/diff/140001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/140001/Source/core/html/parser/HTMLParserThread.cpp#newcode70 Source/core/html/parser/HTMLParserThread.cpp:70: s_sharedThread->postTask(WTF::bind(&HTMLParserThread::cleanupHTMLParserThread, s_sharedThread, taskSynchronizer)); On 2014/04/02 05:16:27, haraken wrote: > ...
6 years, 8 months ago (2014-04-02 05:33:34 UTC) #58
haraken
On 2014/04/02 05:33:34, tkent wrote: > https://codereview.chromium.org/216203006/diff/140001/Source/core/html/parser/HTMLParserThread.cpp > File Source/core/html/parser/HTMLParserThread.cpp (right): > > https://codereview.chromium.org/216203006/diff/140001/Source/core/html/parser/HTMLParserThread.cpp#newcode70 > ...
6 years, 8 months ago (2014-04-02 05:57:22 UTC) #59
Mads Ager (chromium)
On 2014/04/02 05:57:22, haraken wrote: > On 2014/04/02 05:33:34, tkent wrote: > > > https://codereview.chromium.org/216203006/diff/140001/Source/core/html/parser/HTMLParserThread.cpp ...
6 years, 8 months ago (2014-04-02 06:23:25 UTC) #60
Mads Ager (chromium)
On 2014/04/02 06:23:25, Mads Ager (chromium) wrote: > On 2014/04/02 05:57:22, haraken wrote: > > ...
6 years, 8 months ago (2014-04-02 06:24:00 UTC) #61
tkent
On 2014/04/02 05:57:22, haraken wrote: > So how can we fix the issue? In the ...
6 years, 8 months ago (2014-04-02 06:26:50 UTC) #62
eseidel
(Incidentally, the whole reason why the HTML parser has shutdown code at all is to ...
6 years, 8 months ago (2014-04-02 06:30:23 UTC) #63
haraken
On 2014/04/02 06:26:50, tkent wrote: > On 2014/04/02 05:57:22, haraken wrote: > > So how ...
6 years, 8 months ago (2014-04-02 08:05:58 UTC) #64
tkent
https://codereview.chromium.org/216203006/diff/160001/Source/core/html/parser/HTMLParserThread.cpp File Source/core/html/parser/HTMLParserThread.cpp (right): https://codereview.chromium.org/216203006/diff/160001/Source/core/html/parser/HTMLParserThread.cpp#newcode74 Source/core/html/parser/HTMLParserThread.cpp:74: delete s_sharedThread; We should delete s_sharedThread even if currentThread() ...
6 years, 8 months ago (2014-04-02 08:09:47 UTC) #65
haraken
Thanks for review. > https://codereview.chromium.org/216203006/diff/160001/Source/core/html/parser/HTMLParserThread.cpp > File Source/core/html/parser/HTMLParserThread.cpp (right): > > https://codereview.chromium.org/216203006/diff/160001/Source/core/html/parser/HTMLParserThread.cpp#newcode74 > Source/core/html/parser/HTMLParserThread.cpp:74: delete ...
6 years, 8 months ago (2014-04-02 08:11:45 UTC) #66
tkent
lgtm
6 years, 8 months ago (2014-04-02 08:18:11 UTC) #67
haraken
On 2014/04/02 08:18:11, tkent wrote: > lgtm Thanks. Now the only remaining issue is that ...
6 years, 8 months ago (2014-04-02 08:23:36 UTC) #68
haraken
On 2014/04/02 08:23:36, haraken wrote: > On 2014/04/02 08:18:11, tkent wrote: > > lgtm > ...
6 years, 8 months ago (2014-04-03 03:59:06 UTC) #69
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 8 months ago (2014-04-03 03:59:14 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/216203006/180001
6 years, 8 months ago (2014-04-03 03:59:21 UTC) #71
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-03 05:11:22 UTC) #72
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 8 months ago (2014-04-03 05:11:23 UTC) #73
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 8 months ago (2014-04-03 05:21:17 UTC) #74
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/216203006/180001
6 years, 8 months ago (2014-04-03 05:21:23 UTC) #75
commit-bot: I haz the power
6 years, 8 months ago (2014-04-03 06:28:51 UTC) #76
Message was sent while issue was closed.
Change committed as 170741

Powered by Google App Engine
This is Rietveld 408576698