summaryrefslogtreecommitdiff
path: root/fxjs/cfxjs_engine.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-07 00:44:25 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-07 00:44:25 +0000
commitd5c4ab1ef458d158e268b5293c231928c59aacb9 (patch)
treecdd99cc7513e8b59282c33dffe3d94e2ae2533e6 /fxjs/cfxjs_engine.cpp
parent10569fcd4a3a9fb0140aa641372bcd462c6aa2f3 (diff)
downloadpdfium-d5c4ab1ef458d158e268b5293c231928c59aacb9.tar.xz
Remove v8::Context slot usage entierly from fxjs
Its no longer required. Change-Id: I180ca99817352a91b6d9d7c9b45985cd96dc730e Reviewed-on: https://pdfium-review.googlesource.com/34290 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
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);