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

Issue 1641853003: Create MediaValuesCached and TokenPreloadScanner on the parser thread (Closed)

Created:
4 years, 10 months ago by hiroshige
Modified:
4 years, 10 months ago
CC:
chromium-reviews, blink-reviews-css, blink-reviews-html_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, kinuko+watch, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@TRV_MediaValuesCached
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create MediaValuesCached and TokenPreloadScanner on the parser thread Previously, TokenPreloadScanner and MediaValuesCached were allocated on the main thread, passed to and intended to be destructed on the background parser thread. However, since https://codereview.chromium.org/1611303006, MediaValuesCached is an Oilpan object and started to be destructed on the main thread, which causes race conditions on the refcount of StringImpl in MediaValuesCachedData. This CL removes the race condition by creating, using and destructing TokenPreloadScanner and MediaValuesCached on the background parser thread. Instead of MediaValuesCached (an Oilpan object), MediaValuesCachedData (non-Oilpan object) is created on the main thread and passed to the background parser thread. This CL removes MediaValuesCached::isSafeToSendToAnotherThread() because it is no longer safe to be passed across threads, and defines CrossThreadCopier for MediaValuesCachedData instead. BUG=581565, 478194, 585026 Committed: https://crrev.com/1e224f69bc03710f9f7c8c8f8d8f3526d004ea00 Cr-Commit-Position: refs/heads/master@{#374027} Committed: https://crrev.com/b663c523bddc75b4b2009f8804b054e777e84a37 Cr-Commit-Position: refs/heads/master@{#374850}

Patch Set 1 #

Patch Set 2 : #

Total comments: 9

Patch Set 3 : Rebase. #

Patch Set 4 : Add explicit. #

Patch Set 5 : #

