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

Side by Side Diff: include/v8.h

Issue 684103002: allow disabling of ArrayBuffer neutering (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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/api.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 2938 matching lines...) Expand 10 before | Expand all | Expand 10 after
2949 static Local<ArrayBuffer> New(Isolate* isolate, void* data, 2949 static Local<ArrayBuffer> New(Isolate* isolate, void* data,
2950 size_t byte_length); 2950 size_t byte_length);
2951 2951
2952 /** 2952 /**
2953 * Returns true if ArrayBuffer is extrenalized, that is, does not 2953 * Returns true if ArrayBuffer is extrenalized, that is, does not
2954 * own its memory block. 2954 * own its memory block.
2955 */ 2955 */
2956 bool IsExternal() const; 2956 bool IsExternal() const;
2957 2957
2958 /** 2958 /**
2959 * Returns true if this ArrayBuffer may be neutered.
2960 */
2961 bool IsNeuterable() const;
2962
2963 /**
2959 * Neuters this ArrayBuffer and all its views (typed arrays). 2964 * Neuters this ArrayBuffer and all its views (typed arrays).
2960 * Neutering sets the byte length of the buffer and all typed arrays to zero, 2965 * Neutering sets the byte length of the buffer and all typed arrays to zero,
2961 * preventing JavaScript from ever accessing underlying backing store. 2966 * preventing JavaScript from ever accessing underlying backing store.
2962 * ArrayBuffer should have been externalized. 2967 * ArrayBuffer should have been externalized and must be neuterable.
2963 */ 2968 */
2964 void Neuter(); 2969 void Neuter();
2965 2970
2966 /** 2971 /**
2967 * Make this ArrayBuffer external. The pointer to underlying memory block 2972 * Make this ArrayBuffer external. The pointer to underlying memory block
2968 * and byte length are returned as |Contents| structure. After ArrayBuffer 2973 * and byte length are returned as |Contents| structure. After ArrayBuffer
2969 * had been etxrenalized, it does no longer owns the memory block. The caller 2974 * had been etxrenalized, it does no longer owns the memory block. The caller
2970 * should take steps to free memory when it is no longer needed. 2975 * should take steps to free memory when it is no longer needed.
2971 * 2976 *
2972 * The memory block is guaranteed to be allocated with |Allocator::Allocate| 2977 * The memory block is guaranteed to be allocated with |Allocator::Allocate|
(...skipping 4365 matching lines...) Expand 10 before | Expand all | Expand 10 after
7338 */ 7343 */
7339 7344
7340 7345
7341 } // namespace v8 7346 } // namespace v8
7342 7347
7343 7348
7344 #undef TYPE_CHECK 7349 #undef TYPE_CHECK
7345 7350
7346 7351
7347 #endif // V8_H_ 7352 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698