forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Courgette] Refactor: Manage AssemblyProgram and EncodedProgram with …
…scoped_ptr. Previously naked pointers AssemblyProgram and EncodedProgram are used over the place, and are deallocated using Delete{AssemblyProgram, EncodedProgram}(). In this CL we use scoped_ptr to manage the life cycles of these objects. - Removed DeleteAssemblyProgram() and DeleteEncodedProgram() and replaced calls with e.g., program.reset(nullptr); if the manual deallocation is a peak memory optimization. - Moved Encode() and ReadEncodedProgram() to the .h files matching the .cc files. - Extracted DetectExecutableType() and ParseDetectedExecutable() from disassembly.* to new files program_detector*c, since Disassembly is really an implementation that caller's don't care about. Committed: https://crrev.com/0a9cbf1781a114b35a4e0f4a834f2d24ade2e917 Cr-Commit-Position: refs/heads/master@{#372212} Review URL: https://codereview.chromium.org/1629703002 Cr-Commit-Position: refs/heads/master@{#372436}
- Loading branch information
1 parent
7fa91f7
commit 8d5be25
Showing
19 changed files
with
322 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.