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

Side by Side Diff: include/v8.h

Issue 2773063002: [wasm] Override mechanism for wasm js APIs (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/runtime/runtime-test.cc » ('J')
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 5990 matching lines...) Expand 10 before | Expand all | Expand 10 after
6001 */ 6001 */
6002 6002
6003 typedef bool (*AllowWasmCompileCallback)(Isolate* isolate, Local<Value> source, 6003 typedef bool (*AllowWasmCompileCallback)(Isolate* isolate, Local<Value> source,
6004 bool as_promise); 6004 bool as_promise);
6005 6005
6006 typedef bool (*AllowWasmInstantiateCallback)(Isolate* isolate, 6006 typedef bool (*AllowWasmInstantiateCallback)(Isolate* isolate,
6007 Local<Value> module_or_bytes, 6007 Local<Value> module_or_bytes,
6008 MaybeLocal<Value> ffi, 6008 MaybeLocal<Value> ffi,
6009 bool as_promise); 6009 bool as_promise);
6010 6010
6011 typedef bool (*ExtensionCallback)(const FunctionCallbackInfo<Value>&);
bradnelson 2017/03/24 17:45:24 This is pretty generic name, is the idea we'd even
Mircea Trofin 2017/03/24 17:57:55 The hope is we'd delete this in favor of a "Extras
6012
6011 // --- Garbage Collection Callbacks --- 6013 // --- Garbage Collection Callbacks ---
6012 6014
6013 /** 6015 /**
6014 * Applications can register callback functions which will be called before and 6016 * Applications can register callback functions which will be called before and
6015 * after certain garbage collection operations. Allocations are not allowed in 6017 * after certain garbage collection operations. Allocations are not allowed in
6016 * the callback functions, you therefore cannot manipulate objects (set or 6018 * the callback functions, you therefore cannot manipulate objects (set or
6017 * delete properties for example) since it is possible such operations will 6019 * delete properties for example) since it is possible such operations will
6018 * result in the allocation of objects. 6020 * result in the allocation of objects.
6019 */ 6021 */
6020 enum GCType { 6022 enum GCType {
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
7244 /** 7246 /**
7245 * Set the callback to invoke to check if wasm compilation from 7247 * Set the callback to invoke to check if wasm compilation from
7246 * the specified object is allowed. By default, wasm compilation 7248 * the specified object is allowed. By default, wasm compilation
7247 * is allowed. 7249 * is allowed.
7248 * 7250 *
7249 * Similar for instantiate. 7251 * Similar for instantiate.
7250 */ 7252 */
7251 void SetAllowWasmCompileCallback(AllowWasmCompileCallback callback); 7253 void SetAllowWasmCompileCallback(AllowWasmCompileCallback callback);
7252 void SetAllowWasmInstantiateCallback(AllowWasmInstantiateCallback callback); 7254 void SetAllowWasmInstantiateCallback(AllowWasmInstantiateCallback callback);
7253 7255
7256 void SetWasmModuleCallback(ExtensionCallback callback);
7257 void SetWasmCompileCallback(ExtensionCallback callback);
7258 void SetWasmInstanceCallback(ExtensionCallback callback);
7259 void SetWasmInstantiateCallback(ExtensionCallback callback);
7260
7254 /** 7261 /**
7255 * Check if V8 is dead and therefore unusable. This is the case after 7262 * Check if V8 is dead and therefore unusable. This is the case after
7256 * fatal errors such as out-of-memory situations. 7263 * fatal errors such as out-of-memory situations.
7257 */ 7264 */
7258 bool IsDead(); 7265 bool IsDead();
7259 7266
7260 /** 7267 /**
7261 * Adds a message listener (errors only). 7268 * Adds a message listener (errors only).
7262 * 7269 *
7263 * The same message listener can be added more than once and in that 7270 * The same message listener can be added more than once and in that
(...skipping 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after
9917 */ 9924 */
9918 9925
9919 9926
9920 } // namespace v8 9927 } // namespace v8
9921 9928
9922 9929
9923 #undef TYPE_CHECK 9930 #undef TYPE_CHECK
9924 9931
9925 9932
9926 #endif // INCLUDE_V8_H_ 9933 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/runtime/runtime-test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698