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

Issue 2081873003: Retain strong reference of BlobCallback in CanvasAsyncBlobCreator (Closed)

Created:
4 years, 6 months ago by tzik
Modified:
4 years, 6 months ago
Reviewers:
haraken, sof
CC:
chromium-reviews, dshwang, ajuma+watch-canvas_chromium.org, blink-reviews-html_chromium.org, Justin Novosad, dglazkov+blink, Rik, blink-reviews, hiroshige
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Retain strong reference of BlobCallback in CanvasAsyncBlobCreator CanvasAsyncBlobCreator holds a BlobCallback and runs it asynchronously. However, it can be destroyed before the callback invocation, and the callback doesn't retain its ownership while it's in the task queue. This CL makes the bound task to retain the shared ownership of BlobCallback. BUG=621547 Committed: https://crrev.com/e7d195955d69a096ba28bcb4be85df1d64ffa2a8 Cr-Commit-Position: refs/heads/master@{#401052}

Patch Set 1 #

Total comments: 2

Patch Set 2 : s/wrapCrossThreadPersistent/wrapPersistent/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (7 generated)
tzik
PTAL
4 years, 6 months ago (2016-06-21 14:00:22 UTC) #2
haraken
LGTM
4 years, 6 months ago (2016-06-21 14:02:04 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2081873003/1
4 years, 6 months ago (2016-06-21 14:03:05 UTC) #5
sof
https://codereview.chromium.org/2081873003/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2081873003/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode267 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:267: Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, bind(&BlobCallback::handleEvent, wrapCrossThreadPersistent(m_callback.get()), resultBlob)); I don't understand; the m_callback ...
4 years, 6 months ago (2016-06-21 14:08:39 UTC) #7
tzik
https://codereview.chromium.org/2081873003/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2081873003/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode267 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:267: Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, bind(&BlobCallback::handleEvent, wrapCrossThreadPersistent(m_callback.get()), resultBlob)); On 2016/06/21 14:08:38, sof wrote: ...
4 years, 6 months ago (2016-06-21 14:14:56 UTC) #9
sof
On 2016/06/21 14:14:56, tzik wrote: > https://codereview.chromium.org/2081873003/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp > File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp > (right): > > https://codereview.chromium.org/2081873003/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode267 ...
4 years, 6 months ago (2016-06-21 14:21:04 UTC) #10
tzik
On 2016/06/21 14:21:04, sof wrote: > On 2016/06/21 14:14:56, tzik wrote: > > > https://codereview.chromium.org/2081873003/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp ...
4 years, 6 months ago (2016-06-21 14:25:42 UTC) #11
sof
On 2016/06/21 14:25:42, tzik wrote: > On 2016/06/21 14:21:04, sof wrote: > > On 2016/06/21 ...
4 years, 6 months ago (2016-06-21 14:33:04 UTC) #12
sof
lgtm
4 years, 6 months ago (2016-06-21 14:33:22 UTC) #13
haraken
Thanks for pointing it out. PS2 looks correct.
4 years, 6 months ago (2016-06-21 14:34:19 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2081873003/20001
4 years, 6 months ago (2016-06-21 15:07:10 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-21 18:43:00 UTC) #18
commit-bot: I haz the power
4 years, 6 months ago (2016-06-21 18:46:34 UTC) #20
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/e7d195955d69a096ba28bcb4be85df1d64ffa2a8
Cr-Commit-Position: refs/heads/master@{#401052}

Powered by Google App Engine
This is Rietveld 408576698