Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fxv8_unittest.cpp
Go to the documentation of this file.
1// Copyright 2020 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "testing/fxv8_unittest.h"
6
7#include <memory>
8
9#include "fxjs/cfx_v8_array_buffer_allocator.h"
10#include "v8/include/v8-isolate.h"
11
12void FXV8UnitTest::V8IsolateDeleter::operator()(v8::Isolate* ptr) const {
13 ptr->Dispose();
14}
15
16FXV8UnitTest::FXV8UnitTest() = default;
17
18FXV8UnitTest::~FXV8UnitTest() = default;
19
21 array_buffer_allocator_ = std::make_unique<CFX_V8ArrayBufferAllocator>();
22
23 v8::Isolate::CreateParams params;
24 params.array_buffer_allocator = array_buffer_allocator_.get();
25 isolate_.reset(v8::Isolate::New(params));
26}
void SetUp() override
~FXV8UnitTest() override
void operator()(v8::Isolate *ptr) const