Bug 41321 - MASTER: Use std::make_unique or adoptRef at all call sites where new is used
Summary: MASTER: Use std::make_unique or adoptRef at all call sites where new is used
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on: 28068 41320 41374 44834 46547 75211 75219 75221 75222
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-28 17:51 PDT by Darin Adler
Modified: 2019-04-21 14:18 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2010-06-28 17:51:02 PDT
Working on a project where we will always adopt right after we call new.
Comment 1 Darin Adler 2011-12-25 19:46:24 PST
Command line I am using to find additional call sites for new:

find . -name '*.cpp' -o -name '*.mm' | xargs grep "new [a-zA-Z]" | grep -v adoptArrayPtr | grep -v adoptPtr | grep -v adoptRef | grep -v rena | grep -v ":[ \t]*/" | grep -v static | grep -v s_
Comment 2 Darin Adler 2019-04-21 14:18:29 PDT
Changed my mind. We should minimize the use of direct calls to "new", but it’s impractical to forbid it entirely, I think.