Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Side by Side Diff: src/api.cc

Issue 9395073: Fix memory leak and missing #include in StartupDataDecompressor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 24 matching lines...) Expand all
35 #include "bootstrapper.h" 35 #include "bootstrapper.h"
36 #include "compiler.h" 36 #include "compiler.h"
37 #include "conversions-inl.h" 37 #include "conversions-inl.h"
38 #include "counters.h" 38 #include "counters.h"
39 #include "debug.h" 39 #include "debug.h"
40 #include "deoptimizer.h" 40 #include "deoptimizer.h"
41 #include "execution.h" 41 #include "execution.h"
42 #include "global-handles.h" 42 #include "global-handles.h"
43 #include "heap-profiler.h" 43 #include "heap-profiler.h"
44 #include "messages.h" 44 #include "messages.h"
45 #ifdef COMPRESS_STARTUP_DATA_BZ2
46 #include "natives.h"
47 #endif
45 #include "parser.h" 48 #include "parser.h"
46 #include "platform.h" 49 #include "platform.h"
47 #include "profile-generator-inl.h" 50 #include "profile-generator-inl.h"
48 #include "property-details.h" 51 #include "property-details.h"
49 #include "property.h" 52 #include "property.h"
50 #include "runtime-profiler.h" 53 #include "runtime-profiler.h"
51 #include "scanner-character-streams.h" 54 #include "scanner-character-streams.h"
52 #include "snapshot.h" 55 #include "snapshot.h"
53 #include "unicode-inl.h" 56 #include "unicode-inl.h"
54 #include "v8threads.h" 57 #include "v8threads.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 &compressed_data[i].raw_size, 353 &compressed_data[i].raw_size,
351 compressed_data[i].data, 354 compressed_data[i].data,
352 compressed_data[i].compressed_size); 355 compressed_data[i].compressed_size);
353 if (result != 0) return result; 356 if (result != 0) return result;
354 } else { 357 } else {
355 ASSERT_EQ(0, compressed_data[i].raw_size); 358 ASSERT_EQ(0, compressed_data[i].raw_size);
356 } 359 }
357 compressed_data[i].data = decompressed; 360 compressed_data[i].data = decompressed;
358 } 361 }
359 V8::SetDecompressedStartupData(compressed_data); 362 V8::SetDecompressedStartupData(compressed_data);
363 i::DeleteArray(compressed_data);
360 return 0; 364 return 0;
361 } 365 }
362 366
363 367
364 StartupData::CompressionAlgorithm V8::GetCompressedStartupDataAlgorithm() { 368 StartupData::CompressionAlgorithm V8::GetCompressedStartupDataAlgorithm() {
365 #ifdef COMPRESS_STARTUP_DATA_BZ2 369 #ifdef COMPRESS_STARTUP_DATA_BZ2
366 return StartupData::kBZip2; 370 return StartupData::kBZip2;
367 #else 371 #else
368 return StartupData::kUncompressed; 372 return StartupData::kUncompressed;
369 #endif 373 #endif
(...skipping 5813 matching lines...) Expand 10 before | Expand all | Expand 10 after
6183 6187
6184 6188
6185 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6189 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6186 HandleScopeImplementer* scope_implementer = 6190 HandleScopeImplementer* scope_implementer =
6187 reinterpret_cast<HandleScopeImplementer*>(storage); 6191 reinterpret_cast<HandleScopeImplementer*>(storage);
6188 scope_implementer->IterateThis(v); 6192 scope_implementer->IterateThis(v);
6189 return storage + ArchiveSpacePerThread(); 6193 return storage + ArchiveSpacePerThread();
6190 } 6194 }
6191 6195
6192 } } // namespace v8::internal 6196 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698