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

Unified Diff: xfa/fxjse/class.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/class.cpp
diff --git a/xfa/fxjse/class.cpp b/xfa/fxjse/class.cpp
index 29a8077bd0884ff0b43fd5eb600a80671c3e70a8..181398c630b08a9249d781e3dba4c03c437f03e8 100644
--- a/xfa/fxjse/class.cpp
+++ b/xfa/fxjse/class.cpp
@@ -24,29 +24,6 @@ static void FXJSE_V8SetterCallback_Wrapper(
v8::Local<v8::Value> value,
const v8::PropertyCallbackInfo<void>& info);
-void FXJSE_DefineFunctions(FXJSE_HCONTEXT hContext,
- const FXJSE_FUNCTION* lpFunctions,
- int nNum) {
- CFXJSE_Context* lpContext = reinterpret_cast<CFXJSE_Context*>(hContext);
- ASSERT(lpContext);
- CFXJSE_ScopeUtil_IsolateHandleContext scope(lpContext);
- v8::Isolate* pIsolate = lpContext->GetRuntime();
- v8::Local<v8::Object> hGlobalObject =
- FXJSE_GetGlobalObjectFromContext(scope.GetLocalContext());
- for (int32_t i = 0; i < nNum; i++) {
- v8::Maybe<bool> maybe_success = hGlobalObject->DefineOwnProperty(
- scope.GetLocalContext(),
- v8::String::NewFromUtf8(pIsolate, lpFunctions[i].name),
- v8::Function::New(
- pIsolate, FXJSE_V8FunctionCallback_Wrapper,
- v8::External::New(pIsolate,
- const_cast<FXJSE_FUNCTION*>(lpFunctions + i))),
- static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete));
- if (!maybe_success.FromMaybe(false))
- return;
- }
-}
-
FXJSE_HCLASS FXJSE_DefineClass(FXJSE_HCONTEXT hContext,
const FXJSE_CLASS* lpClass) {
CFXJSE_Context* lpContext = reinterpret_cast<CFXJSE_Context*>(hContext);
@@ -55,12 +32,6 @@ FXJSE_HCLASS FXJSE_DefineClass(FXJSE_HCONTEXT hContext,
CFXJSE_Class::Create(lpContext, lpClass, FALSE));
}
-FXJSE_HCLASS FXJSE_GetClass(FXJSE_HCONTEXT hContext,
- const CFX_ByteStringC& szName) {
- return reinterpret_cast<FXJSE_HCLASS>(CFXJSE_Class::GetClassFromContext(
- reinterpret_cast<CFXJSE_Context*>(hContext), szName));
-}
-
static void FXJSE_V8FunctionCallback_Wrapper(
const v8::FunctionCallbackInfo<v8::Value>& info) {
const FXJSE_FUNCTION* lpFunctionInfo =

Powered by Google App Engine
This is Rietveld 408576698