summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/InspectorValues.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/InspectorValues.cpp')
-rw-r--r--WebCore/inspector/InspectorValues.cpp32
1 files changed, 30 insertions, 2 deletions
diff --git a/WebCore/inspector/InspectorValues.cpp b/WebCore/inspector/InspectorValues.cpp
index dad84ac..a7c43a5 100644
--- a/WebCore/inspector/InspectorValues.cpp
+++ b/WebCore/inspector/InspectorValues.cpp
@@ -366,7 +366,7 @@ PassRefPtr<InspectorValue> buildValue(const UChar* start, const UChar* end, cons
RefPtr<InspectorValue> arrayNode = buildValue(start, end, &tokenEnd, depth + 1);
if (!arrayNode)
return 0;
- array->push(arrayNode);
+ array->pushValue(arrayNode);
// After a list value, we expect a comma or the end of the list.
start = tokenEnd;
@@ -406,7 +406,7 @@ PassRefPtr<InspectorValue> buildValue(const UChar* start, const UChar* end, cons
RefPtr<InspectorValue> value = buildValue(start, end, &tokenEnd, depth + 1);
if (!value)
return 0;
- object->set(key, value);
+ object->setValue(key, value);
start = tokenEnd;
// After a key/value pair, we expect a comma or the end of the
@@ -504,6 +504,22 @@ bool InspectorValue::asString(String*) const
return false;
}
+bool InspectorValue::asValue(RefPtr<InspectorValue>* output)
+{
+ *output = this;
+ return true;
+}
+
+bool InspectorValue::asObject(RefPtr<InspectorObject>*)
+{
+ return false;
+}
+
+bool InspectorValue::asArray(RefPtr<InspectorArray>*)
+{
+ return false;
+}
+
PassRefPtr<InspectorObject> InspectorValue::asObject()
{
return 0;
@@ -606,6 +622,12 @@ void InspectorString::writeJSON(Vector<UChar>* output) const
doubleQuoteString(m_stringValue, output);
}
+bool InspectorObject::asObject(RefPtr<InspectorObject>* output)
+{
+ *output = this;
+ return true;
+}
+
PassRefPtr<InspectorObject> InspectorObject::asObject()
{
return this;
@@ -674,6 +696,12 @@ void InspectorObject::writeJSON(Vector<UChar>* output) const
output->append('}');
}
+bool InspectorArray::asArray(RefPtr<InspectorArray>* output)
+{
+ *output = this;
+ return true;
+}
+
PassRefPtr<InspectorArray> InspectorArray::asArray()
{
return this;