|
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
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
Committed: https://crrev.com/da4bffb6ef5cb7c8894c64d4666ac6a5da4d80fb
Cr-Commit-Position: refs/heads/master@{#413409}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+128 lines, -134 lines) |
Patch |
 |
M |
cc/animation/animation_host.cc
|
View
|
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
cc/animation/animation_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/animation/transform_operations_unittest.cc
|
View
|
|
2 chunks |
+16 lines, -16 lines |
0 comments
|
Download
|
 |
M |
cc/blink/web_content_layer_impl.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cc/debug/micro_benchmark_controller.cc
|
View
|
1
|
1 chunk |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
cc/debug/micro_benchmark_controller_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/layers/layer_impl.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cc/layers/texture_layer.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/output/bsp_tree.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cc/output/gl_renderer.cc
|
View
|
1
2
|
8 chunks |
+15 lines, -15 lines |
0 comments
|
Download
|
 |
M |
cc/output/gl_renderer_unittest.cc
|
View
|
1
|
3 chunks |
+5 lines, -7 lines |
0 comments
|
Download
|
 |
M |
cc/output/overlay_unittest.cc
|
View
|
1
|
4 chunks |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
M |
cc/output/software_renderer.cc
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/playback/clip_path_display_item.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cc/playback/compositing_display_item.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cc/playback/filter_display_item.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cc/playback/float_clip_display_item.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cc/playback/transform_display_item.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cc/raster/gpu_raster_buffer_provider.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/raster/one_copy_raster_buffer_provider.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cc/raster/staging_buffer_pool.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/test/fake_image_serialization_processor.cc
|
View
|
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
cc/test/fake_painted_scrollbar_layer.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/test/pixel_test.cc
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/test/remote_proto_channel_bridge.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/test/test_gpu_memory_buffer_manager.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/test/test_layer_tree_host_base.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/test/test_shared_bitmap_manager.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/tiles/eviction_tile_priority_queue.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/tiles/picture_layer_tiling_set.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/tiles/picture_layer_tiling_set_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/tiles/raster_tile_priority_queue_all.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/tiles/software_image_decode_controller.cc
|
View
|
1
2
|
2 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
cc/tiles/tile_manager_unittest.cc
|
View
|
1
2
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cc/trees/layer_tree_host_impl.cc
|
View
|
1
2
|
1 chunk |
+5 lines, -6 lines |
0 comments
|
Download
|
 |
M |
cc/trees/layer_tree_host_unittest.cc
|
View
|
1
2
|
4 chunks |
+9 lines, -8 lines |
0 comments
|
Download
|
 |
M |
cc/trees/remote_channel_impl.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/trees/threaded_channel.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
Total messages: 22 (15 generated)
|