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

Issue 2071003003: Imported Optional from Chromium with some modifications.

Created:
4 years, 6 months ago by ossu
Modified:
3 years, 10 months ago
Reviewers:
kwiberg-webrtc
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Imported Optional from Chromium with some modifications. Specifically I reimplemented the OptionalStorage class it uses with a union, rather than their AlignedMemory class. This means less code has to be moved over and it's also a much more standard solution for this type of thing.

Patch Set 1 #

Total comments: 3

Patch Set 2 : Explicitly implemented default constructor, since it gets implicitly deleted on some platforms. #

Patch Set 3 : Updated DecoderDatabase::DecoderInfo for new rtc::Optional a bit more. #

Patch Set 4 : Added an empty member to the OptionalStorage union, to make the union always initializable. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1668 lines, -557 lines) Patch
M webrtc/base/optional.h View 1 2 3 1 chunk +417 lines, -153 lines 0 comments Download
M webrtc/base/optional_unittest.cc View 1 chunk +1224 lines, -395 lines 0 comments Download
M webrtc/base/template_util.h View 2 chunks +22 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/decoder_database.cc View 1 2 1 chunk +5 lines, -9 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
ossu
Import of Chromium's Optional. There seems to be a troll running about, because for some ...
4 years, 6 months ago (2016-06-17 14:51:49 UTC) #3
ossu
Some context to my last comment: The error I'm talking about can be seen in ...
4 years, 6 months ago (2016-06-17 14:54:01 UTC) #4
kwiberg-webrtc
https://codereview.chromium.org/2080003002 Because it makes little sense for us to fork Chromium's Optional. If union is ...
4 years, 6 months ago (2016-06-18 05:24:58 UTC) #5
tommi
On 2016/06/18 05:24:58, kwiberg-webrtc wrote: > https://codereview.chromium.org/2080003002 > > Because it makes little sense for ...
3 years, 10 months ago (2017-02-21 16:50:33 UTC) #6
ossu
3 years, 10 months ago (2017-02-21 16:55:48 UTC) #7
On 2017/02/21 16:50:33, tommi (webrtc) wrote:
> On 2016/06/18 05:24:58, kwiberg-webrtc wrote:
> > https://codereview.chromium.org/2080003002
> > 
> > Because it makes little sense for us to fork Chromium's Optional. If union
is
> a
> > good idea for us, it probably is for Chromium too.
> 
> should we close this issue?

I'm not sure. It's there as a vague reminder I should do something about this at
some point. I believe having a more conforming Optional, with nullopt for
example, would be a good thing. It's just not been a priority for me lately.

Powered by Google App Engine
This is Rietveld 408576698