diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-01-30 20:15:10 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-30 20:15:10 +0000 |
commit | 2108e5703531ba4d208817913eee9739d0b74018 (patch) | |
tree | bf9486a7fa620585a722df8278aea5fddd757246 /fxjs/cjs_object.h | |
parent | b68a2b7efa732efc00aed4bbc0e58fd7fa4e8c29 (diff) | |
download | pdfium-2108e5703531ba4d208817913eee9739d0b74018.tar.xz |
Remove bare new from JS_Define.h
Change-Id: Ic734c7141e52b8ca332ca9dc78118b84904c41b0
Reviewed-on: https://pdfium-review.googlesource.com/24470
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_object.h')
-rw-r--r-- | fxjs/cjs_object.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fxjs/cjs_object.h b/fxjs/cjs_object.h index d929a01496..f4b0d297f4 100644 --- a/fxjs/cjs_object.h +++ b/fxjs/cjs_object.h @@ -8,6 +8,7 @@ #define FXJS_CJS_OBJECT_H_ #include <memory> +#include <utility> #include "fpdfsdk/fsdk_define.h" #include "fxjs/cjs_embedobj.h" @@ -57,7 +58,9 @@ class CJS_Object { v8::Local<v8::Object> ToV8Object() { return m_pV8Object.Get(m_pIsolate); } // Takes ownership of |pObj|. - void SetEmbedObject(CJS_EmbedObj* pObj) { m_pEmbedObj.reset(pObj); } + void SetEmbedObject(std::unique_ptr<CJS_EmbedObj> pObj) { + m_pEmbedObj = std::move(pObj); + } CJS_EmbedObj* GetEmbedObject() const { return m_pEmbedObj.get(); } v8::Isolate* GetIsolate() const { return m_pIsolate; } |