From 1258f7f21725c703269581e0241fbad86d89209c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 2 Feb 2018 17:37:37 +0000 Subject: Remove V8 context from CJS_V8 Makes CFXJS_Engine and CFXJSE_Engine consistent with each other in that both have a V8 context to themselves, and not one inheritted from the CJS_V8 (which is now more per-isolate than per-context). Consolidate NewLocalContext() and GetPersistentContext(), which both did the exact same thing under the covers once inside v8 land. Rename a few things to make it simpler. Change-Id: I68905db9ad44253063da235fcb276a75627a2dbc Reviewed-on: https://pdfium-review.googlesource.com/25170 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- fxjs/cjs_v8.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'fxjs/cjs_v8.cpp') diff --git a/fxjs/cjs_v8.cpp b/fxjs/cjs_v8.cpp index 8f77ec6a88..b4f7fb1ed2 100644 --- a/fxjs/cjs_v8.cpp +++ b/fxjs/cjs_v8.cpp @@ -13,9 +13,7 @@ CJS_V8::CJS_V8(v8::Isolate* isolate) : m_isolate(isolate) {} -CJS_V8::~CJS_V8() { - m_V8PersistentContext.Reset(); -} +CJS_V8::~CJS_V8() = default; v8::Local CJS_V8::GetObjectProperty( v8::Local pObj, @@ -88,14 +86,6 @@ unsigned CJS_V8::GetArrayLength(v8::Local pArray) { return pArray->Length(); } -v8::Local CJS_V8::NewLocalContext() { - return v8::Local::New(m_isolate, m_V8PersistentContext); -} - -v8::Local CJS_V8::GetPersistentContext() { - return m_V8PersistentContext.Get(m_isolate); -} - v8::Local CJS_V8::NewNumber(int number) { return v8::Int32::New(m_isolate, number); } -- cgit v1.2.3