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

Side by Side Diff: src/d8.cc

Issue 19959006: Pass the ArrayBuffer size to ArrayBuffer::Allocator::Free. Allows (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 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 | « include/v8.h ('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 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false); 1555 v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false);
1556 free(fake_argv[1]); 1556 free(fake_argv[1]);
1557 delete[] fake_argv; 1557 delete[] fake_argv;
1558 } 1558 }
1559 #endif 1559 #endif
1560 1560
1561 1561
1562 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator { 1562 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
1563 public: 1563 public:
1564 virtual void* Allocate(size_t length) { return malloc(length); } 1564 virtual void* Allocate(size_t length) { return malloc(length); }
1565 virtual void Free(void* data) { free(data); } 1565 virtual void Free(void* data, size_t length) { free(data); }
1566 }; 1566 };
1567 1567
1568 1568
1569 int Shell::Main(int argc, char* argv[]) { 1569 int Shell::Main(int argc, char* argv[]) {
1570 if (!SetOptions(argc, argv)) return 1; 1570 if (!SetOptions(argc, argv)) return 1;
1571 v8::V8::InitializeICU(); 1571 v8::V8::InitializeICU();
1572 #ifndef V8_SHARED 1572 #ifndef V8_SHARED
1573 i::FLAG_harmony_array_buffer = true; 1573 i::FLAG_harmony_array_buffer = true;
1574 i::FLAG_harmony_typed_arrays = true; 1574 i::FLAG_harmony_typed_arrays = true;
1575 #else 1575 #else
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 } 1645 }
1646 1646
1647 } // namespace v8 1647 } // namespace v8
1648 1648
1649 1649
1650 #ifndef GOOGLE3 1650 #ifndef GOOGLE3
1651 int main(int argc, char* argv[]) { 1651 int main(int argc, char* argv[]) {
1652 return v8::Shell::Main(argc, argv); 1652 return v8::Shell::Main(argc, argv);
1653 } 1653 }
1654 #endif 1654 #endif
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698