summaryrefslogtreecommitdiff
path: root/fxjs/cfxjs_engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cfxjs_engine.cpp')
-rw-r--r--fxjs/cfxjs_engine.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/fxjs/cfxjs_engine.cpp b/fxjs/cfxjs_engine.cpp
index 5d0f3b0ec5..763a3d9f14 100644
--- a/fxjs/cfxjs_engine.cpp
+++ b/fxjs/cfxjs_engine.cpp
@@ -15,11 +15,6 @@
class CFXJS_PerObjectData;
-// Keep this consistent with the values defined in gin/public/context_holder.h
-// (without actually requiring a dependency on gin itself for the standalone
-// embedders of PDFIum). The value we want to use is:
-// kPerContextDataStartIndex + kEmbedderPDFium, which is 3.
-static const unsigned int kPerContextDataIndex = 3u;
static unsigned int g_embedderDataSlot = 1u;
static v8::Isolate* g_isolate = nullptr;
static size_t g_isolate_ref_count = 0;
@@ -297,18 +292,6 @@ CFXJS_Engine::CFXJS_Engine(v8::Isolate* pIsolate) : CFX_V8(pIsolate) {}
CFXJS_Engine::~CFXJS_Engine() = default;
// static
-CFXJS_Engine* CFXJS_Engine::EngineFromIsolateCurrentContext(
- v8::Isolate* pIsolate) {
- return EngineFromContext(pIsolate->GetCurrentContext());
-}
-
-// static
-CFXJS_Engine* CFXJS_Engine::EngineFromContext(v8::Local<v8::Context> pContext) {
- return static_cast<CFXJS_Engine*>(
- pContext->GetAlignedPointerFromEmbedderData(kPerContextDataIndex));
-}
-
-// static
int CFXJS_Engine::GetObjDefnID(v8::Local<v8::Object> pObj) {
CFXJS_PerObjectData* pData = CFXJS_PerObjectData::GetFromObject(pObj);
return pData ? pData->m_ObjDefID : -1;
@@ -332,10 +315,6 @@ void CFXJS_Engine::FreeObjectPrivate(v8::Local<v8::Object> pObj) {
delete pData;
}
-void CFXJS_Engine::SetIntoContext(v8::Local<v8::Context> pContext) {
- pContext->SetAlignedPointerInEmbedderData(kPerContextDataIndex, this);
-}
-
int CFXJS_Engine::DefineObj(const char* sObjName,
FXJSOBJTYPE eObjType,
CFXJS_Engine::Constructor pConstructor,
@@ -451,7 +430,6 @@ void CFXJS_Engine::InitializeEngine() {
}
v8::Context::Scope context_scope(v8Context);
- SetIntoContext(v8Context);
int maxID = CFXJS_ObjDefinition::MaxID(GetIsolate());
m_StaticObjects.resize(maxID + 1);