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 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1577 void* data = AllocateUninitialized(length); | 1577 void* data = AllocateUninitialized(length); |
1578 return data == NULL ? data : memset(data, 0, length); | 1578 return data == NULL ? data : memset(data, 0, length); |
1579 } | 1579 } |
1580 virtual void* AllocateUninitialized(size_t length) { return malloc(length); } | 1580 virtual void* AllocateUninitialized(size_t length) { return malloc(length); } |
1581 virtual void Free(void* data, size_t) { free(data); } | 1581 virtual void Free(void* data, size_t) { free(data); } |
1582 }; | 1582 }; |
1583 | 1583 |
1584 | 1584 |
1585 class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 1585 class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
1586 public: | 1586 public: |
1587 void* Allocate(size_t) OVERRIDE { return malloc(1); } | 1587 void* Allocate(size_t) override { return malloc(1); } |
1588 void* AllocateUninitialized(size_t length) OVERRIDE { return malloc(1); } | 1588 void* AllocateUninitialized(size_t length) override { return malloc(1); } |
1589 void Free(void* p, size_t) OVERRIDE { free(p); } | 1589 void Free(void* p, size_t) override { free(p); } |
1590 }; | 1590 }; |
1591 | 1591 |
1592 | 1592 |
1593 int Shell::Main(int argc, char* argv[]) { | 1593 int Shell::Main(int argc, char* argv[]) { |
1594 #if (defined(_WIN32) || defined(_WIN64)) | 1594 #if (defined(_WIN32) || defined(_WIN64)) |
1595 UINT new_flags = | 1595 UINT new_flags = |
1596 SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX; | 1596 SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX; |
1597 UINT existing_flags = SetErrorMode(new_flags); | 1597 UINT existing_flags = SetErrorMode(new_flags); |
1598 SetErrorMode(existing_flags | new_flags); | 1598 SetErrorMode(existing_flags | new_flags); |
1599 #if defined(_MSC_VER) | 1599 #if defined(_MSC_VER) |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1717 } | 1717 } |
1718 | 1718 |
1719 } // namespace v8 | 1719 } // namespace v8 |
1720 | 1720 |
1721 | 1721 |
1722 #ifndef GOOGLE3 | 1722 #ifndef GOOGLE3 |
1723 int main(int argc, char* argv[]) { | 1723 int main(int argc, char* argv[]) { |
1724 return v8::Shell::Main(argc, argv); | 1724 return v8::Shell::Main(argc, argv); |
1725 } | 1725 } |
1726 #endif | 1726 #endif |
OLD | NEW |