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

Side by Side Diff: include/v8.h

Issue 768543002: [WIP] TrapHandler 2014/11/27. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « BUILD.gn ('k') | samples/shell.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 // 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 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 2926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2937 * Allocate |length| bytes. Return NULL if allocation is not successful. 2937 * Allocate |length| bytes. Return NULL if allocation is not successful.
2938 * Memory should be initialized to zeroes. 2938 * Memory should be initialized to zeroes.
2939 */ 2939 */
2940 virtual void* Allocate(size_t length) = 0; 2940 virtual void* Allocate(size_t length) = 0;
2941 2941
2942 /** 2942 /**
2943 * Allocate |length| bytes. Return NULL if allocation is not successful. 2943 * Allocate |length| bytes. Return NULL if allocation is not successful.
2944 * Memory does not have to be initialized. 2944 * Memory does not have to be initialized.
2945 */ 2945 */
2946 virtual void* AllocateUninitialized(size_t length) = 0; 2946 virtual void* AllocateUninitialized(size_t length) = 0;
2947
2948 /**
2949 * Allocate |length| bytes. Return NULL if allocation is not successful,
2950 * otherwise return a pointer that is a multiple of |alignment|. Memory
2951 * does not have to be initialized.
2952 */
2953 virtual void* Allocate(size_t length, size_t alignment) { return NULL; }
2954
2947 /** 2955 /**
2948 * Free the memory block of size |length|, pointed to by |data|. 2956 * Free the memory block of size |length|, pointed to by |data|.
2949 * That memory is guaranteed to be previously allocated by |Allocate|. 2957 * That memory is guaranteed to be previously allocated by |Allocate|.
2950 */ 2958 */
2951 virtual void Free(void* data, size_t length) = 0; 2959 virtual void Free(void* data, size_t length) = 0;
2960
2961 /**
2962 * Free the memory block pointed to by |data|. That memory is guaranteed
2963 * to be previously allocated by |Allocate|.
2964 */
2965 virtual void Free(void* data) {}
2952 }; 2966 };
2953 2967
2954 /** 2968 /**
2955 * The contents of an |ArrayBuffer|. Externalization of |ArrayBuffer| 2969 * The contents of an |ArrayBuffer|. Externalization of |ArrayBuffer|
2956 * returns an instance of this class, populated, with a pointer to data 2970 * returns an instance of this class, populated, with a pointer to data
2957 * and byte length. 2971 * and byte length.
2958 * 2972 *
2959 * The Data pointer of ArrayBuffer::Contents is always allocated with 2973 * The Data pointer of ArrayBuffer::Contents is always allocated with
2960 * Allocator::Allocate that is set with V8::SetArrayBufferAllocator. 2974 * Allocator::Allocate that is set with V8::SetArrayBufferAllocator.
2961 * 2975 *
(...skipping 4417 matching lines...) Expand 10 before | Expand all | Expand 10 after
7379 */ 7393 */
7380 7394
7381 7395
7382 } // namespace v8 7396 } // namespace v8
7383 7397
7384 7398
7385 #undef TYPE_CHECK 7399 #undef TYPE_CHECK
7386 7400
7387 7401
7388 #endif // V8_H_ 7402 #endif // V8_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | samples/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698