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

Issue 959803003: web-threads: Create a single instance of WebThread for each blink thread. (Closed)

Created:
5 years, 9 months ago by sadrul
Modified:
5 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

web-threads: Create a single instance of WebThread for each blink thread. BlinkPlatformImpl currently creates an instance of WebThreadImpl when blink creates a thread using 'createThread()'. When some code runs in the newly created thread and tries to get hold of the WebThread that represents the current thread using 'currentThread()', BlinkPlatformImpl creates a new instance of a WebThreadImplForMessageLoop and returns that. For subsequent calls to 'currentThread()', this same WebThreadImplForMessageLoop is returned. So BlinkPlatformImpl ends up creating two WebThread instances for each thread created in blink. This patch changes this to only create a single instance of WebThread for each thread created in blink. WebThreadImplForMessageLoop is no longer necessary, so it is removed. BUG=462067 Committed: https://crrev.com/e2428d07b35723722cb9579ed6074d55bd858516 Cr-Commit-Position: refs/heads/master@{#318913}

Patch Set 1 #

Patch Set 2 : tot-merge #

Patch Set 3 : . #

Patch Set 4 : experimental-do-not-review #

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : . #

Patch Set 10 : . #

Total comments: 10

Patch Set 11 : . #

Patch Set 12 : . #

Patch Set 13 : . #

Total comments: 5

Patch Set 14 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -71 lines) Patch
M content/child/blink_platform_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +13 lines, -26 lines 0 comments Download
M content/child/webthread_impl.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -19 lines 0 comments Download
M content/child/webthread_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -24 lines 0 comments Download
M content/test/test_blink_web_unit_test_support.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M content/test/test_blink_web_unit_test_support.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (5 generated)
sadrul
Hi. Does this look like a reasonable fix? With this change, WebThreadImplForMessageLoop is created only ...
5 years, 9 months ago (2015-02-26 01:50:49 UTC) #2
sadrul
+skyostil@ On 2015/02/26 01:50:49, sadrul wrote: > Hi. Does this look like a reasonable fix? ...
5 years, 9 months ago (2015-02-27 04:26:00 UTC) #5
kinuko
https://codereview.chromium.org/959803003/diff/180001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/959803003/diff/180001/content/child/blink_platform_impl.cc#newcode514 content/child/blink_platform_impl.cc:514: return static_cast<blink::WebThread*>(current_thread_slot_.Get()); Hmm. By looking into the callsites in ...
5 years, 9 months ago (2015-02-27 09:54:27 UTC) #6
Sami
Good cleanup! https://codereview.chromium.org/959803003/diff/180001/content/child/webthread_impl.cc File content/child/webthread_impl.cc (right): https://codereview.chromium.org/959803003/diff/180001/content/child/webthread_impl.cc#newcode119 content/child/webthread_impl.cc:119: void WebThreadBase::enterRunLoop() { On 2015/02/27 09:54:27, kinuko ...
5 years, 9 months ago (2015-02-27 17:23:08 UTC) #7
sadrul
https://codereview.chromium.org/959803003/diff/180001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/959803003/diff/180001/content/child/blink_platform_impl.cc#newcode514 content/child/blink_platform_impl.cc:514: return static_cast<blink::WebThread*>(current_thread_slot_.Get()); On 2015/02/27 09:54:27, kinuko wrote: > Hmm. ...
5 years, 9 months ago (2015-03-01 10:21:38 UTC) #8
kinuko
Are the tests on try broken because of this patch? https://codereview.chromium.org/959803003/diff/180001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/959803003/diff/180001/content/child/blink_platform_impl.cc#newcode514 ...
5 years, 9 months ago (2015-03-02 06:08:17 UTC) #9
sadrul
On 2015/03/02 06:08:17, kinuko wrote: > Are the tests on try broken because of this ...
5 years, 9 months ago (2015-03-02 07:43:14 UTC) #10
kinuko
On 2015/03/02 07:43:14, sadrul wrote: > On 2015/03/02 06:08:17, kinuko wrote: > > Are the ...
5 years, 9 months ago (2015-03-02 07:46:03 UTC) #11
Sami
lgtm, but just one question about TLS for the main thread. Thanks for starting the ...
5 years, 9 months ago (2015-03-02 11:40:02 UTC) #12
kinuko
lgtm 2 given that all tests are green now. Using TLS for the main thread ...
5 years, 9 months ago (2015-03-02 14:15:33 UTC) #13
sadrul
https://codereview.chromium.org/959803003/diff/240001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/959803003/diff/240001/content/child/blink_platform_impl.cc#newcode420 content/child/blink_platform_impl.cc:420: current_thread_slot_() { On 2015/03/02 11:40:02, Sami wrote: > nit: ...
5 years, 9 months ago (2015-03-02 16:53:21 UTC) #14
Sami
https://codereview.chromium.org/959803003/diff/240001/content/test/test_blink_web_unit_test_support.cc File content/test/test_blink_web_unit_test_support.cc (right): https://codereview.chromium.org/959803003/diff/240001/content/test/test_blink_web_unit_test_support.cc#newcode324 content/test/test_blink_web_unit_test_support.cc:324: blink::WebThread* TestBlinkWebUnitTestSupport::currentThread() { On 2015/03/02 16:53:21, sadrul wrote: > ...
5 years, 9 months ago (2015-03-02 17:25:07 UTC) #15
kinuko
https://codereview.chromium.org/959803003/diff/180001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/959803003/diff/180001/content/child/blink_platform_impl.cc#newcode514 content/child/blink_platform_impl.cc:514: return static_cast<blink::WebThread*>(current_thread_slot_.Get()); On 2015/03/02 07:43:14, sadrul wrote: > On ...
5 years, 9 months ago (2015-03-03 00:14:14 UTC) #16
jochen (gone - plz use gerrit)
lgtm
5 years, 9 months ago (2015-03-03 13:51:21 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/959803003/260001
5 years, 9 months ago (2015-03-03 17:03:47 UTC) #20
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years, 9 months ago (2015-03-03 18:45:15 UTC) #21
commit-bot: I haz the power
5 years, 9 months ago (2015-03-03 18:46:34 UTC) #22
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/e2428d07b35723722cb9579ed6074d55bd858516
Cr-Commit-Position: refs/heads/master@{#318913}

Powered by Google App Engine
This is Rietveld 408576698