Commit ceb8e42b authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

[fastcall] Support FastApiCallbackOptions::CreateForTesting

https://crrev.com/c/2817958 is going to support artificial
calls of NoAllocDirectCall for a testing purpose, and this
new API will be used there.

Change-Id: If47ba080eede96e91ba60b89ff502dd3d3e34b93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2822188Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73945}
parent a9cd53c7
......@@ -194,6 +194,8 @@
namespace v8 {
class Isolate;
class CTypeInfo {
public:
enum class Type : uint8_t {
......@@ -321,6 +323,14 @@ struct ApiObject {
* \endcode
*/
struct FastApiCallbackOptions {
/**
* Creates a new instance of FastApiCallbackOptions for testing purpose. The
* returned instance may be filled with mock data.
*/
static FastApiCallbackOptions CreateForTesting(Isolate* isolate) {
return {false, {0}};
}
/**
* If the callback wants to signal an error condition or to perform an
* allocation, it must set options.fallback to true and do an early return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment