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

Issue 2019963002: Remove get from CrossThreadPersistent to avoid accidental use

Created:
4 years, 6 months ago by keishi
Modified:
4 years, 6 months ago
Reviewers:
oilpan-reviews, haraken, sof
CC:
chromium-reviews, dshwang, oilpan-reviews, Mads Ager (chromium), ajuma+watch-canvas_chromium.org, blink-reviews-html_chromium.org, Justin Novosad, Raymond Toy, dglazkov+blink, Rik, blink-reviews, hongchan, kouhei+heap_chromium.org, blink-reviews-api_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove get from CrossThreadPersistent to avoid accidental use BUG=591606

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -16 lines) Patch
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/fetch/CrossThreadHolder.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webdatabase/Database.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webdatabase/DatabaseTask.h View 2 chunks +2 lines, -2 lines 1 comment Download
M third_party/WebKit/Source/modules/webdatabase/DatabaseTask.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webdatabase/DatabaseThread.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/HeapTest.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/Persistent.h View 3 chunks +14 lines, -1 line 1 comment Download
M third_party/WebKit/public/platform/WebPrivatePtr.h View 1 3 chunks +36 lines, -4 lines 1 comment Download

Messages

Total messages: 9 (3 generated)
keishi
Not ready to land, but could you take a look if this is the right ...
4 years, 6 months ago (2016-06-02 02:09:56 UTC) #3
haraken
On 2016/06/02 02:09:56, keishi wrote: > Not ready to land, but could you take a ...
4 years, 6 months ago (2016-06-02 02:17:05 UTC) #4
sof
If we disregard the issue of wanting to have heap-movable objects, why is it a ...
4 years, 6 months ago (2016-06-02 07:00:12 UTC) #6
haraken
On 2016/06/02 07:00:12, sof wrote: > If we disregard the issue of wanting to have ...
4 years, 6 months ago (2016-06-02 07:31:42 UTC) #7
sof
On 2016/06/02 07:31:42, haraken wrote: > On 2016/06/02 07:00:12, sof wrote: > > If we ...
4 years, 6 months ago (2016-06-02 07:44:54 UTC) #8
haraken
4 years, 6 months ago (2016-06-02 07:48:51 UTC) #9
On 2016/06/02 07:44:54, sof wrote:
> On 2016/06/02 07:31:42, haraken wrote:
> > On 2016/06/02 07:00:12, sof wrote:
> > > If we disregard the issue of wanting to have heap-movable objects, why is
it
> a
> > > problem to have on-stack copies (in unattached threads) of pointers that a
> > > CrossThreadPersistent<> already keeps alive?
> > 
> > If we do that, the semantics of on-stack pointers will be confusing:
> > 
> > - If the on-stack pointer is pointing to cross-thread objects, you need to
> keep
> > it alive by CrossThreadPersistent somewhere.
> > - Otherwise, you don't need to keep it alive.
> 
> If the thread is ever going to be able to (safely) consult what the CTP refers
> to, I don't see how you can avoid such stack/register references. But pushing
> "outwards" the use of CrossThreadPersistent<>s like here to make it clear that
> you are doing something requiring extra care, makes some sense.

Yeah, your point makes sense.

Powered by Google App Engine
This is Rietveld 408576698