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

Unified Diff: xfa/fxjse/context.cpp

Issue 1899103002: XFA unused function cleanup (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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
Index: xfa/fxjse/context.cpp
diff --git a/xfa/fxjse/context.cpp b/xfa/fxjse/context.cpp
index 83af4876329d322614796b907a1bdee646aa9eb0..abb30c5dc525ea5b9a4e914828734f7d3490c13e 100644
--- a/xfa/fxjse/context.cpp
+++ b/xfa/fxjse/context.cpp
@@ -37,12 +37,6 @@ FXJSE_HVALUE FXJSE_Context_GetGlobalObject(FXJSE_HCONTEXT hContext) {
return reinterpret_cast<FXJSE_HVALUE>(lpValue);
}
-FXJSE_HRUNTIME FXJSE_Context_GetRuntime(FXJSE_HCONTEXT hContext) {
- CFXJSE_Context* pContext = reinterpret_cast<CFXJSE_Context*>(hContext);
- return pContext ? reinterpret_cast<FXJSE_HRUNTIME>(pContext->GetRuntime())
- : NULL;
-}
-
static const FX_CHAR* szCompatibleModeScripts[] = {
"(function(global, list) {\n"
" 'use strict';\n"
@@ -127,52 +121,6 @@ v8::Local<v8::Object> FXJSE_CreateReturnValue(v8::Isolate* pIsolate,
return hReturnValue;
}
-FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue,
- CFX_ByteString& utf8Name,
- CFX_ByteString& utf8Message) {
- CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hRetValue);
- if (!lpValue) {
- return FALSE;
- }
- v8::Isolate* pIsolate = lpValue->GetIsolate();
- CFXJSE_ScopeUtil_IsolateHandleRootContext scope(pIsolate);
- v8::Local<v8::Value> hValue =
- v8::Local<v8::Value>::New(pIsolate, lpValue->DirectGetValue());
- if (!hValue->IsObject()) {
- return FALSE;
- }
- v8::String::Utf8Value hStringVal0(
- hValue.As<v8::Object>()->Get(0)->ToString());
- utf8Name = *hStringVal0;
- v8::String::Utf8Value hStringVal1(
- hValue.As<v8::Object>()->Get(1)->ToString());
- utf8Message = *hStringVal1;
- return TRUE;
-}
-
-FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue,
- int32_t& nLine,
- int32_t& nCol) {
- CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hRetValue);
- if (!lpValue) {
- return FALSE;
- }
- v8::Isolate* pIsolate = lpValue->GetIsolate();
- CFXJSE_ScopeUtil_IsolateHandleRootContext scope(pIsolate);
- v8::Local<v8::Value> hValue =
- v8::Local<v8::Value>::New(pIsolate, lpValue->DirectGetValue());
- if (!hValue->IsObject()) {
- return FALSE;
- }
- v8::MaybeLocal<v8::Int32> maybe_int =
- hValue.As<v8::Object>()->Get(3)->ToInt32(pIsolate->GetCurrentContext());
- nLine = maybe_int.FromMaybe(v8::Local<v8::Int32>())->Value();
- maybe_int =
- hValue.As<v8::Object>()->Get(5)->ToInt32(pIsolate->GetCurrentContext());
- nCol = maybe_int.FromMaybe(v8::Local<v8::Int32>())->Value();
- return TRUE;
-}
-
CFXJSE_Context* CFXJSE_Context::Create(v8::Isolate* pIsolate,
const FXJSE_CLASS* lpGlobalClass,
void* lpGlobalObject) {

Powered by Google App Engine
This is Rietveld 408576698