summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_arguments.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-25 12:43:13 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-25 20:31:57 +0000
commit80547a165adf250f31ade57544771201bbc2690c (patch)
tree1c1669fdcbc6d2fc443172142b80c03cd1a4972a /fxjs/cfxjse_arguments.cpp
parent233360e3ea0d6d4acea76a7d9e7ce7700ea80b1a (diff)
downloadpdfium-80547a165adf250f31ade57544771201bbc2690c.tar.xz
Use unique_ptr in CXFA_ScriptContext::m_mapVariableToContext.
Remove unused CFXJSE_Arguments::GetRuntime(). Remove some default argument values. Make members of CFXJSE_Context private. Change-Id: Id21951f7d8d68929b2799a9d6a2cdd7a3677f52a Reviewed-on: https://pdfium-review.googlesource.com/4493 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_arguments.cpp')
-rw-r--r--fxjs/cfxjse_arguments.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/fxjs/cfxjse_arguments.cpp b/fxjs/cfxjse_arguments.cpp
index 323134dcf5..f406ba34de 100644
--- a/fxjs/cfxjse_arguments.cpp
+++ b/fxjs/cfxjse_arguments.cpp
@@ -8,20 +8,16 @@
#include "fxjs/cfxjse_context.h"
#include "fxjs/cfxjse_value.h"
-
-v8::Isolate* CFXJSE_Arguments::GetRuntime() const {
- return m_pRetValue->GetIsolate();
-}
+#include "third_party/base/ptr_util.h"
int32_t CFXJSE_Arguments::GetLength() const {
return m_pInfo->Length();
}
std::unique_ptr<CFXJSE_Value> CFXJSE_Arguments::GetValue(int32_t index) const {
- std::unique_ptr<CFXJSE_Value> lpArgValue(
- new CFXJSE_Value(v8::Isolate::GetCurrent()));
- lpArgValue->ForceSetValue((*m_pInfo)[index]);
- return lpArgValue;
+ auto pArgValue = pdfium::MakeUnique<CFXJSE_Value>(v8::Isolate::GetCurrent());
+ pArgValue->ForceSetValue((*m_pInfo)[index]);
+ return pArgValue;
}
bool CFXJSE_Arguments::GetBoolean(int32_t index) const {