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

Unified Diff: xfa/fxjse/context.cpp

Issue 2045883004: Remove more FXJSE c-method wrappers. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxjse/context.h ('k') | xfa/fxjse/include/fxjse.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxjse/context.cpp
diff --git a/xfa/fxjse/context.cpp b/xfa/fxjse/context.cpp
index 75be76d6730724743d0fe8d6757667840ee5e2d2..8eacc77a748cf6c6bd42c0b87cf13f425ec4f242 100644
--- a/xfa/fxjse/context.cpp
+++ b/xfa/fxjse/context.cpp
@@ -84,37 +84,6 @@ CFXJSE_HostObject* FXJSE_RetrieveObjectBinding(
hObject->GetAlignedPointerFromInternalField(0));
}
-CFXJSE_Context* FXJSE_Context_Create(
- v8::Isolate* pIsolate,
- const FXJSE_CLASS_DESCRIPTOR* lpGlobalClass,
- CFXJSE_HostObject* lpGlobalObject) {
- return CFXJSE_Context::Create(pIsolate, lpGlobalClass, lpGlobalObject);
-}
-
-void FXJSE_Context_Release(CFXJSE_Context* pContext) {
- delete pContext;
-}
-
-CFXJSE_Value* FXJSE_Context_GetGlobalObject(CFXJSE_Context* pContext) {
- if (!pContext)
- return nullptr;
-
- CFXJSE_Value* lpValue = new CFXJSE_Value(pContext->GetRuntime());
- pContext->GetGlobalObject(lpValue);
- return lpValue;
-}
-
-void FXJSE_Context_EnableCompatibleMode(CFXJSE_Context* pContext) {
- FXJSE_ExecuteScript(pContext, szCompatibleModeScript, nullptr, nullptr);
-}
-
-FX_BOOL FXJSE_ExecuteScript(CFXJSE_Context* pContext,
- const FX_CHAR* szScript,
- CFXJSE_Value* pRetValue,
- CFXJSE_Value* pNewThisObject) {
- return pContext->ExecuteScript(szScript, pRetValue, pNewThisObject);
-}
-
v8::Local<v8::Object> FXJSE_CreateReturnValue(v8::Isolate* pIsolate,
v8::TryCatch& trycatch) {
v8::Local<v8::Object> hReturnValue = v8::Object::New(pIsolate);
@@ -185,6 +154,7 @@ CFXJSE_Context* CFXJSE_Context::Create(
}
CFXJSE_Context::CFXJSE_Context(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {}
+
CFXJSE_Context::~CFXJSE_Context() {}
void CFXJSE_Context::GetGlobalObject(CFXJSE_Value* pValue) {
@@ -196,6 +166,10 @@ void CFXJSE_Context::GetGlobalObject(CFXJSE_Value* pValue) {
pValue->ForceSetValue(hGlobalObject);
}
+void CFXJSE_Context::EnableCompatibleMode() {
+ ExecuteScript(szCompatibleModeScript, nullptr, nullptr);
+}
+
FX_BOOL CFXJSE_Context::ExecuteScript(const FX_CHAR* szScript,
CFXJSE_Value* lpRetValue,
CFXJSE_Value* lpNewThisObject) {
« no previous file with comments | « xfa/fxjse/context.h ('k') | xfa/fxjse/include/fxjse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698