diff options
Diffstat (limited to 'WebCore/inspector/InspectorValues.cpp')
-rw-r--r-- | WebCore/inspector/InspectorValues.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/WebCore/inspector/InspectorValues.cpp b/WebCore/inspector/InspectorValues.cpp index 90a40f9..d488b50 100644 --- a/WebCore/inspector/InspectorValues.cpp +++ b/WebCore/inspector/InspectorValues.cpp @@ -484,6 +484,16 @@ bool InspectorValue::asNumber(double*) const return false; } +bool InspectorValue::asNumber(long*) const +{ + return false; +} + +bool InspectorValue::asNumber(unsigned long*) const +{ + return false; +} + bool InspectorValue::asString(String*) const { return false; @@ -540,6 +550,23 @@ bool InspectorBasicValue::asNumber(double* output) const return true; } +bool InspectorBasicValue::asNumber(long* output) const +{ + if (type() != TypeDouble) + return false; + *output = static_cast<long>(m_doubleValue); + return true; +} + +bool InspectorBasicValue::asNumber(unsigned long* output) const +{ + if (type() != TypeDouble) + return false; + *output = static_cast<unsigned long>(m_doubleValue); + return true; +} + + void InspectorBasicValue::writeJSON(Vector<UChar>* output) const { ASSERT(type() == TypeBoolean || type() == TypeDouble); |