Bug 41321
| Summary: | MASTER: Use std::make_unique or adoptRef at all call sites where new is used | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Darin Adler <darin> |
| Component: | WebKit Misc. | Assignee: | Darin Adler <darin> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | abarth |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | 28068, 41320, 41374, 44834, 46547, 75211, 75219, 75221, 75222 | ||
| Bug Blocks: | |||
Darin Adler
Working on a project where we will always adopt right after we call new.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Darin Adler
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_
Darin Adler
Changed my mind. We should minimize the use of direct calls to "new", but it’s impractical to forbid it entirely, I think.