diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-10-24 09:36:16 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-24 17:17:03 +0000 |
commit | e49749265c4e503c37a316e4ca6eeff430d13b87 (patch) | |
tree | d75c0b641618e66477b2e992ae146f30a3e2dd9f /fpdfsdk/javascript/util.cpp | |
parent | 826480cf599f61fe0366ab2bd5803dd53c9d0562 (diff) | |
download | pdfium-e49749265c4e503c37a316e4ca6eeff430d13b87.tar.xz |
Remove most CJS_Value Set methods
This CL removes all of the Set(*) methods from CJS_Value except for
Set(v8::Local<v8::Value>). All uses of Set are changed to convert to
a v8::Value before setting.
Change-Id: I6e4d2cebec42fce5c039dc0a3abe46086cfdd34f
Reviewed-on: https://pdfium-review.googlesource.com/16610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/util.cpp')
-rw-r--r-- | fpdfsdk/javascript/util.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/javascript/util.cpp b/fpdfsdk/javascript/util.cpp index 9b63823e3c..3d669b30ca 100644 --- a/fpdfsdk/javascript/util.cpp +++ b/fpdfsdk/javascript/util.cpp @@ -151,7 +151,7 @@ bool util::printd(CJS_Runtime* pRuntime, return false; } - CJS_Date jsDate = p2.ToDate(pRuntime); + CJS_Date jsDate = p2.ToDate(); if (!jsDate.IsValidDate(pRuntime)) { sError = JSGetStringFromID(IDS_STRING_JSPRINT2); return false; @@ -396,9 +396,9 @@ bool util::scand(CJS_Runtime* pRuntime, } if (!std::isnan(dDate)) { - vRet = CJS_Value(pRuntime, CJS_Date(pRuntime, dDate)); + vRet = CJS_Value(CJS_Date(pRuntime, dDate)); } else { - vRet.SetNull(pRuntime); + vRet.Set(pRuntime->NewNull()); } return true; |