diff options
author | Steve Block <steveblock@google.com> | 2010-09-29 17:32:26 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-09-29 17:35:08 +0100 |
commit | 68513a70bcd92384395513322f1b801e7bf9c729 (patch) | |
tree | 161b50f75a5921d61731bb25e730005994fcec85 /WebCore/bindings/js/JSDOMBinding.h | |
parent | fd5c6425ce58eb75211be7718d5dee960842a37e (diff) | |
download | external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.zip external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.gz external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.bz2 |
Merge WebKit at r67908: Initial merge by Git
Change-Id: I43a553e7b3299b28cb6ee8aa035ed70fe342b972
Diffstat (limited to 'WebCore/bindings/js/JSDOMBinding.h')
-rw-r--r-- | WebCore/bindings/js/JSDOMBinding.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/WebCore/bindings/js/JSDOMBinding.h b/WebCore/bindings/js/JSDOMBinding.h index 749b0d7..f0bd2e2 100644 --- a/WebCore/bindings/js/JSDOMBinding.h +++ b/WebCore/bindings/js/JSDOMBinding.h @@ -267,6 +267,13 @@ namespace WebCore { String valueToStringWithNullCheck(JSC::ExecState*, JSC::JSValue); // null if the value is null String valueToStringWithUndefinedOrNullCheck(JSC::ExecState*, JSC::JSValue); // null if the value is null or undefined + inline int32_t finiteInt32Value(JSC::JSValue value, JSC::ExecState* exec, bool& okay) + { + double number = value.toNumber(exec); + okay = isfinite(number); + return JSC::toInt32(number); + } + // Returns a Date instance for the specified value, or null if the value is NaN or infinity. JSC::JSValue jsDateOrNull(JSC::ExecState*, double); // NaN if the value can't be converted to a date. |