From 0582ad18b1e7ab9e404b7f8071a015ec756f5afe Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 19 Apr 2016 05:53:40 -0700 Subject: XFA unused function cleanup This CL removes a series of unused XFA methods. Review URL: https://codereview.chromium.org/1899103002 --- xfa/fxjse/context.cpp | 52 --------------------------------------------------- 1 file changed, 52 deletions(-) (limited to 'xfa/fxjse/context.cpp') diff --git a/xfa/fxjse/context.cpp b/xfa/fxjse/context.cpp index 83af487632..abb30c5dc5 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(lpValue); } -FXJSE_HRUNTIME FXJSE_Context_GetRuntime(FXJSE_HCONTEXT hContext) { - CFXJSE_Context* pContext = reinterpret_cast(hContext); - return pContext ? reinterpret_cast(pContext->GetRuntime()) - : NULL; -} - static const FX_CHAR* szCompatibleModeScripts[] = { "(function(global, list) {\n" " 'use strict';\n" @@ -127,52 +121,6 @@ v8::Local 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(hRetValue); - if (!lpValue) { - return FALSE; - } - v8::Isolate* pIsolate = lpValue->GetIsolate(); - CFXJSE_ScopeUtil_IsolateHandleRootContext scope(pIsolate); - v8::Local hValue = - v8::Local::New(pIsolate, lpValue->DirectGetValue()); - if (!hValue->IsObject()) { - return FALSE; - } - v8::String::Utf8Value hStringVal0( - hValue.As()->Get(0)->ToString()); - utf8Name = *hStringVal0; - v8::String::Utf8Value hStringVal1( - hValue.As()->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(hRetValue); - if (!lpValue) { - return FALSE; - } - v8::Isolate* pIsolate = lpValue->GetIsolate(); - CFXJSE_ScopeUtil_IsolateHandleRootContext scope(pIsolate); - v8::Local hValue = - v8::Local::New(pIsolate, lpValue->DirectGetValue()); - if (!hValue->IsObject()) { - return FALSE; - } - v8::MaybeLocal maybe_int = - hValue.As()->Get(3)->ToInt32(pIsolate->GetCurrentContext()); - nLine = maybe_int.FromMaybe(v8::Local())->Value(); - maybe_int = - hValue.As()->Get(5)->ToInt32(pIsolate->GetCurrentContext()); - nCol = maybe_int.FromMaybe(v8::Local())->Value(); - return TRUE; -} - CFXJSE_Context* CFXJSE_Context::Create(v8::Isolate* pIsolate, const FXJSE_CLASS* lpGlobalClass, void* lpGlobalObject) { -- cgit v1.2.3