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

Issue 2250433006: Re-write many calls to WrapUnique() with MakeUnique() (Closed)

Created:
4 years, 4 months ago by Adam Rice
Modified:
4 years, 3 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, anandc+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, gcasto+watch-blimp_chromium.org, nyquist+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, jessicag+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, lethalantidote+watch-blimp_chromium.org, dtrainor+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, khushalsagar+watch-blimp_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Re-write many calls to WrapUnique() with MakeUnique() A mostly-automated change to convert instances of WrapUnique(new Foo(...)) to MakeUnique<Foo>(...). See the thread at https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/iQgMedVA8-k for background. To avoid requiring too many manual fixups, the change skips some cases that are frequently problematic. In particular, in methods named Foo::Method() it will not try to change WrapUnique(new Foo()) to MakeUnique<Foo>(). This is because Foo::Method() may be accessing an internal constructor of Foo. Cases where MakeUnique<NestedClass>(...) is called within a method of OuterClass are common but hard to detect automatically, so have been fixed-up manually. The only types of manual fix ups applied are: 1) Revert MakeUnique back to WrapUnique 2) Change NULL to nullptr in argument list (MakeUnique cannot forward NULL correctly) 3) Add base:: namespace qualifier where missing. WrapUnique(new Foo) has not been converted to MakeUnique<Foo>() as this might change behaviour if Foo does not have a user-defined constructor. For example, WrapUnique(new int) creates an unitialised integer, but MakeUnique<int>() creates an integer initialised to 0. git cl format has been been run over the CL. Spot-checking has uncovered no cases of mis-formatting. BUG=637812 Committed: https://crrev.com/b6983d553d1cd861d8f7c42a07ee209da696e1d5 Cr-Commit-Position: refs/heads/master@{#413966}

Patch Set 1 #

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -41 lines) Patch
M blimp/client/core/compositor/blob_image_serialization_processor.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M blimp/client/feature/compositor/blimp_compositor_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M blimp/client/feature/compositor/blimp_compositor_manager_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M blimp/client/feature/compositor/blimp_gpu_memory_buffer_manager.cc View 1 chunk +1 line, -2 lines 0 comments Download
M blimp/client/feature/compositor/blimp_input_manager.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M blimp/client/session/blimp_client_session.cc View 1 2 chunks +4 lines, -6 lines 0 comments Download
M blimp/engine/feature/geolocation/engine_geolocation_feature.cc View 1 chunk +1 line, -1 line 0 comments Download
M blimp/engine/renderer/engine_image_serialization_processor.cc View 1 chunk +1 line, -1 line 0 comments Download
M blimp/engine/session/blimp_engine_session.cc View 1 2 chunks +5 lines, -5 lines 0 comments Download
M blimp/net/blimp_message_checkpointer_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M blimp/net/blimp_message_multiplexer.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M blimp/net/blimp_message_output_buffer.cc View 1 chunk +1 line, -1 line 0 comments Download
M blimp/net/blimp_message_thread_pipe.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M blimp/net/blimp_message_thread_pipe_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M blimp/net/blob_channel/blob_channel_integration_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M blimp/net/engine_connection_manager_unittest.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M blimp/net/tcp_engine_transport.cc View 1 chunk +1 line, -2 lines 0 comments Download
M blimp/net/thread_pipe_manager_unittest.cc View 2 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
Adam Rice
4 years, 4 months ago (2016-08-19 07:00:25 UTC) #6
David Trainor- moved to gerrit
lgtm thanks!
4 years, 3 months ago (2016-08-22 21:11:09 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2250433006/1
4 years, 3 months ago (2016-08-24 01:48:15 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/117364) cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, ...
4 years, 3 months ago (2016-08-24 01:52:02 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2250433006/20001
4 years, 3 months ago (2016-08-24 02:25:54 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 3 months ago (2016-08-24 03:20:36 UTC) #15
commit-bot: I haz the power
4 years, 3 months ago (2016-08-24 03:24:58 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/b6983d553d1cd861d8f7c42a07ee209da696e1d5
Cr-Commit-Position: refs/heads/master@{#413966}

Powered by Google App Engine
This is Rietveld 408576698