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

Side by Side Diff: src/d8.cc

Issue 21803002: Add size_t length argument to v8::ArrayBuffer::Allocator::Free. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Shared buold fixed Created 7 years, 4 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 | « src/api.cc ('k') | src/runtime.cc » ('j') | 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 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1628 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator { 1628 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
1629 public: 1629 public:
1630 virtual void* Allocate(size_t length) { 1630 virtual void* Allocate(size_t length) {
1631 void* result = malloc(length); 1631 void* result = malloc(length);
1632 memset(result, 0, length); 1632 memset(result, 0, length);
1633 return result; 1633 return result;
1634 } 1634 }
1635 virtual void* AllocateUninitialized(size_t length) { 1635 virtual void* AllocateUninitialized(size_t length) {
1636 return malloc(length); 1636 return malloc(length);
1637 } 1637 }
1638 virtual void Free(void* data) { free(data); } 1638 virtual void Free(void* data, size_t) { free(data); }
1639 // TODO(dslomov): Remove when v8:2823 is fixed.
1640 virtual void Free(void* data) {
1641 #ifndef V8_SHARED
1642 UNREACHABLE();
1643 #endif
1644 }
1639 }; 1645 };
1640 1646
1641 1647
1642 int Shell::Main(int argc, char* argv[]) { 1648 int Shell::Main(int argc, char* argv[]) {
1643 if (!SetOptions(argc, argv)) return 1; 1649 if (!SetOptions(argc, argv)) return 1;
1644 v8::V8::InitializeICU(); 1650 v8::V8::InitializeICU();
1645 #ifndef V8_SHARED 1651 #ifndef V8_SHARED
1646 i::FLAG_harmony_array_buffer = true; 1652 i::FLAG_harmony_array_buffer = true;
1647 i::FLAG_harmony_typed_arrays = true; 1653 i::FLAG_harmony_typed_arrays = true;
1648 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; 1654 i::FLAG_trace_hydrogen_file = "hydrogen.cfg";
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 } 1732 }
1727 1733
1728 } // namespace v8 1734 } // namespace v8
1729 1735
1730 1736
1731 #ifndef GOOGLE3 1737 #ifndef GOOGLE3
1732 int main(int argc, char* argv[]) { 1738 int main(int argc, char* argv[]) {
1733 return v8::Shell::Main(argc, argv); 1739 return v8::Shell::Main(argc, argv);
1734 } 1740 }
1735 #endif 1741 #endif
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698