summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-07 19:32:52 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-07 19:32:52 +0000
commit4cc32e30aaacc2e527acd052fa038158f4294636 (patch)
treed9d78fcfd10ac265c079ae283731c512c055a7d7 /fxjs
parent1b74dee4616d22f3cfb00fa57cb7af8a190e6d7e (diff)
downloadpdfium-4cc32e30aaacc2e527acd052fa038158f4294636.tar.xz
Remove friending in CFXJSE_Context.
Change-Id: I6a634cb3fb9acdd78ae29017987e5e41865a0d4b Reviewed-on: https://pdfium-review.googlesource.com/34490 Commit-Queue: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cfxjse_context.cpp11
-rw-r--r--fxjs/cfxjse_context.h2
2 files changed, 3 insertions, 10 deletions
diff --git a/fxjs/cfxjse_context.cpp b/fxjs/cfxjse_context.cpp
index 59cb4af9a7..e9297e5bb2 100644
--- a/fxjs/cfxjse_context.cpp
+++ b/fxjs/cfxjse_context.cpp
@@ -90,17 +90,10 @@ v8::Local<v8::Object> GetGlobalObjectFromContext(
return hContext->Global()->GetPrototype().As<v8::Object>();
}
-} // namespace
-
-// Note, not in the anonymous namespace due to the friend call
-// in cfxjse_context.h
-// TODO(dsinclair): Remove the friending, use public methods.
class CFXJSE_ScopeUtil_IsolateHandleContext {
public:
explicit CFXJSE_ScopeUtil_IsolateHandleContext(CFXJSE_Context* pContext)
- : m_parent(pContext->m_pIsolate),
- m_cscope(v8::Local<v8::Context>::New(pContext->m_pIsolate,
- pContext->m_hContext)) {}
+ : m_parent(pContext->GetIsolate()), m_cscope(pContext->GetContext()) {}
private:
CFXJSE_ScopeUtil_IsolateHandleContext(
@@ -113,6 +106,8 @@ class CFXJSE_ScopeUtil_IsolateHandleContext {
v8::Context::Scope m_cscope;
};
+} // namespace
+
void FXJSE_UpdateObjectBinding(v8::Local<v8::Object>& hObject,
CFXJSE_HostObject* lpNewBinding) {
ASSERT(!hObject.IsEmpty());
diff --git a/fxjs/cfxjse_context.h b/fxjs/cfxjse_context.h
index 8ab955197c..b4db8f7a30 100644
--- a/fxjs/cfxjse_context.h
+++ b/fxjs/cfxjse_context.h
@@ -39,8 +39,6 @@ class CFXJSE_Context {
CFXJSE_Value* lpNewThisObject = nullptr);
protected:
- friend class CFXJSE_ScopeUtil_IsolateHandleContext;
-
CFXJSE_Context(const CFXJSE_Context&) = delete;
CFXJSE_Context& operator=(const CFXJSE_Context&) = delete;