New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 602726 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

GN should use std::unique_ptr for owning pointers, rather than using stl_util.h and manually managing them.

Project Member Reported by jbroman@chromium.org, Apr 12 2016

Issue description

Several gn classes have owning std::vector<T*> (or similar). It would be more idiomatic to use std::vector<std::unique_ptr<T>> (or similar), now that C++11 has arrived.

 
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 18 2016

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

commit 647a1af223628bb4e15b69a29ca257477282b737
Author: jbroman <jbroman@chromium.org>
Date: Mon Apr 18 20:14:08 2016

GN: Use std::unique_ptr for owned pointers in ImportManager.

BUG= 602726 

Review URL: https://codereview.chromium.org/1886453002

Cr-Commit-Position: refs/heads/master@{#387997}

[modify] https://crrev.com/647a1af223628bb4e15b69a29ca257477282b737/tools/gn/import_manager.cc
[modify] https://crrev.com/647a1af223628bb4e15b69a29ca257477282b737/tools/gn/import_manager.h

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 18 2016

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

commit ac5bf2c0d550e62f6cc58862990e7c4a1017cdf7
Author: jbroman <jbroman@chromium.org>
Date: Mon Apr 18 20:34:00 2016

GN: Use std::unique_ptr for owning pointers in Scope::NamedScopeMap.

BUG= 602726 

Review URL: https://codereview.chromium.org/1885513003

Cr-Commit-Position: refs/heads/master@{#388002}

[modify] https://crrev.com/ac5bf2c0d550e62f6cc58862990e7c4a1017cdf7/tools/gn/scope.cc
[modify] https://crrev.com/ac5bf2c0d550e62f6cc58862990e7c4a1017cdf7/tools/gn/scope.h

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 18 2016

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

commit f9b6b5ae0cd8396663e5c1b06468384fc9d89688
Author: jbroman <jbroman@chromium.org>
Date: Mon Apr 18 20:59:38 2016

GN: Use std::unique_ptr in Loader::ToolchainRecordMap.

BUG= 602726 

Review URL: https://codereview.chromium.org/1878353002

Cr-Commit-Position: refs/heads/master@{#388015}

[modify] https://crrev.com/f9b6b5ae0cd8396663e5c1b06468384fc9d89688/tools/gn/loader.cc
[modify] https://crrev.com/f9b6b5ae0cd8396663e5c1b06468384fc9d89688/tools/gn/loader.h

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 18 2016

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

commit 959ec4e4802a64b022d7101eafbc791a0339e971
Author: jbroman <jbroman@chromium.org>
Date: Mon Apr 18 21:08:10 2016

GN: Use std::unique_ptr for owning pointers in InputFileManager.

BUG= 602726 

Review URL: https://codereview.chromium.org/1877253003

Cr-Commit-Position: refs/heads/master@{#388022}

[modify] https://crrev.com/959ec4e4802a64b022d7101eafbc791a0339e971/tools/gn/input_file_manager.cc
[modify] https://crrev.com/959ec4e4802a64b022d7101eafbc791a0339e971/tools/gn/input_file_manager.h

Status: Fixed (was: Started)

Sign in to add a comment