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

Side by Side Diff: src/d8.cc

Issue 306583006: Free memory in the mock array buffer allocator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 1464
1465 1465
1466 class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator { 1466 class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
1467 public: 1467 public:
1468 virtual void* Allocate(size_t) V8_OVERRIDE { 1468 virtual void* Allocate(size_t) V8_OVERRIDE {
1469 return malloc(0); 1469 return malloc(0);
1470 } 1470 }
1471 virtual void* AllocateUninitialized(size_t length) V8_OVERRIDE { 1471 virtual void* AllocateUninitialized(size_t length) V8_OVERRIDE {
1472 return malloc(0); 1472 return malloc(0);
1473 } 1473 }
1474 virtual void Free(void*, size_t) V8_OVERRIDE { 1474 virtual void Free(void* p, size_t) V8_OVERRIDE {
1475 free(p);
1475 } 1476 }
1476 }; 1477 };
1477 1478
1478 1479
1479 int Shell::Main(int argc, char* argv[]) { 1480 int Shell::Main(int argc, char* argv[]) {
1480 if (!SetOptions(argc, argv)) return 1; 1481 if (!SetOptions(argc, argv)) return 1;
1481 v8::V8::InitializeICU(options.icu_data_file); 1482 v8::V8::InitializeICU(options.icu_data_file);
1482 SetFlagsFromString("--trace-hydrogen-file=hydrogen.cfg"); 1483 SetFlagsFromString("--trace-hydrogen-file=hydrogen.cfg");
1483 SetFlagsFromString("--redirect-code-traces-to=code.asm"); 1484 SetFlagsFromString("--redirect-code-traces-to=code.asm");
1484 ShellArrayBufferAllocator array_buffer_allocator; 1485 ShellArrayBufferAllocator array_buffer_allocator;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 } 1561 }
1561 1562
1562 } // namespace v8 1563 } // namespace v8
1563 1564
1564 1565
1565 #ifndef GOOGLE3 1566 #ifndef GOOGLE3
1566 int main(int argc, char* argv[]) { 1567 int main(int argc, char* argv[]) {
1567 return v8::Shell::Main(argc, argv); 1568 return v8::Shell::Main(argc, argv);
1568 } 1569 }
1569 #endif 1570 #endif
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