| OLD | NEW |
| 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 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1522 void* data = AllocateUninitialized(length); | 1522 void* data = AllocateUninitialized(length); |
| 1523 return data == NULL ? data : memset(data, 0, length); | 1523 return data == NULL ? data : memset(data, 0, length); |
| 1524 } | 1524 } |
| 1525 virtual void* AllocateUninitialized(size_t length) { return malloc(length); } | 1525 virtual void* AllocateUninitialized(size_t length) { return malloc(length); } |
| 1526 virtual void Free(void* data, size_t) { free(data); } | 1526 virtual void Free(void* data, size_t) { free(data); } |
| 1527 }; | 1527 }; |
| 1528 | 1528 |
| 1529 | 1529 |
| 1530 class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 1530 class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
| 1531 public: | 1531 public: |
| 1532 virtual void* Allocate(size_t) V8_OVERRIDE { | 1532 virtual void* Allocate(size_t) OVERRIDE { |
| 1533 return malloc(0); | 1533 return malloc(0); |
| 1534 } | 1534 } |
| 1535 virtual void* AllocateUninitialized(size_t length) V8_OVERRIDE { | 1535 virtual void* AllocateUninitialized(size_t length) OVERRIDE { |
| 1536 return malloc(0); | 1536 return malloc(0); |
| 1537 } | 1537 } |
| 1538 virtual void Free(void* p, size_t) V8_OVERRIDE { | 1538 virtual void Free(void* p, size_t) OVERRIDE { |
| 1539 free(p); | 1539 free(p); |
| 1540 } | 1540 } |
| 1541 }; | 1541 }; |
| 1542 | 1542 |
| 1543 | 1543 |
| 1544 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 1544 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| 1545 class StartupDataHandler { | 1545 class StartupDataHandler { |
| 1546 public: | 1546 public: |
| 1547 StartupDataHandler(const char* natives_blob, | 1547 StartupDataHandler(const char* natives_blob, |
| 1548 const char* snapshot_blob) { | 1548 const char* snapshot_blob) { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 } | 1691 } |
| 1692 | 1692 |
| 1693 } // namespace v8 | 1693 } // namespace v8 |
| 1694 | 1694 |
| 1695 | 1695 |
| 1696 #ifndef GOOGLE3 | 1696 #ifndef GOOGLE3 |
| 1697 int main(int argc, char* argv[]) { | 1697 int main(int argc, char* argv[]) { |
| 1698 return v8::Shell::Main(argc, argv); | 1698 return v8::Shell::Main(argc, argv); |
| 1699 } | 1699 } |
| 1700 #endif | 1700 #endif |
| OLD | NEW |