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/JS_Define.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/JS_Define.h')
-rw-r--r-- | fxjs/JS_Define.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fxjs/JS_Define.h b/fxjs/JS_Define.h index 6de56f40e0..08654b96e1 100644 --- a/fxjs/JS_Define.h +++ b/fxjs/JS_Define.h @@ -13,6 +13,7 @@ #include "fxjs/cjs_return.h" #include "fxjs/fxjs_v8.h" #include "fxjs/js_resources.h" +#include "third_party/base/ptr_util.h" double JS_GetDateTime(); int JS_GetYearFromTime(double dt); @@ -49,7 +50,7 @@ std::vector<v8::Local<v8::Value>> ExpandKeywordParams( template <class T, class A> static void JSConstructor(CFXJS_Engine* pEngine, v8::Local<v8::Object> obj) { CJS_Object* pObj = new T(obj); - pObj->SetEmbedObject(new A(pObj)); + pObj->SetEmbedObject(pdfium::MakeUnique<A>(pObj)); pEngine->SetObjectPrivate(obj, pObj); pObj->InitInstance(static_cast<CJS_Runtime*>(pEngine)); } |