|
|
DescriptionReplace createCrossThreadTask with crossThreadBind in webaudio
createCrossThreadTask and ExecutionContextTask are deprecated in favor
of crossThreadBind and CrossThreadClosure respectively. This patch
removes the deprecated versions. This patch also changes the code to
post tasks to WebTaskRunner instead of ExecutionContext, but the
behavour remains the same as Document::postTask already forwards tasks to
WebTaskRunner of the LocalFrame in the Document.
BUG=625927
Review-Url: https://codereview.chromium.org/2738823004
Cr-Commit-Position: refs/heads/master@{#456042}
Committed: https://chromium.googlesource.com/chromium/src/+/039895d69bd49f30bf762e7ab5c8812211998f16
Patch Set 1 #
Total comments: 10
Patch Set 2 : RefPtr -> wrapPassRefPtr #
Messages
Total messages: 32 (26 generated)
Description was changed from ========== Replace ExecutionContext::postTask with WebTaskRunner::postTask ExecutionContextTask is deprecated in favor of WTF::Closure and CrossThreadClosure. Along with the transition, this patch changes webaudio events to be posted through WebTaskRunner as ExecutionContext is always Document in webaudio. BUG=625927 ========== to ========== Replace createCrossThreadTask with crossThreadBind createCrossThreadTask and ExecutionContextTask are deprecated in favor of crossThreadBind and CrossThreadClosure respectively. This patch removes the deprecated versions. This patch also changes the code to post tasks to WebTaskRunner instead of ExecutionContext, but the behaviour remains the same as Document::postTask forwards tasks to WebTaskRunner. BUG=625927 ==========
Description was changed from ========== Replace createCrossThreadTask with crossThreadBind createCrossThreadTask and ExecutionContextTask are deprecated in favor of crossThreadBind and CrossThreadClosure respectively. This patch removes the deprecated versions. This patch also changes the code to post tasks to WebTaskRunner instead of ExecutionContext, but the behaviour remains the same as Document::postTask forwards tasks to WebTaskRunner. BUG=625927 ========== to ========== Replace createCrossThreadTask with crossThreadBind createCrossThreadTask and ExecutionContextTask are deprecated in favor of crossThreadBind and CrossThreadClosure respectively. This patch removes the deprecated versions. This patch also changes the code to post tasks to WebTaskRunner instead of ExecutionContext, but the behavour remains the same as Document::postTask forwards tasks to WebTaskRunner. BUG=625927 ==========
The CQ bit was checked by yuryu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yuryu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yuryu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yuryu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Replace createCrossThreadTask with crossThreadBind createCrossThreadTask and ExecutionContextTask are deprecated in favor of crossThreadBind and CrossThreadClosure respectively. This patch removes the deprecated versions. This patch also changes the code to post tasks to WebTaskRunner instead of ExecutionContext, but the behavour remains the same as Document::postTask forwards tasks to WebTaskRunner. BUG=625927 ========== to ========== Replace createCrossThreadTask with crossThreadBind createCrossThreadTask and ExecutionContextTask are deprecated in favor of crossThreadBind and CrossThreadClosure respectively. This patch removes the deprecated versions. This patch also changes the code to post tasks to WebTaskRunner instead of ExecutionContext, but the behavour remains the same as Document::postTask already forwards tasks to WebTaskRunner of the LocalFrame in the Document. BUG=625927 ==========
Description was changed from ========== Replace createCrossThreadTask with crossThreadBind createCrossThreadTask and ExecutionContextTask are deprecated in favor of crossThreadBind and CrossThreadClosure respectively. This patch removes the deprecated versions. This patch also changes the code to post tasks to WebTaskRunner instead of ExecutionContext, but the behavour remains the same as Document::postTask already forwards tasks to WebTaskRunner of the LocalFrame in the Document. BUG=625927 ========== to ========== Replace createCrossThreadTask with crossThreadBind in webaudio createCrossThreadTask and ExecutionContextTask are deprecated in favor of crossThreadBind and CrossThreadClosure respectively. This patch removes the deprecated versions. This patch also changes the code to post tasks to WebTaskRunner instead of ExecutionContext, but the behavour remains the same as Document::postTask already forwards tasks to WebTaskRunner of the LocalFrame in the Document. BUG=625927 ==========
yuryu@chromium.org changed reviewers: + nhiroki@chromium.org, tzik@chromium.org
please take a look, thanks
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm. I doubt the thread safety around ExecutionContext here, but at least this CL doesn't introduce additional breakage. We should revisit here separately. https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp (right): https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp:26: #include "modules/webaudio/AudioScheduledSourceNode.h" Could you add a blank line after AudioScheduledSourceNode.h #include? https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp:233: RefPtr<AudioScheduledSourceHandler>(this))); Can we use wrapPassRefPtr here? https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp (right): https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp:204: RefPtr<MediaElementAudioSourceHandler>(this), wrapPassRefPtr? https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp (right): https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp:229: RefPtr<OfflineAudioDestinationHandler>(this), ditto https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp:244: RefPtr<OfflineAudioDestinationHandler>(this))); ditto
I read a couple of docs saying PassRefPtr is deprecated, but it seems RefPtr is still more expensive when copy-constructed. Thanks for point it out. https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp (right): https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp:26: #include "modules/webaudio/AudioScheduledSourceNode.h" On 2017/03/10 00:15:43, tzik wrote: > Could you add a blank line after AudioScheduledSourceNode.h #include? Done. https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp:233: RefPtr<AudioScheduledSourceHandler>(this))); On 2017/03/10 00:15:43, tzik wrote: > Can we use wrapPassRefPtr here? Done. https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp (right): https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp:204: RefPtr<MediaElementAudioSourceHandler>(this), On 2017/03/10 00:15:43, tzik wrote: > wrapPassRefPtr? Done. https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp (right): https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp:229: RefPtr<OfflineAudioDestinationHandler>(this), On 2017/03/10 00:15:43, tzik wrote: > ditto Done. https://codereview.chromium.org/2738823004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp:244: RefPtr<OfflineAudioDestinationHandler>(this))); On 2017/03/10 00:15:43, tzik wrote: > ditto Done.
haraken@chromium.org changed reviewers: + haraken@chromium.org
LGTM It looks like that accessing an ExecutionContext *happens to* be safe because the code acquires a mutex lock before accessing it, but it's definitely not a good programming pattern.
The CQ bit was checked by yuryu@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tzik@chromium.org Link to the patchset: https://codereview.chromium.org/2738823004/#ps20001 (title: "RefPtr -> wrapPassRefPtr")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1489142082950090, "parent_rev": "865a357dda206267aafd20d23382b452cec8c084", "commit_rev": "039895d69bd49f30bf762e7ab5c8812211998f16"}
Message was sent while issue was closed.
Description was changed from ========== Replace createCrossThreadTask with crossThreadBind in webaudio createCrossThreadTask and ExecutionContextTask are deprecated in favor of crossThreadBind and CrossThreadClosure respectively. This patch removes the deprecated versions. This patch also changes the code to post tasks to WebTaskRunner instead of ExecutionContext, but the behavour remains the same as Document::postTask already forwards tasks to WebTaskRunner of the LocalFrame in the Document. BUG=625927 ========== to ========== Replace createCrossThreadTask with crossThreadBind in webaudio createCrossThreadTask and ExecutionContextTask are deprecated in favor of crossThreadBind and CrossThreadClosure respectively. This patch removes the deprecated versions. This patch also changes the code to post tasks to WebTaskRunner instead of ExecutionContext, but the behavour remains the same as Document::postTask already forwards tasks to WebTaskRunner of the LocalFrame in the Document. BUG=625927 Review-Url: https://codereview.chromium.org/2738823004 Cr-Commit-Position: refs/heads/master@{#456042} Committed: https://chromium.googlesource.com/chromium/src/+/039895d69bd49f30bf762e7ab5c8... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/039895d69bd49f30bf762e7ab5c8... |