From 1af240cc45480520b447be767686e73a29c48f9e Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 16 Sep 2015 15:16:42 -0700 Subject: Remove several dead functions from fxjs_v8.{cpp,h}. Re-arrange things in the header so function overloads are next to each other, and related things are near each other. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1348693003 . --- fpdfsdk/src/jsapi/fxjs_v8.cpp | 43 ------------------------------------------- 1 file changed, 43 deletions(-) (limited to 'fpdfsdk/src') diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp index 2c17628dbc..381bfbad7f 100644 --- a/fpdfsdk/src/jsapi/fxjs_v8.cpp +++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp @@ -416,20 +416,6 @@ v8::Local FXJS_NewFxDynamicObj(v8::Isolate* pIsolate, return obj; } -v8::Local FXJS_GetStaticObj(v8::Isolate* pIsolate, int nObjDefnID) { - v8::Isolate::Scope isolate_scope(pIsolate); - CFX_PtrArray* pArray = (CFX_PtrArray*)pIsolate->GetData(g_embedderDataSlot); - if (!pArray) - return v8::Local(); - - if (nObjDefnID < 0 || nObjDefnID >= pArray->GetSize()) - return v8::Local(); - CFXJS_ObjDefintion* pObjDef = (CFXJS_ObjDefintion*)pArray->GetAt(nObjDefnID); - v8::Local obj = - v8::Local::New(pIsolate, pObjDef->m_StaticObj); - return obj; -} - v8::Local FXJS_GetThisObj(v8::Isolate* pIsolate) { // Return the global object. v8::Isolate::Scope isolate_scope(pIsolate); @@ -567,10 +553,6 @@ v8::Local FXJS_WSToJSString(v8::Isolate* pIsolate, v8::NewStringType::kNormal).ToLocalChecked(); } -v8::Local FXJS_GetObjectValue(v8::Local pObj) { - return pObj; -} - v8::Local FXJS_GetObjectElement(v8::Isolate* pIsolate, v8::Local pObj, const wchar_t* PropertyName) { @@ -736,12 +718,6 @@ v8::Local FXJS_NewString(v8::Isolate* pIsolate, return FXJS_WSToJSString(pIsolate, string); } -v8::Local FXJS_NewString(v8::Isolate* pIsolate, - const wchar_t* string, - unsigned nLen) { - return FXJS_WSToJSString(pIsolate, string, nLen); -} - v8::Local FXJS_NewNull() { return v8::Local(); } @@ -750,25 +726,6 @@ v8::Local FXJS_NewDate(v8::Isolate* pIsolate, double d) { return v8::Date::New(pIsolate->GetCurrentContext(), d).ToLocalChecked(); } -v8::Local FXJS_NewValue(v8::Isolate* pIsolate) { - return v8::Local(); -} - -v8::Local FXJS_GetListValue(v8::Isolate* pIsolate, - v8::Local pList, - int index) { - v8::Local context = pIsolate->GetCurrentContext(); - if (!pList.IsEmpty() && pList->IsObject()) { - v8::Local obj; - if (pList->ToObject(context).ToLocal(&obj)) { - v8::Local val; - if (obj->Get(context, index).ToLocal(&val)) - return val; - } - } - return v8::Local(); -} - int FXJS_ToInt32(v8::Isolate* pIsolate, v8::Local pValue) { if (pValue.IsEmpty()) return 0; -- cgit v1.2.3