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
fxjse.cpp
Go to the documentation of this file.
1// Copyright 2018 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// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "fxjs/xfa/fxjse.h"
8
9#include "fxjs/fxv8.h"
10#include "fxjs/xfa/cfxjse_context.h"
11#include "v8/include/v8-isolate.h"
12#include "v8/include/v8-object.h"
13#include "v8/include/v8-template.h"
14
15namespace pdfium::fxjse {
16
17const char kFuncTag[] = "function descriptor tag";
18const char kClassTag[] = "class descriptor tag";
19
20} // namespace pdfium::fxjse
21
22// static
23CFXJSE_HostObject* CFXJSE_HostObject::FromV8(v8::Local<v8::Value> arg) {
24 if (!fxv8::IsObject(arg))
25 return nullptr;
26
27 return FXJSE_RetrieveObjectBinding(arg.As<v8::Object>());
28}
29
31
33
34CFXJSE_FormCalcContext* CFXJSE_HostObject::AsFormCalcContext() {
35 return nullptr;
36}
37
39 return nullptr;
40}
41
42v8::Local<v8::Object> CFXJSE_HostObject::NewBoundV8Object(
43 v8::Isolate* pIsolate,
44 v8::Local<v8::FunctionTemplate> tmpl) {
45 v8::Local<v8::Object> hObject =
46 tmpl->InstanceTemplate()
47 ->NewInstance(pIsolate->GetCurrentContext())
48 .ToLocalChecked();
49 FXJSE_UpdateObjectBinding(hObject, this);
50 return hObject;
51}
virtual CJX_Object * AsCJXObject()
Definition fxjse.cpp:38
virtual CFXJSE_FormCalcContext * AsFormCalcContext()
Definition fxjse.cpp:34
virtual ~CFXJSE_HostObject()
const char kClassTag[]
Definition fxjse.cpp:18
const char kFuncTag[]
Definition fxjse.cpp:17