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

Issue 169653006: [not for commit] (Closed)

Created:
6 years, 10 months ago by Vyacheslav Egorov (Chromium)
Modified:
6 years, 6 months ago
CC:
blink-reviews, haraken, jamesr, dglazkov+blink, Mads Ager (chromium), abarth-chromium
Visibility:
Public.

Description

[not for commit] Let WebPrivatePtr<T> select different pointer storage based on whether T inherits from GarbageCollected or not. BUG=

Patch Set 1 #

Patch Set 2 : cleanup #

Patch Set 3 : something that works #

Total comments: 8

Patch Set 4 : replace = 0 with = nullptr #

Total comments: 7

Patch Set 5 : #

Patch Set 6 : kill nullptr overload #

Patch Set 7 : return nullptr_t overload, just do it right #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -34 lines) Patch
M Source/heap/Visitor.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M Source/platform/exported/WebAudioBus.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M Source/web/WebCachedURLRequest.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebDOMMediaStreamTrack.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebIDBKey.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebIDBKeyRange.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M public/platform/WebPrivatePtr.h View 1 2 3 4 5 6 3 chunks +142 lines, -28 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
zerny-chromium
https://codereview.chromium.org/169653006/diff/60001/public/platform/WebPrivatePtr.h File public/platform/WebPrivatePtr.h (right): https://codereview.chromium.org/169653006/diff/60001/public/platform/WebPrivatePtr.h#newcode114 public/platform/WebPrivatePtr.h:114: class PtrStorage : public PtrStorageImpl<T, WebCore::IsGarbageCollected<T>::value> { Nit: this ...
6 years, 10 months ago (2014-02-18 06:42:02 UTC) #1
Mads Ager (chromium)
This is cool, thanks Slava. Before moving ahead with this we should double check that ...
6 years, 10 months ago (2014-02-18 06:50:50 UTC) #2
haraken
https://codereview.chromium.org/169653006/diff/60001/public/platform/WebPrivatePtr.h File public/platform/WebPrivatePtr.h (right): https://codereview.chromium.org/169653006/diff/60001/public/platform/WebPrivatePtr.h#newcode130 public/platform/WebPrivatePtr.h:130: PtrStorage(const PtrStorage&); Nit: Add explicit. https://codereview.chromium.org/169653006/diff/60001/public/platform/WebPrivatePtr.h#newcode234 public/platform/WebPrivatePtr.h:234: void* m_storage; ...
6 years, 10 months ago (2014-02-18 06:58:47 UTC) #3
Vyacheslav Egorov (Chromium)
Here is the latest version. 1) = 0 assignments to WebPrivatePtr are replaced with = ...
6 years, 10 months ago (2014-02-18 09:37:44 UTC) #4
sof
https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h File public/platform/WebPrivatePtr.h (right): https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h#newcode228 public/platform/WebPrivatePtr.h:228: storage().reset(); Shouldn't this be reset() (or storage.release()) ?
6 years, 10 months ago (2014-02-18 10:36:56 UTC) #5
sof
https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h File public/platform/WebPrivatePtr.h (right): https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h#newcode132 public/platform/WebPrivatePtr.h:132: void assign(const PassRefPtr<T>& val) { assign(val.get()); } I'm seeing ...
6 years, 10 months ago (2014-02-18 11:24:20 UTC) #6
Vyacheslav Egorov (Chromium)
New version is up. https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h File public/platform/WebPrivatePtr.h (right): https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h#newcode132 public/platform/WebPrivatePtr.h:132: void assign(const PassRefPtr<T>& val) { ...
6 years, 10 months ago (2014-02-18 12:02:32 UTC) #7
sof
https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h File public/platform/WebPrivatePtr.h (right): https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h#newcode228 public/platform/WebPrivatePtr.h:228: storage().reset(); On 2014/02/18 12:02:33, Vyacheslav Egorov wrote: > On ...
6 years, 10 months ago (2014-02-18 12:07:39 UTC) #8
Vyacheslav Egorov (Chromium)
https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h File public/platform/WebPrivatePtr.h (right): https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h#newcode228 public/platform/WebPrivatePtr.h:228: storage().reset(); On 2014/02/18 12:07:40, sof wrote: > On 2014/02/18 ...
6 years, 10 months ago (2014-02-18 12:18:16 UTC) #9
Vyacheslav Egorov (Chromium)
New version: return nullptr_t overload to make sure that it works for RawPtr case (RawPtr ...
6 years, 10 months ago (2014-02-18 12:34:51 UTC) #10
sof
https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h File public/platform/WebPrivatePtr.h (right): https://codereview.chromium.org/169653006/diff/130001/public/platform/WebPrivatePtr.h#newcode132 public/platform/WebPrivatePtr.h:132: void assign(const PassRefPtr<T>& val) { assign(val.get()); } On 2014/02/18 ...
6 years, 10 months ago (2014-02-18 12:58:56 UTC) #11
Vyacheslav Egorov (Chromium)
:-( I tested both with and without OilPan it worked. Which compiler do you use? ...
6 years, 10 months ago (2014-02-18 13:12:20 UTC) #12
sof
On 2014/02/18 13:12:20, Vyacheslav Egorov wrote: > :-( > > I tested both with and ...
6 years, 10 months ago (2014-02-18 13:22:14 UTC) #13
sof
On 2014/02/18 13:22:14, sof wrote: > On 2014/02/18 13:12:20, Vyacheslav Egorov wrote: > > :-( ...
6 years, 10 months ago (2014-02-18 15:27:05 UTC) #14
Vyacheslav Egorov (Chromium)
6 years, 10 months ago (2014-02-18 15:35:02 UTC) #15
Thanks for fixing it!

Vyacheslav Egorov


On Tue, Feb 18, 2014 at 4:27 PM, <sigbjornf@opera.com> wrote:

> On 2014/02/18 13:22:14, sof wrote:
>
>> On 2014/02/18 13:12:20, Vyacheslav Egorov wrote:
>> > :-(
>> >
>> > I tested both with and without OilPan it worked.
>> >
>> > Which compiler do you use?
>> >
>> > In any case we can work around by doing rename first
>> >
>> > assign(RawPtr<T> ptr) -> assignImpl(T* ptr)
>> >
>> > and then the rest should call assignImpl after unwrapping respective
>> smart
>> > pointers:
>> >
>> > assign(RawPtr<T> ptr) { assignImpl(ptr.get()); }
>>
>
>  This is with g++-4.7.3; no problems with Oilpan disabled.
>>
>
>  Hmm, to make sure this isn't coming in via ccache somehow, I'll clear &
>>
> rebuild
>
>> next. Will try out your suggestions after that, thanks.
>>
>
> Ended up having to guide method resolution, see
> https://codereview.chromium.org/168963003/patch/750023/690021
>
> https://codereview.chromium.org/169653006/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to blink-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698