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

Side by Side Diff: src/d8.cc

Issue 21818003: Revert "Add size_t length argument to v8::ArrayBuffer::Allocator::Free." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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, size_t) { free(data); } 1638 virtual void Free(void* data) { free(data); }
1639 // TODO(dslomov): Remove when v8:2823 is fixed.
1640 virtual void Free(void* data) { UNREACHABLE(); }
1641 }; 1639 };
1642 1640
1643 1641
1644 int Shell::Main(int argc, char* argv[]) { 1642 int Shell::Main(int argc, char* argv[]) {
1645 if (!SetOptions(argc, argv)) return 1; 1643 if (!SetOptions(argc, argv)) return 1;
1646 v8::V8::InitializeICU(); 1644 v8::V8::InitializeICU();
1647 #ifndef V8_SHARED 1645 #ifndef V8_SHARED
1648 i::FLAG_harmony_array_buffer = true; 1646 i::FLAG_harmony_array_buffer = true;
1649 i::FLAG_harmony_typed_arrays = true; 1647 i::FLAG_harmony_typed_arrays = true;
1650 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; 1648 i::FLAG_trace_hydrogen_file = "hydrogen.cfg";
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1728 } 1726 }
1729 1727
1730 } // namespace v8 1728 } // namespace v8
1731 1729
1732 1730
1733 #ifndef GOOGLE3 1731 #ifndef GOOGLE3
1734 int main(int argc, char* argv[]) { 1732 int main(int argc, char* argv[]) {
1735 return v8::Shell::Main(argc, argv); 1733 return v8::Shell::Main(argc, argv);
1736 } 1734 }
1737 #endif 1735 #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