New issue
Advanced search Search tips

Issue 773351 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Remove ManualConstructor

Project Member Reported by dcheng@chromium.org, Oct 10 2017

Issue description

It was previously used to smuggle types with user-defined constructors/destructors in unions. C++11 no longer requires this, so let's get rid of this.
 
Wasn't it also used to avoid static initializers and destructors?

Comment 2 by dcheng@chromium.org, Oct 10 2017

That may have been true at one point, but I don't see it used for anything other than union-like types today.
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9eb43fd347890b4c6cf54c4bd7ec1bbb88e381e1

commit 9eb43fd347890b4c6cf54c4bd7ec1bbb88e381e1
Author: Daniel Cheng <dcheng@chromium.org>
Date: Tue Oct 10 21:28:37 2017

Use C++11 style unions for CBORValue

Bug:  773351 
Change-Id: I777e112b2fa2081dee3ffc9c1e17109ed2b3b7dd
Reviewed-on: https://chromium-review.googlesource.com/709900
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507776}
[modify] https://crrev.com/9eb43fd347890b4c6cf54c4bd7ec1bbb88e381e1/content/browser/webauth/cbor/cbor_values.cc
[modify] https://crrev.com/9eb43fd347890b4c6cf54c4bd7ec1bbb88e381e1/content/browser/webauth/cbor/cbor_values.h

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4729d4bb7553f3e3f0b33cd19d13bd896d0a2018

commit 4729d4bb7553f3e3f0b33cd19d13bd896d0a2018
Author: Daniel Cheng <dcheng@chromium.org>
Date: Wed Oct 11 00:42:37 2017

Use C++11 style unions in base::small_map

Bug:  773351 
Change-Id: Iab9e7874b5f231a35b79ae29b610fe5cc0be2989
Reviewed-on: https://chromium-review.googlesource.com/710321
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507842}
[modify] https://crrev.com/4729d4bb7553f3e3f0b33cd19d13bd896d0a2018/base/containers/small_map.h
[modify] https://crrev.com/4729d4bb7553f3e3f0b33cd19d13bd896d0a2018/base/containers/small_map_unittest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/11e98ce210b6892e2cff5082dc8e39eb222e2266

commit 11e98ce210b6892e2cff5082dc8e39eb222e2266
Author: Daniel Cheng <dcheng@chromium.org>
Date: Wed Oct 11 02:36:02 2017

Use C++11 style unions for MediaSinkInternal.

Bug:  773351 
Change-Id: I659d995ecb214f7d1bf2e8c67fa92d5d85eae6f8
Reviewed-on: https://chromium-review.googlesource.com/710154
Reviewed-by: Derek Cheng <imcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507865}
[modify] https://crrev.com/11e98ce210b6892e2cff5082dc8e39eb222e2266/chrome/common/media_router/discovery/media_sink_internal.cc
[modify] https://crrev.com/11e98ce210b6892e2cff5082dc8e39eb222e2266/chrome/common/media_router/discovery/media_sink_internal.h

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0bf476948928a005903a89c541f460f3b115c988

commit 0bf476948928a005903a89c541f460f3b115c988
Author: Daniel Cheng <dcheng@chromium.org>
Date: Wed Oct 11 04:55:51 2017

Remove ManualConstructor usage from JSON parser.

Bug:  773351 
Change-Id: Ife80a5466678ccc52c44e16f568193d53638be3a
Reviewed-on: https://chromium-review.googlesource.com/710056
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507896}
[modify] https://crrev.com/0bf476948928a005903a89c541f460f3b115c988/base/json/json_parser.cc
[modify] https://crrev.com/0bf476948928a005903a89c541f460f3b115c988/base/json/json_parser.h

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/34ef31b4db760d0445a8de0d7a0075982aea7b61

commit 34ef31b4db760d0445a8de0d7a0075982aea7b61
Author: Daniel Cheng <dcheng@chromium.org>
Date: Thu Oct 12 02:31:07 2017

Use C++11 style unions for base::Value.

ManualConstructor<T> is no longer needed in C++11.

Bug:  773351 
Change-Id: I264a4253c53535e6fbdcdfec91cecae60d5fe66f
Reviewed-on: https://chromium-review.googlesource.com/709954
Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508229}
[modify] https://crrev.com/34ef31b4db760d0445a8de0d7a0075982aea7b61/base/values.cc
[modify] https://crrev.com/34ef31b4db760d0445a8de0d7a0075982aea7b61/base/values.h

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f4ecd4bed36c803a8ab88e44bd5a91bdd3d95d46

commit f4ecd4bed36c803a8ab88e44bd5a91bdd3d95d46
Author: Daniel Cheng <dcheng@chromium.org>
Date: Fri Oct 13 19:51:46 2017

Remove base::ManualConstructor.

Usage of base::ManualConstructor can be replaced with unions,
base::Optional, or (in the future) std::aligned_storage.

Bug:  773351 
Change-Id: I1a82a2657798a98bf6c682702f22bb108d9cfc02
Reviewed-on: https://chromium-review.googlesource.com/711325
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508787}
[modify] https://crrev.com/f4ecd4bed36c803a8ab88e44bd5a91bdd3d95d46/base/BUILD.gn
[modify] https://crrev.com/f4ecd4bed36c803a8ab88e44bd5a91bdd3d95d46/base/containers/small_map.h
[delete] https://crrev.com/aab72059fa6f8fb493b41b3f1e8b4f611577fc36/base/memory/manual_constructor.h
[modify] https://crrev.com/f4ecd4bed36c803a8ab88e44bd5a91bdd3d95d46/tools/gdb/gdb_chrome.py
[modify] https://crrev.com/f4ecd4bed36c803a8ab88e44bd5a91bdd3d95d46/tools/gn/value.h

Comment 9 by dcheng@chromium.org, Oct 16 2017

Status: Fixed (was: Assigned)

Sign in to add a comment