summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/cjs_runtime.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-24 15:29:22 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-24 21:00:44 +0000
commite85107bc8ab5bbd5b2d3f97fd6071d7ce4a78bcc (patch)
tree77bc28ff0366d3ff873c9d62db0e262421aedc9a /fpdfsdk/javascript/cjs_runtime.h
parent037eae6e99ef16a42cb74a72b0b52d515a099b3a (diff)
downloadpdfium-e85107bc8ab5bbd5b2d3f97fd6071d7ce4a78bcc.tar.xz
Move MaybeCoerceToNumber to CJS_Runtime
This CL moves MaybeCoerceToNumber from CJS_Value to CJS_Runtime. Change-Id: I22bb605045daa63f405ef256e4b8a5c7ffb78425 Reviewed-on: https://pdfium-review.googlesource.com/16617 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/cjs_runtime.h')
-rw-r--r--fpdfsdk/javascript/cjs_runtime.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fpdfsdk/javascript/cjs_runtime.h b/fpdfsdk/javascript/cjs_runtime.h
index 0d6951f8c0..90ec23ee7a 100644
--- a/fpdfsdk/javascript/cjs_runtime.h
+++ b/fpdfsdk/javascript/cjs_runtime.h
@@ -48,6 +48,10 @@ class CJS_Runtime : public IJS_Runtime,
void EndBlock() { m_bBlocking = false; }
bool IsBlocking() const { return m_bBlocking; }
+ // Attempt to convert the |value| into a number. If successful the number
+ // value will be returned, otherwise |value| is returned.
+ v8::Local<v8::Value> MaybeCoerceToNumber(const v8::Local<v8::Value>& value);
+
#ifdef PDF_ENABLE_XFA
bool GetValueByName(const ByteStringView& utf8Name,
CFXJSE_Value* pValue) override;