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

Side by Side Diff: include/v8.h

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 | « no previous file | src/d8.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 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after
2399 virtual ~Allocator() {} 2399 virtual ~Allocator() {}
2400 2400
2401 /** 2401 /**
2402 * Allocate |length| bytes. Return NULL if allocation is not successful. 2402 * Allocate |length| bytes. Return NULL if allocation is not successful.
2403 */ 2403 */
2404 virtual void* Allocate(size_t length) = 0; 2404 virtual void* Allocate(size_t length) = 0;
2405 /** 2405 /**
2406 * Free the memory pointed to |data|. That memory is guaranteed to be 2406 * Free the memory pointed to |data|. That memory is guaranteed to be
2407 * previously allocated by |Allocate|. 2407 * previously allocated by |Allocate|.
2408 */ 2408 */
2409 virtual void Free(void* data) = 0; 2409 virtual void Free(void* data, size_t length) = 0;
2410 }; 2410 };
2411 2411
2412 /** 2412 /**
2413 * The contents of an |ArrayBuffer|. Externalization of |ArrayBuffer| 2413 * The contents of an |ArrayBuffer|. Externalization of |ArrayBuffer|
2414 * returns an instance of this class, populated, with a pointer to data 2414 * returns an instance of this class, populated, with a pointer to data
2415 * and byte length. 2415 * and byte length.
2416 * 2416 *
2417 * The Data pointer of ArrayBuffer::Contents is always allocated with 2417 * The Data pointer of ArrayBuffer::Contents is always allocated with
2418 * Allocator::Allocate that is set with V8::SetArrayBufferAllocator. 2418 * Allocator::Allocate that is set with V8::SetArrayBufferAllocator.
2419 * 2419 *
(...skipping 4061 matching lines...) Expand 10 before | Expand all | Expand 10 after
6481 6481
6482 6482
6483 } // namespace v8 6483 } // namespace v8
6484 6484
6485 6485
6486 #undef V8EXPORT 6486 #undef V8EXPORT
6487 #undef TYPE_CHECK 6487 #undef TYPE_CHECK
6488 6488
6489 6489
6490 #endif // V8_H_ 6490 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698