chromium/third_party/pdfium/fxjs/xfa/cfxjse_context.cpp

// Copyright 2016 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#include "fxjs/xfa/cfxjse_context.h"

#include <utility>

#include "core/fxcrt/check.h"
#include "core/fxcrt/check_op.h"
#include "core/fxcrt/ptr_util.h"
#include "fxjs/cfxjs_engine.h"
#include "fxjs/fxv8.h"
#include "fxjs/xfa/cfxjse_class.h"
#include "fxjs/xfa/cfxjse_isolatetracker.h"
#include "fxjs/xfa/cfxjse_runtimedata.h"
#include "fxjs/xfa/cfxjse_value.h"
#include "fxjs/xfa/cjx_object.h"
#include "v8/include/v8-exception.h"
#include "v8/include/v8-function.h"
#include "v8/include/v8-message.h"
#include "v8/include/v8-script.h"
#include "xfa/fxfa/parser/cxfa_thisproxy.h"

namespace {

const char szCompatibleModeScript[] =;

const char szConsoleScript[] =;

// Only address matters, values are for humans debuging here.  Keep these
// wchar_t to prevent the compiler from doing something clever, like
// aligning them on a byte boundary to save space, which would make them
// incompatible for use as V8 aligned pointers.
const wchar_t kFXJSEHostObjectTag[] =;
const wchar_t kFXJSEProxyObjectTag[] =;

v8::Local<v8::Object> CreateReturnValue(v8::Isolate* pIsolate,
                                        v8::TryCatch* trycatch) {}

void FXJSE_UpdateProxyBinding(v8::Local<v8::Object> hObject) {}

}  // namespace

void FXJSE_UpdateObjectBinding(v8::Local<v8::Object> hObject,
                               CFXJSE_HostObject* pNewBinding) {}

void FXJSE_ClearObjectBinding(v8::Local<v8::Object> hObject) {}

CFXJSE_HostObject* FXJSE_RetrieveObjectBinding(v8::Local<v8::Value> hValue) {}

// static
std::unique_ptr<CFXJSE_Context> CFXJSE_Context::Create(
    v8::Isolate* pIsolate,
    const FXJSE_CLASS_DESCRIPTOR* pGlobalClass,
    CFXJSE_HostObject* pGlobalObject,
    CXFA_ThisProxy* pProxy) {}

CFXJSE_Context::CFXJSE_Context(v8::Isolate* pIsolate, CXFA_ThisProxy* pProxy)
    :{}

CFXJSE_Context::~CFXJSE_Context() = default;

v8::Local<v8::Object> CFXJSE_Context::GetGlobalObject() {}

v8::Local<v8::Context> CFXJSE_Context::GetContext() {}

void CFXJSE_Context::AddClass(std::unique_ptr<CFXJSE_Class> pClass) {}

CFXJSE_Class* CFXJSE_Context::GetClassByName(ByteStringView szName) const {}

void CFXJSE_Context::EnableCompatibleMode() {}

CFXJSE_Context::ExecutionResult CFXJSE_Context::ExecuteScript(
    ByteStringView bsScript,
    v8::Local<v8::Object> hNewThis) {}

CFXJSE_Context::ExecutionResult::ExecutionResult() = default;

CFXJSE_Context::ExecutionResult::ExecutionResult(
    bool sts,
    std::unique_ptr<CFXJSE_Value> val)
    :{}

CFXJSE_Context::ExecutionResult::ExecutionResult(
    ExecutionResult&& that) noexcept = default;

CFXJSE_Context::ExecutionResult& CFXJSE_Context::ExecutionResult::operator=(
    ExecutionResult&& that) noexcept = default;

CFXJSE_Context::ExecutionResult::~ExecutionResult() = default;