Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: xfa/fxjse/scope_inline.h

Issue 2026933002: Remove use of v8:Lockers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxjse/runtime.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FXJSE_SCOPE_INLINE_H_ 7 #ifndef XFA_FXJSE_SCOPE_INLINE_H_
8 #define XFA_FXJSE_SCOPE_INLINE_H_ 8 #define XFA_FXJSE_SCOPE_INLINE_H_
9 9
10 #include "xfa/fxjse/context.h" 10 #include "xfa/fxjse/context.h"
11 #include "xfa/fxjse/runtime.h" 11 #include "xfa/fxjse/runtime.h"
12 12
13 class CFXJSE_ScopeUtil_IsolateHandle { 13 class CFXJSE_ScopeUtil_IsolateHandle {
14 public: 14 public:
15 explicit CFXJSE_ScopeUtil_IsolateHandle(v8::Isolate* pIsolate) 15 explicit CFXJSE_ScopeUtil_IsolateHandle(v8::Isolate* pIsolate)
16 : m_isolate(pIsolate), 16 : m_isolate(pIsolate),
17 m_locker(pIsolate),
18 m_iscope(pIsolate), 17 m_iscope(pIsolate),
19 m_hscope(pIsolate) {} 18 m_hscope(pIsolate) {}
20 v8::Isolate* GetIsolate() { return m_isolate; } 19 v8::Isolate* GetIsolate() { return m_isolate; }
21 20
22 private: 21 private:
23 CFXJSE_ScopeUtil_IsolateHandle(const CFXJSE_ScopeUtil_IsolateHandle&) = 22 CFXJSE_ScopeUtil_IsolateHandle(const CFXJSE_ScopeUtil_IsolateHandle&) =
24 delete; 23 delete;
25 void operator=(const CFXJSE_ScopeUtil_IsolateHandle&) = delete; 24 void operator=(const CFXJSE_ScopeUtil_IsolateHandle&) = delete;
26 void* operator new(size_t size) = delete; 25 void* operator new(size_t size) = delete;
27 void operator delete(void*, size_t) = delete; 26 void operator delete(void*, size_t) = delete;
28 27
29 v8::Isolate* m_isolate; 28 v8::Isolate* m_isolate;
30 v8::Locker m_locker;
31 v8::Isolate::Scope m_iscope; 29 v8::Isolate::Scope m_iscope;
32 v8::HandleScope m_hscope; 30 v8::HandleScope m_hscope;
33 }; 31 };
34 32
35 class CFXJSE_ScopeUtil_IsolateHandleRootContext { 33 class CFXJSE_ScopeUtil_IsolateHandleRootContext {
36 public: 34 public:
37 explicit CFXJSE_ScopeUtil_IsolateHandleRootContext(v8::Isolate* pIsolate) 35 explicit CFXJSE_ScopeUtil_IsolateHandleRootContext(v8::Isolate* pIsolate)
38 : m_parent(pIsolate), 36 : m_parent(pIsolate),
39 m_cscope(v8::Local<v8::Context>::New( 37 m_cscope(v8::Local<v8::Context>::New(
40 pIsolate, 38 pIsolate,
(...skipping 29 matching lines...) Expand all
70 void operator=(const CFXJSE_ScopeUtil_IsolateHandleContext&) = delete; 68 void operator=(const CFXJSE_ScopeUtil_IsolateHandleContext&) = delete;
71 void* operator new(size_t size) = delete; 69 void* operator new(size_t size) = delete;
72 void operator delete(void*, size_t) = delete; 70 void operator delete(void*, size_t) = delete;
73 71
74 CFXJSE_Context* m_context; 72 CFXJSE_Context* m_context;
75 CFXJSE_ScopeUtil_IsolateHandle m_parent; 73 CFXJSE_ScopeUtil_IsolateHandle m_parent;
76 v8::Context::Scope m_cscope; 74 v8::Context::Scope m_cscope;
77 }; 75 };
78 76
79 #endif // XFA_FXJSE_SCOPE_INLINE_H_ 77 #endif // XFA_FXJSE_SCOPE_INLINE_H_
OLDNEW
« no previous file with comments | « xfa/fxjse/runtime.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698