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

Issue 2818073002: Messaging: Avoid calling non-thread-safe functions in MessagePort::messageAvailable() (Closed)

Created:
3 years, 8 months ago by nhiroki
Modified:
3 years, 8 months ago
Reviewers:
yuryu, kinuko, tzik
CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Messaging: Avoid calling non-thread-safe functions in MessagePort::messageAvailable() As implementation comments in MessagePort::messageAvailable(), it can be called from another thread and should not call non-thread-functions. However, the current implementation wrongly calls ContextLifecycleObserver's GetExecutionContext() that is not a thread-safe function to post a task to the context thread. To avoid that, this CL replaces ExecutionContext::PostTask() with WebTaskRunner::PostTask(). The task runner is captured in the ctor of MessagePort called on the context thread. BUG=694925 Review-Url: https://codereview.chromium.org/2818073002 Cr-Commit-Position: refs/heads/master@{#465886} Committed: https://chromium.googlesource.com/chromium/src/+/829907ac0d3d2ed39d8752d22a6d0e45df1e8325

Patch Set 1 #

Patch Set 2 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -16 lines) Patch
M third_party/WebKit/Source/core/dom/MessagePort.h View 2 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/MessagePort.cpp View 3 chunks +6 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 18 (10 generated)
nhiroki
PTAL, thanks!
3 years, 8 months ago (2017-04-18 02:18:25 UTC) #6
tzik
lgtm
3 years, 8 months ago (2017-04-18 02:26:39 UTC) #7
yuryu
lgtm
3 years, 8 months ago (2017-04-18 02:34:16 UTC) #8
nhiroki
+kinuko@, can you review this as an owner of core/? Thanks!
3 years, 8 months ago (2017-04-18 02:34:52 UTC) #10
kinuko
lgtm
3 years, 8 months ago (2017-04-18 05:03:26 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2818073002/20001
3 years, 8 months ago (2017-04-20 01:51:41 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/829907ac0d3d2ed39d8752d22a6d0e45df1e8325
3 years, 8 months ago (2017-04-20 03:21:35 UTC) #17
nhiroki
3 years, 8 months ago (2017-04-20 03:40:05 UTC) #18
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.chromium.org/2833673002/ by nhiroki@chromium.org.

The reason for reverting is: [1] that this CL depends on needs to be reverted:
https://codereview.chromium.org/2831843002/.

Powered by Google App Engine
This is Rietveld 408576698