summaryrefslogtreecommitdiffstats
path: root/courgette/BUILD.gn
diff options
context:
space:
mode:
authorhuangs <huangs@chromium.org>2016-01-28 16:11:48 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-29 00:12:39 +0000
commit0a9cbf1781a114b35a4e0f4a834f2d24ade2e917 (patch)
tree964fa6b24b09ce95b4178692f0af9d28167ec331 /courgette/BUILD.gn
parentb85b92b4639f690a9a523a910211d432dba568a2 (diff)
downloadchromium_src-0a9cbf1781a114b35a4e0f4a834f2d24ade2e917.zip
chromium_src-0a9cbf1781a114b35a4e0f4a834f2d24ade2e917.tar.gz
chromium_src-0a9cbf1781a114b35a4e0f4a834f2d24ade2e917.tar.bz2
[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. Review URL: https://codereview.chromium.org/1629703002 Cr-Commit-Position: refs/heads/master@{#372212}
Diffstat (limited to 'courgette/BUILD.gn')
-rw-r--r--courgette/BUILD.gn2
1 files changed, 2 insertions, 0 deletions
diff --git a/courgette/BUILD.gn b/courgette/BUILD.gn
index 6645093..8916c15 100644
--- a/courgette/BUILD.gn
+++ b/courgette/BUILD.gn
@@ -42,6 +42,8 @@ static_library("courgette_lib") {
"memory_allocator.h",
"patch_generator_x86_32.h",
"patcher_x86_32.h",
+ "program_detector.cc",
+ "program_detector.h",
"region.h",
"rel32_finder_win32_x86.cc",
"rel32_finder_win32_x86.h",