1 // Copyright 2018 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #include "fxjs/xfa/cfxjse_isolatetracker.h" 8 9 #include "fxjs/xfa/cfxjse_runtimedata.h" 10 CFXJSE_ScopeUtil_IsolateHandle(v8::Isolate * pIsolate)11CFXJSE_ScopeUtil_IsolateHandle::CFXJSE_ScopeUtil_IsolateHandle( 12 v8::Isolate* pIsolate) 13 : m_iscope(pIsolate), m_hscope(pIsolate) {} 14 15 CFXJSE_ScopeUtil_IsolateHandle::~CFXJSE_ScopeUtil_IsolateHandle() = default; 16 17 CFXJSE_ScopeUtil_IsolateHandleRootContext:: CFXJSE_ScopeUtil_IsolateHandleRootContext(v8::Isolate * pIsolate)18 CFXJSE_ScopeUtil_IsolateHandleRootContext(v8::Isolate* pIsolate) 19 : CFXJSE_ScopeUtil_IsolateHandle(pIsolate), 20 m_cscope(v8::Local<v8::Context>::New( 21 pIsolate, 22 CFXJSE_RuntimeData::Get(pIsolate)->m_hRootContext)) {} 23 24 CFXJSE_ScopeUtil_IsolateHandleRootContext:: 25 ~CFXJSE_ScopeUtil_IsolateHandleRootContext() = default; 26