diff options
author | dan sinclair <dsinclair@chromium.org> | 2017-10-24 21:46:57 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-25 18:14:23 +0000 |
commit | 5daf07afe5b76e702d053aaca648b977ec3bb663 (patch) | |
tree | 7f7d36eabd41737fce559d25adf7a17046c9f007 /fpdfsdk/javascript/Document.cpp | |
parent | 80435cb746fa7bd22cf062ab39829ec86000fd21 (diff) | |
download | pdfium-5daf07afe5b76e702d053aaca648b977ec3bb663.tar.xz |
Make NewNull return an actual Null
This CL updates the CFXJS_Engine::NewNull method to return a real v8::Null
instead of an empty v8::Local. This also adds a NewUndefined and returns
undefined in most of the places null was returned previously.
Change-Id: If1a96bf253057892a3b709cbc72f8825c52503c3
Reviewed-on: https://pdfium-review.googlesource.com/16730
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/Document.cpp')
-rw-r--r-- | fpdfsdk/javascript/Document.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp index 9404ded0c8..2217f448f2 100644 --- a/fpdfsdk/javascript/Document.cpp +++ b/fpdfsdk/javascript/Document.cpp @@ -213,7 +213,7 @@ bool Document::set_dirty(CJS_Runtime* pRuntime, bool Document::get_ADBE(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError) { - vp->Set(pRuntime->NewNull()); + vp->Set(pRuntime->NewUndefined()); return true; } @@ -312,7 +312,7 @@ bool Document::getField(CJS_Runtime* pRuntime, CPDFSDK_InterForm* pInterForm = m_pFormFillEnv->GetInterForm(); CPDF_InterForm* pPDFForm = pInterForm->GetInterForm(); if (pPDFForm->CountFields(wideName) <= 0) { - vRet.Set(pRuntime->NewNull()); + vRet.Set(pRuntime->NewUndefined()); return true; } @@ -1321,7 +1321,7 @@ bool Document::getAnnot3D(CJS_Runtime* pRuntime, const std::vector<v8::Local<v8::Value>>& params, CJS_Value& vRet, WideString& sError) { - vRet.Set(pRuntime->NewNull()); + vRet.Set(pRuntime->NewUndefined()); return true; } @@ -1387,7 +1387,7 @@ bool Document::get_icons(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError) { if (m_IconNames.empty()) { - vp->Set(pRuntime->NewNull()); + vp->Set(pRuntime->NewUndefined()); return true; } |