| Index: src/gdb-jit.cc
|
| ===================================================================
|
| --- src/gdb-jit.cc (revision 14512)
|
| +++ src/gdb-jit.cc (working copy)
|
| @@ -500,10 +500,10 @@
|
| #if defined(__MACH_O)
|
| class MachO BASE_EMBEDDED {
|
| public:
|
| - MachO() : sections_(6) { }
|
| + explicit MachO(Zone * zone) : sections_(6, zone) { }
|
|
|
| - uint32_t AddSection(MachOSection* section) {
|
| - sections_.Add(section);
|
| + uint32_t AddSection(MachOSection* section, Zone* zone) {
|
| + sections_.Add(section, zone);
|
| return sections_.length() - 1;
|
| }
|
|
|
| @@ -1919,14 +1919,15 @@
|
| static JITCodeEntry* CreateELFObject(CodeDescription* desc, Zone* zone) {
|
| ZoneScope zone_scope(zone, DELETE_ON_EXIT);
|
| #ifdef __MACH_O
|
| - MachO mach_o;
|
| + MachO mach_o(zone);
|
| Writer w(&mach_o);
|
|
|
| - mach_o.AddSection(new MachOTextSection(kCodeAlignment,
|
| - desc->CodeStart(),
|
| - desc->CodeSize()));
|
| + mach_o.AddSection(new(zone) MachOTextSection(kCodeAlignment,
|
| + desc->CodeStart(),
|
| + desc->CodeSize()),
|
| + zone);
|
|
|
| - CreateDWARFSections(desc, &mach_o);
|
| + CreateDWARFSections(desc, zone, &mach_o);
|
|
|
| mach_o.Write(&w, desc->CodeStart(), desc->CodeSize());
|
| #else
|
|
|