summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/javascript')
-rw-r--r--fpdfsdk/src/javascript/Field.cpp2
-rw-r--r--fpdfsdk/src/javascript/JS_Object.h4
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime_Stub.cpp5
-rw-r--r--fpdfsdk/src/javascript/app.cpp5
4 files changed, 9 insertions, 7 deletions
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index 89725ffb7f..7baefd111c 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -3140,7 +3140,7 @@ FX_BOOL Field::getArray(IJS_Context* cc,
CJS_Array FormFieldArray(pRuntime);
for (int j = 0, jsz = swSort.GetSize(); j < jsz; j++) {
- nonstd::unique_ptr<CFX_WideString> pStr(swSort.GetAt(j));
+ std::unique_ptr<CFX_WideString> pStr(swSort.GetAt(j));
v8::Local<v8::Object> pObj = FXJS_NewFxDynamicObj(
pRuntime->GetIsolate(), pRuntime, CJS_Field::g_nObjDefnID);
ASSERT(!pObj.IsEmpty());
diff --git a/fpdfsdk/src/javascript/JS_Object.h b/fpdfsdk/src/javascript/JS_Object.h
index d72696caeb..fe9e5ec5d2 100644
--- a/fpdfsdk/src/javascript/JS_Object.h
+++ b/fpdfsdk/src/javascript/JS_Object.h
@@ -8,11 +8,11 @@
#define FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_
#include <map>
+#include <memory>
#include "JS_Runtime.h"
#include "fpdfsdk/include/fsdk_define.h" // For FX_UINT
#include "fpdfsdk/include/jsapi/fxjs_v8.h"
-#include "third_party/base/nonstd_unique_ptr.h"
class CJS_Context;
class CJS_Object;
@@ -68,7 +68,7 @@ class CJS_Object {
v8::Isolate* GetIsolate() { return m_pIsolate; }
protected:
- nonstd::unique_ptr<CJS_EmbedObj> m_pEmbedObj;
+ std::unique_ptr<CJS_EmbedObj> m_pEmbedObj;
v8::Global<v8::Object> m_pV8Object;
v8::Isolate* m_pIsolate;
};
diff --git a/fpdfsdk/src/javascript/JS_Runtime_Stub.cpp b/fpdfsdk/src/javascript/JS_Runtime_Stub.cpp
index 1d94976edf..e9d5a221f7 100644
--- a/fpdfsdk/src/javascript/JS_Runtime_Stub.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime_Stub.cpp
@@ -4,9 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <memory>
+
#include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "third_party/base/nonstd_unique_ptr.h"
class CJS_ContextStub final : public IJS_Context {
public:
@@ -156,7 +157,7 @@ class CJS_RuntimeStub final : public IJS_Runtime {
protected:
CPDFSDK_Document* m_pDoc;
- nonstd::unique_ptr<CJS_ContextStub> m_pContext;
+ std::unique_ptr<CJS_ContextStub> m_pContext;
};
// static
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp
index 34b51310ce..1473edbf69 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/src/javascript/app.cpp
@@ -6,6 +6,8 @@
#include "app.h"
+#include <memory>
+
#include "Document.h"
#include "JS_Context.h"
#include "JS_Define.h"
@@ -16,7 +18,6 @@
#include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
#include "fpdfsdk/include/javascript/IJavaScript.h"
#include "resource.h"
-#include "third_party/base/nonstd_unique_ptr.h"
BEGIN_JS_STATIC_CONST(CJS_TimerObj)
END_JS_STATIC_CONST()
@@ -803,7 +804,7 @@ FX_BOOL app::response(IJS_Context* cc,
CPDFDoc_Environment* pApp = pContext->GetReaderApp();
const int MAX_INPUT_BYTES = 2048;
- nonstd::unique_ptr<char[]> pBuff(new char[MAX_INPUT_BYTES + 2]);
+ std::unique_ptr<char[]> pBuff(new char[MAX_INPUT_BYTES + 2]);
memset(pBuff.get(), 0, MAX_INPUT_BYTES + 2);
int nLengthBytes = pApp->JS_appResponse(
swQuestion.c_str(), swTitle.c_str(), swDefault.c_str(), swLabel.c_str(),