Patch Set 6 : Disable test on asan bots #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -141 lines) Patch
M third_party/WebKit/Source/core/css/MediaValues.h View 1 1 chunk +16 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/core/css/MediaValues.cpp View 8 chunks +16 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/core/css/MediaValuesCached.h View 1 3 chunks +31 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/MediaValuesCached.cpp View 1 2 3 4 2 chunks +32 lines, -55 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h View 3 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp View 1 4 chunks +15 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h View 1 2 3 4 chunks +9 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp View 9 chunks +14 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLPreloadScannerTest.cpp View 3 chunks +3 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 49 (22 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1641853003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1641853003/20001
4 years, 10 months ago (2016-01-28 18:34:05 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/108414)
4 years, 10 months ago (2016-01-28 20:30:44 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1641853003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1641853003/20001
4 years, 10 months ago (2016-01-29 04:20:59 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/108722)
4 years, 10 months ago (2016-01-29 06:05:17 UTC) #8
Yoav Weiss
https://codereview.chromium.org/1641853003/diff/20001/third_party/WebKit/Source/core/css/MediaValuesCached.cpp File third_party/WebKit/Source/core/css/MediaValuesCached.cpp (right): https://codereview.chromium.org/1641853003/diff/20001/third_party/WebKit/Source/core/css/MediaValuesCached.cpp#newcode19 third_party/WebKit/Source/core/css/MediaValuesCached.cpp:19: // FIXME - Added an assert here so we ...
4 years, 10 months ago (2016-02-01 09:29:30 UTC) #11
hiroshige
Thanks for comments! https://codereview.chromium.org/1641853003/diff/20001/third_party/WebKit/Source/core/css/MediaValuesCached.h File third_party/WebKit/Source/core/css/MediaValuesCached.h (right): https://codereview.chromium.org/1641853003/diff/20001/third_party/WebKit/Source/core/css/MediaValuesCached.h#newcode114 third_party/WebKit/Source/core/css/MediaValuesCached.h:114: template<> struct CrossThreadCopierBase<false, false, false, MediaValuesCached::MediaValuesCachedData> ...
4 years, 10 months ago (2016-02-01 09:42:11 UTC) #12
hiroshige
Thanks for comments!
4 years, 10 months ago (2016-02-01 09:42:13 UTC) #13
Yoav Weiss
On 2016/02/01 09:42:11, hiroshige wrote: > Thanks for comments! > > https://codereview.chromium.org/1641853003/diff/20001/third_party/WebKit/Source/core/css/MediaValuesCached.h > File third_party/WebKit/Source/core/css/MediaValuesCached.h ...
4 years, 10 months ago (2016-02-01 11:01:59 UTC) #14
haraken
LGTM https://codereview.chromium.org/1641853003/diff/20001/third_party/WebKit/Source/core/css/MediaValuesCached.cpp File third_party/WebKit/Source/core/css/MediaValuesCached.cpp (right): https://codereview.chromium.org/1641853003/diff/20001/third_party/WebKit/Source/core/css/MediaValuesCached.cpp#newcode19 third_party/WebKit/Source/core/css/MediaValuesCached.cpp:19: // FIXME - Added an assert here so ...
4 years, 10 months ago (2016-02-01 11:09:16 UTC) #15
kouhei (in TOK)
lgtm
4 years, 10 months ago (2016-02-01 12:03:59 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1641853003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1641853003/60001
4 years, 10 months ago (2016-02-05 07:42:22 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1641853003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1641853003/80001
4 years, 10 months ago (2016-02-05 08:02:54 UTC) #21
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-05 11:04:23 UTC) #23
hiroshige
https://codereview.chromium.org/1641853003/diff/20001/third_party/WebKit/Source/core/css/MediaValuesCached.cpp File third_party/WebKit/Source/core/css/MediaValuesCached.cpp (right): https://codereview.chromium.org/1641853003/diff/20001/third_party/WebKit/Source/core/css/MediaValuesCached.cpp#newcode19 third_party/WebKit/Source/core/css/MediaValuesCached.cpp:19: // FIXME - Added an assert here so we ...
4 years, 10 months ago (2016-02-06 10:08:44 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1641853003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1641853003/80001
4 years, 10 months ago (2016-02-06 10:10:08 UTC) #27
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 10 months ago (2016-02-06 12:20:07 UTC) #29
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/1e224f69bc03710f9f7c8c8f8d8f3526d004ea00 Cr-Commit-Position: refs/heads/master@{#374027}
4 years, 10 months ago (2016-02-06 12:21:29 UTC) #31
Nico
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/1679703002/ by thakis@chromium.org. ...
4 years, 10 months ago (2016-02-07 18:20:25 UTC) #32
sof
On 2016/02/07 18:20:25, Nico wrote: > A revert of this CL (patchset #5 id:80001) has ...
4 years, 10 months ago (2016-02-07 18:59:45 UTC) #33
hiroshige
On 2016/02/07 18:59:45, sof wrote: > On 2016/02/07 18:20:25, Nico wrote: > > A revert ...
4 years, 10 months ago (2016-02-08 06:56:58 UTC) #34
Yoav Weiss
On 2016/02/08 06:56:58, hiroshige wrote: > On 2016/02/07 18:59:45, sof wrote: > > On 2016/02/07 ...
4 years, 10 months ago (2016-02-09 10:53:24 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1641853003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1641853003/100001
4 years, 10 months ago (2016-02-09 18:33:36 UTC) #39
hiroshige
I'll disable the test on asan bots (https://codereview.chromium.org/1680923003/) and reland this CL.
4 years, 10 months ago (2016-02-09 19:33:37 UTC) #40
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-09 20:08:00 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1641853003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1641853003/100001
4 years, 10 months ago (2016-02-11 01:21:52 UTC) #45
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 10 months ago (2016-02-11 03:35:22 UTC) #47
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:34:27 UTC) #49
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/b663c523bddc75b4b2009f8804b054e777e84a37
Cr-Commit-Position: refs/heads/master@{#374850}

Powered by Google App Engine
This is Rietveld 408576698