[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

pfeldman at chromium.org pfeldman at chromium.org
Wed Dec 22 12:04:16 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 7fab097c125cfe3edcedf2cfef66a5853d0d88af
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 13 13:22:17 2010 +0000

    2010-08-13  Pavel Feldman  <pfeldman at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: rename InspectorValue::push and set to
            push{Value|Object|Array} and set{...}.
            https://bugs.webkit.org/show_bug.cgi?id=43966
    
            * bindings/js/ScriptProfile.cpp:
            (WebCore::buildInspectorObjectFor):
            * bindings/js/ScriptValue.cpp:
            (WebCore::jsToInspectorValue):
            * bindings/v8/ScriptCallStack.cpp:
            (WebCore::ScriptCallStack::stackTrace):
            * bindings/v8/ScriptProfile.cpp:
            (WebCore::buildInspectorObjectFor):
            * bindings/v8/ScriptValue.cpp:
            (WebCore::v8ToInspectorValue):
            * inspector/CodeGeneratorInspector.pm:
            * inspector/ConsoleMessage.cpp:
            (WebCore::ConsoleMessage::addToFrontend):
            * inspector/Inspector.idl:
            * inspector/InspectorApplicationCacheAgent.cpp:
            (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
            (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
            * inspector/InspectorController.cpp:
            (WebCore::InspectorController::buildArrayForCookies):
            (WebCore::InspectorController::getDOMStorageEntries):
            (WebCore::InspectorController::getProfileHeaders):
            (WebCore::InspectorController::getProfile):
            * inspector/InspectorDOMAgent.cpp:
            (WebCore::InspectorDOMAgent::getEventListenersForNode):
            (WebCore::InspectorDOMAgent::buildObjectForNode):
            (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
            (WebCore::InspectorDOMAgent::getStyles):
            (WebCore::InspectorDOMAgent::getAllStyles):
            (WebCore::InspectorDOMAgent::getRuleRanges):
            (WebCore::InspectorDOMAgent::buildObjectForAttributeStyles):
            (WebCore::InspectorDOMAgent::buildArrayForCSSRules):
            (WebCore::InspectorDOMAgent::buildArrayForPseudoElements):
            (WebCore::InspectorDOMAgent::buildObjectForStyle):
            (WebCore::InspectorDOMAgent::populateObjectWithStyleProperties):
            (WebCore::InspectorDOMAgent::buildArrayForDisabledStyleProperties):
            (WebCore::InspectorDOMAgent::buildObjectForStyleSheet):
            (WebCore::InspectorDOMAgent::buildObjectForRule):
            * inspector/InspectorDebuggerAgent.cpp:
            (WebCore::InspectorDebuggerAgent::saveBreakpoints):
            * inspector/InspectorResource.cpp:
            (WebCore::InspectorResource::updateScriptObject):
            * inspector/InspectorStorageAgent.cpp:
            (WebCore::):
            (WebCore::InspectorStorageAgent::executeSQL):
            * inspector/InspectorTimelineAgent.cpp:
            (WebCore::InspectorTimelineAgent::pushGCEventRecords):
            (WebCore::InspectorTimelineAgent::didInstallTimer):
            (WebCore::InspectorTimelineAgent::didRemoveTimer):
            (WebCore::InspectorTimelineAgent::didScheduleResourceRequest):
            (WebCore::InspectorTimelineAgent::willSendResourceRequest):
            (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
            (WebCore::InspectorTimelineAgent::didMarkTimeline):
            (WebCore::InspectorTimelineAgent::addRecordToTimeline):
            (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
            * inspector/InspectorValues.cpp:
            (WebCore::):
            (WebCore::InspectorValue::asValue):
            (WebCore::InspectorValue::asObject):
            (WebCore::InspectorValue::asArray):
            (WebCore::InspectorObject::asObject):
            (WebCore::InspectorArray::asArray):
            * inspector/InspectorValues.h:
            (WebCore::InspectorObject::setBool):
            (WebCore::InspectorObject::setNumber):
            (WebCore::InspectorObject::setString):
            (WebCore::InspectorObject::setValue):
            (WebCore::InspectorObject::setObject):
            (WebCore::InspectorObject::setArray):
            (WebCore::InspectorArray::pushValue):
            (WebCore::InspectorArray::pushObject):
            (WebCore::InspectorArray::pushArray):
            * inspector/ScriptBreakpoint.cpp:
            (WebCore::ScriptBreakpoint::inspectorObjectFromSourceBreakpoints):
            * inspector/TimelineRecordFactory.cpp:
            (WebCore::TimelineRecordFactory::createGenericRecord):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65320 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ad4e0a6..398d316 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,87 @@
+2010-08-13  Pavel Feldman  <pfeldman at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: rename InspectorValue::push and set to
+        push{Value|Object|Array} and set{...}.
+        https://bugs.webkit.org/show_bug.cgi?id=43966
+
+        * bindings/js/ScriptProfile.cpp:
+        (WebCore::buildInspectorObjectFor):
+        * bindings/js/ScriptValue.cpp:
+        (WebCore::jsToInspectorValue):
+        * bindings/v8/ScriptCallStack.cpp:
+        (WebCore::ScriptCallStack::stackTrace):
+        * bindings/v8/ScriptProfile.cpp:
+        (WebCore::buildInspectorObjectFor):
+        * bindings/v8/ScriptValue.cpp:
+        (WebCore::v8ToInspectorValue):
+        * inspector/CodeGeneratorInspector.pm:
+        * inspector/ConsoleMessage.cpp:
+        (WebCore::ConsoleMessage::addToFrontend):
+        * inspector/Inspector.idl:
+        * inspector/InspectorApplicationCacheAgent.cpp:
+        (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
+        (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::buildArrayForCookies):
+        (WebCore::InspectorController::getDOMStorageEntries):
+        (WebCore::InspectorController::getProfileHeaders):
+        (WebCore::InspectorController::getProfile):
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::getEventListenersForNode):
+        (WebCore::InspectorDOMAgent::buildObjectForNode):
+        (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
+        (WebCore::InspectorDOMAgent::getStyles):
+        (WebCore::InspectorDOMAgent::getAllStyles):
+        (WebCore::InspectorDOMAgent::getRuleRanges):
+        (WebCore::InspectorDOMAgent::buildObjectForAttributeStyles):
+        (WebCore::InspectorDOMAgent::buildArrayForCSSRules):
+        (WebCore::InspectorDOMAgent::buildArrayForPseudoElements):
+        (WebCore::InspectorDOMAgent::buildObjectForStyle):
+        (WebCore::InspectorDOMAgent::populateObjectWithStyleProperties):
+        (WebCore::InspectorDOMAgent::buildArrayForDisabledStyleProperties):
+        (WebCore::InspectorDOMAgent::buildObjectForStyleSheet):
+        (WebCore::InspectorDOMAgent::buildObjectForRule):
+        * inspector/InspectorDebuggerAgent.cpp:
+        (WebCore::InspectorDebuggerAgent::saveBreakpoints):
+        * inspector/InspectorResource.cpp:
+        (WebCore::InspectorResource::updateScriptObject):
+        * inspector/InspectorStorageAgent.cpp:
+        (WebCore::):
+        (WebCore::InspectorStorageAgent::executeSQL):
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::pushGCEventRecords):
+        (WebCore::InspectorTimelineAgent::didInstallTimer):
+        (WebCore::InspectorTimelineAgent::didRemoveTimer):
+        (WebCore::InspectorTimelineAgent::didScheduleResourceRequest):
+        (WebCore::InspectorTimelineAgent::willSendResourceRequest):
+        (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
+        (WebCore::InspectorTimelineAgent::didMarkTimeline):
+        (WebCore::InspectorTimelineAgent::addRecordToTimeline):
+        (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
+        * inspector/InspectorValues.cpp:
+        (WebCore::):
+        (WebCore::InspectorValue::asValue):
+        (WebCore::InspectorValue::asObject):
+        (WebCore::InspectorValue::asArray):
+        (WebCore::InspectorObject::asObject):
+        (WebCore::InspectorArray::asArray):
+        * inspector/InspectorValues.h:
+        (WebCore::InspectorObject::setBool):
+        (WebCore::InspectorObject::setNumber):
+        (WebCore::InspectorObject::setString):
+        (WebCore::InspectorObject::setValue):
+        (WebCore::InspectorObject::setObject):
+        (WebCore::InspectorObject::setArray):
+        (WebCore::InspectorArray::pushValue):
+        (WebCore::InspectorArray::pushObject):
+        (WebCore::InspectorArray::pushArray):
+        * inspector/ScriptBreakpoint.cpp:
+        (WebCore::ScriptBreakpoint::inspectorObjectFromSourceBreakpoints):
+        * inspector/TimelineRecordFactory.cpp:
+        (WebCore::TimelineRecordFactory::createGenericRecord):
+
 2010-08-13  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r65204.
diff --git a/WebCore/bindings/js/ScriptProfile.cpp b/WebCore/bindings/js/ScriptProfile.cpp
index 1fbd040..0eb2814 100644
--- a/WebCore/bindings/js/ScriptProfile.cpp
+++ b/WebCore/bindings/js/ScriptProfile.cpp
@@ -84,8 +84,8 @@ static PassRefPtr<InspectorObject> buildInspectorObjectFor(const JSC::ProfileNod
     const ProfileNodesList& children = node->children();
     ProfileNodesList::const_iterator end = children.end();
     for (ProfileNodesList::const_iterator iter = children.begin(); iter != end; ++iter)
-        childrenArray->push(buildInspectorObjectFor(iter->get()));
-    result->set("children", childrenArray);
+        childrenArray->pushObject(buildInspectorObjectFor(iter->get()));
+    result->setArray("children", childrenArray);
 
     return result;
 }
diff --git a/WebCore/bindings/js/ScriptValue.cpp b/WebCore/bindings/js/ScriptValue.cpp
index b4dda12..a58e0c7 100644
--- a/WebCore/bindings/js/ScriptValue.cpp
+++ b/WebCore/bindings/js/ScriptValue.cpp
@@ -123,7 +123,7 @@ static PassRefPtr<InspectorValue> jsToInspectorValue(ScriptState* scriptState, J
                     ASSERT_NOT_REACHED();
                     elementValue = InspectorValue::null();
                 }
-                inspectorArray->push(elementValue);
+                inspectorArray->pushValue(elementValue);
             }
             return inspectorArray;
         }
@@ -139,7 +139,7 @@ static PassRefPtr<InspectorValue> jsToInspectorValue(ScriptState* scriptState, J
                 ASSERT_NOT_REACHED();
                 inspectorValue = InspectorValue::null();
             }
-            inspectorObject->set(String(name.characters(), name.length()), inspectorValue);
+            inspectorObject->setValue(String(name.characters(), name.length()), inspectorValue);
         }
         return inspectorObject;
     }
diff --git a/WebCore/bindings/v8/ScriptCallStack.cpp b/WebCore/bindings/v8/ScriptCallStack.cpp
index 98ddb90..7c07829 100644
--- a/WebCore/bindings/v8/ScriptCallStack.cpp
+++ b/WebCore/bindings/v8/ScriptCallStack.cpp
@@ -171,7 +171,7 @@ bool ScriptCallStack::stackTrace(int frameLimit, const RefPtr<InspectorArray>& s
         frameObject->setString("functionName", functionName.IsEmpty() ? "" : toWebCoreString(functionName));
         frameObject->setNumber("lineNumber", frame->GetLineNumber());
         frameObject->setNumber("column", frame->GetColumn());
-        stackTrace->push(frameObject);
+        stackTrace->pushObject(frameObject);
     }
     return true;
 #else
diff --git a/WebCore/bindings/v8/ScriptProfile.cpp b/WebCore/bindings/v8/ScriptProfile.cpp
index 32e0066..95ac0de 100644
--- a/WebCore/bindings/v8/ScriptProfile.cpp
+++ b/WebCore/bindings/v8/ScriptProfile.cpp
@@ -72,9 +72,9 @@ static PassRefPtr<InspectorObject> buildInspectorObjectFor(const v8::CpuProfileN
     const int childrenCount = node->GetChildrenCount();
     for (int i = 0; i < childrenCount; i++) {
         const v8::CpuProfileNode* child = node->GetChild(i);
-        children->push(buildInspectorObjectFor(child));
+        children->pushObject(buildInspectorObjectFor(child));
     }
-    result->set("children", children);
+    result->setArray("children", children);
     return result;
 }
 
diff --git a/WebCore/bindings/v8/ScriptValue.cpp b/WebCore/bindings/v8/ScriptValue.cpp
index 842a124..ebe9ccc 100755
--- a/WebCore/bindings/v8/ScriptValue.cpp
+++ b/WebCore/bindings/v8/ScriptValue.cpp
@@ -93,7 +93,7 @@ static PassRefPtr<InspectorValue> v8ToInspectorValue(v8::Handle<v8::Value> value
                 ASSERT_NOT_REACHED();
                 element = InspectorValue::null();
             }
-            inspectorArray->push(element);
+            inspectorArray->pushValue(element);
         }
         return inspectorArray;
     }
@@ -112,7 +112,7 @@ static PassRefPtr<InspectorValue> v8ToInspectorValue(v8::Handle<v8::Value> value
                 ASSERT_NOT_REACHED();
                 continue;
             }
-            inspectorObject->set(toWebCoreStringWithNullCheck(name), propertyValue);
+            inspectorObject->setValue(toWebCoreStringWithNullCheck(name), propertyValue);
         }
         return inspectorObject;
     }
diff --git a/WebCore/inspector/CodeGeneratorInspector.pm b/WebCore/inspector/CodeGeneratorInspector.pm
index 477bdce..10e0882 100644
--- a/WebCore/inspector/CodeGeneratorInspector.pm
+++ b/WebCore/inspector/CodeGeneratorInspector.pm
@@ -47,30 +47,27 @@ $typeTransform{"PassRefPtr"} = {
 };
 $typeTransform{"Object"} = {
     "param" => "PassRefPtr<InspectorObject>",
-    "retVal" => "PassRefPtr<InspectorObject>",
     "variable" => "RefPtr<InspectorObject>",
     "defaultValue" => "InspectorObject::create()",
     "forward" => "InspectorObject",
     "header" => "InspectorValues.h",
-    "accessorSuffix" => ""
+    "accessorSuffix" => "Object"
 };
 $typeTransform{"Array"} = {
     "param" => "PassRefPtr<InspectorArray>",
-    "retVal" => "PassRefPtr<InspectorArray>",
     "variable" => "RefPtr<InspectorArray>",
     "defaultValue" => "InspectorArray::create()",
     "forward" => "InspectorArray",
     "header" => "InspectorValues.h",
-    "accessorSuffix" => ""
+    "accessorSuffix" => "Array"
 };
 $typeTransform{"Value"} = {
     "param" => "PassRefPtr<InspectorValue>",
-    "retVal" => "PassRefPtr<InspectorValue>",
     "variable" => "RefPtr<InspectorValue>",
     "defaultValue" => "InspectorValue::null()",
     "forward" => "InspectorValue",
     "header" => "InspectorValues.h",
-    "accessorSuffix" => ""
+    "accessorSuffix" => "Value"
 };
 $typeTransform{"String"} = {
     "param" => "const String&",
@@ -120,7 +117,6 @@ $typeTransform{"boolean"} = {
     "accessorSuffix" => "Bool"
 };
 $typeTransform{"void"} = {
-    "retVal" => "void",
     "forward" => "",
     "header" => ""
 };
@@ -324,7 +320,7 @@ sub generateBackendFunction
     my $i = 1; # zero element is the method name.
     foreach my $parameter (@inArgs) {
         my $type = $parameter->type;
-        my $argumentType = $typeTransform{$type}->{$typeTransform{$type}->{"retVal"} ? "retVal" : "variable"};
+        my $argumentType = $typeTransform{$type}->{"variable"};
         push(@function, "    $argumentType " . $parameter->name . ";") if !($parameter->name eq "callId");
         push(@function, "    if (!args->get($i)->as" . $typeTransform{$type}->{"accessorSuffix"} . "(&" . $parameter->name . ")) {");
         push(@function, "        ASSERT_NOT_REACHED();");
diff --git a/WebCore/inspector/ConsoleMessage.cpp b/WebCore/inspector/ConsoleMessage.cpp
index 059dea4..ea168f6 100644
--- a/WebCore/inspector/ConsoleMessage.cpp
+++ b/WebCore/inspector/ConsoleMessage.cpp
@@ -134,15 +134,15 @@ void ConsoleMessage::addToFrontend(RemoteInspectorFrontend* frontend, InjectedSc
                 ASSERT_NOT_REACHED();
                 return;
             }
-            jsonArgs->push(inspectorValue);
+            jsonArgs->pushValue(inspectorValue);
         }
-        jsonObj->set("parameters", jsonArgs);
+        jsonObj->setArray("parameters", jsonArgs);
     }
     if (!m_frames.isEmpty()) {
         RefPtr<InspectorArray> frames = InspectorArray::create();
         for (unsigned i = 0; i < m_frames.size(); i++)
-            frames->push(m_frames.at(i).buildInspectorObject());
-        jsonObj->set("stackTrace", frames);
+            frames->pushObject(m_frames.at(i).buildInspectorObject());
+        jsonObj->setArray("stackTrace", frames);
     }
     frontend->addConsoleMessage(jsonObj);
 }
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index 2e14310..d73d374 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -217,6 +217,5 @@ module core {
         [handler=Controller] void setDOMStorageItem(in long callId, in long storageId, in String key, in String value, out boolean success);
         [handler=Controller] void removeDOMStorageItem(in long callId, in long storageId, in String key, out boolean success);
 #endif
-
     };
 }
diff --git a/WebCore/inspector/InspectorApplicationCacheAgent.cpp b/WebCore/inspector/InspectorApplicationCacheAgent.cpp
index b95c0e1..1206184 100644
--- a/WebCore/inspector/InspectorApplicationCacheAgent.cpp
+++ b/WebCore/inspector/InspectorApplicationCacheAgent.cpp
@@ -82,7 +82,7 @@ PassRefPtr<InspectorObject> InspectorApplicationCacheAgent::buildObjectForApplic
     value->setString("lastPathComponent", applicationCacheInfo.m_manifest.lastPathComponent());
     value->setNumber("creationTime", applicationCacheInfo.m_creationTime);
     value->setNumber("updateTime", applicationCacheInfo.m_updateTime);
-    value->set("resources", buildArrayForApplicationCacheResources(applicationCacheResources));
+    value->setArray("resources", buildArrayForApplicationCacheResources(applicationCacheResources));
     return value;
 }
 
@@ -93,7 +93,7 @@ PassRefPtr<InspectorArray> InspectorApplicationCacheAgent::buildArrayForApplicat
     ApplicationCacheHost::ResourceInfoList::const_iterator end = applicationCacheResources.end();
     ApplicationCacheHost::ResourceInfoList::const_iterator it = applicationCacheResources.begin();
     for (int i = 0; it != end; ++it, i++)
-        resources->push(buildObjectForApplicationCacheResource(*it));
+        resources->pushObject(buildObjectForApplicationCacheResource(*it));
 
     return resources;
 }
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 4948679..eb92b33 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -1334,7 +1334,7 @@ PassRefPtr<InspectorArray> InspectorController::buildArrayForCookies(ListHashSet
     ListHashSet<Cookie>::iterator end = cookiesList.end();
     ListHashSet<Cookie>::iterator it = cookiesList.begin();
     for (int i = 0; it != end; ++it, i++)
-        cookies->push(buildObjectForCookie(*it));
+        cookies->pushObject(buildObjectForCookie(*it));
 
     return cookies;
 }
@@ -1418,7 +1418,7 @@ void InspectorController::getDOMStorageEntries(long storageId, RefPtr<InspectorA
             RefPtr<InspectorArray> entry = InspectorArray::create();
             entry->pushString(name);
             entry->pushString(value);
-            (*entries)->push(entry);
+            (*entries)->pushArray(entry);
         }
     }
 }
@@ -1505,7 +1505,7 @@ void InspectorController::getProfileHeaders(RefPtr<InspectorArray>* headers)
 {
     ProfilesMap::iterator profilesEnd = m_profiles.end();
     for (ProfilesMap::iterator it = m_profiles.begin(); it != profilesEnd; ++it)
-        (*headers)->push(createProfileHeader(*it->second));
+        (*headers)->pushObject(createProfileHeader(*it->second));
 }
 
 void InspectorController::getProfile(unsigned uid, RefPtr<InspectorObject>* profileObject)
@@ -1513,7 +1513,7 @@ void InspectorController::getProfile(unsigned uid, RefPtr<InspectorObject>* prof
     ProfilesMap::iterator it = m_profiles.find(uid);
     if (it != m_profiles.end()) {
         *profileObject = createProfileHeader(*it->second);
-        (*profileObject)->set("head", it->second->buildInspectorObjectForHead());
+        (*profileObject)->setObject("head", it->second->buildInspectorObjectForHead());
     }
 }
 
diff --git a/WebCore/inspector/InspectorDOMAgent.cpp b/WebCore/inspector/InspectorDOMAgent.cpp
index 17bc59b..074aab8 100644
--- a/WebCore/inspector/InspectorDOMAgent.cpp
+++ b/WebCore/inspector/InspectorDOMAgent.cpp
@@ -600,7 +600,7 @@ void InspectorDOMAgent::getEventListenersForNode(long nodeId, long* outNodeId, R
         for (size_t j = 0; j < vector.size(); ++j) {
             const RegisteredEventListener& listener = vector[j];
             if (listener.useCapture)
-                (*listenersArray)->push(buildObjectForEventListener(listener, info.eventType, info.node));
+                (*listenersArray)->pushObject(buildObjectForEventListener(listener, info.eventType, info.node));
         }
     }
 
@@ -611,7 +611,7 @@ void InspectorDOMAgent::getEventListenersForNode(long nodeId, long* outNodeId, R
         for (size_t j = 0; j < vector.size(); ++j) {
             const RegisteredEventListener& listener = vector[j];
             if (!listener.useCapture)
-                (*listenersArray)->push(buildObjectForEventListener(listener, info.eventType, info.node));
+                (*listenersArray)->pushObject(buildObjectForEventListener(listener, info.eventType, info.node));
         }
     }
 }
@@ -766,11 +766,11 @@ PassRefPtr<InspectorObject> InspectorDOMAgent::buildObjectForNode(Node* node, in
         value->setNumber("childNodeCount", nodeCount);
         RefPtr<InspectorArray> children = buildArrayForContainerChildren(node, depth, nodesMap);
         if (children->length() > 0)
-            value->set("children", children.release());
+            value->setArray("children", children.release());
 
         if (node->nodeType() == Node::ELEMENT_NODE) {
             Element* element = static_cast<Element*>(node);
-            value->set("attributes", buildArrayForElementAttributes(element));
+            value->setArray("attributes", buildArrayForElementAttributes(element));
             if (node->isFrameOwnerElement()) {
                 HTMLFrameOwnerElement* frameOwner = static_cast<HTMLFrameOwnerElement*>(node);
                 value->setString("documentURL", documentURLString(frameOwner->contentDocument()));
@@ -813,7 +813,7 @@ PassRefPtr<InspectorArray> InspectorDOMAgent::buildArrayForContainerChildren(Nod
         if (innerChildNodeCount(container) == 1) {
             Node *child = innerFirstChild(container);
             if (child->nodeType() == Node::TEXT_NODE)
-                children->push(buildObjectForNode(child, 0, nodesMap));
+                children->pushObject(buildObjectForNode(child, 0, nodesMap));
         }
         return children.release();
     } else if (depth > 0) {
@@ -821,7 +821,7 @@ PassRefPtr<InspectorArray> InspectorDOMAgent::buildArrayForContainerChildren(Nod
     }
 
     for (Node *child = innerFirstChild(container); child; child = innerNextSibling(child))
-        children->push(buildObjectForNode(child, depth, nodesMap));
+        children->pushObject(buildObjectForNode(child, depth, nodesMap));
     return children.release();
 }
 
@@ -986,27 +986,27 @@ void InspectorDOMAgent::getStyles(long nodeId, bool authorOnly, RefPtr<Inspector
 
     RefPtr<InspectorObject> result = InspectorObject::create();
     if (element->style())
-        result->set("inlineStyle", buildObjectForStyle(element->style(), true));
-    result->set("computedStyle", buildObjectForStyle(computedStyleInfo.get(), false));
+        result->setObject("inlineStyle", buildObjectForStyle(element->style(), true));
+    result->setObject("computedStyle", buildObjectForStyle(computedStyleInfo.get(), false));
 
     CSSStyleSelector* selector = element->ownerDocument()->styleSelector();
     RefPtr<CSSRuleList> matchedRules = selector->styleRulesForElement(element, authorOnly);
-    result->set("matchedCSSRules", buildArrayForCSSRules(node->ownerDocument(), matchedRules.get()));
+    result->setArray("matchedCSSRules", buildArrayForCSSRules(node->ownerDocument(), matchedRules.get()));
 
-    result->set("styleAttributes", buildObjectForAttributeStyles(element));
-    result->set("pseudoElements", buildArrayForPseudoElements(element, authorOnly));
+    result->setObject("styleAttributes", buildObjectForAttributeStyles(element));
+    result->setArray("pseudoElements", buildArrayForPseudoElements(element, authorOnly));
 
     RefPtr<InspectorObject> currentStyle = result;
     Element* parentElement = element->parentElement();
     while (parentElement) {
         RefPtr<InspectorObject> parentStyle = InspectorObject::create();
-        currentStyle->set("parent", parentStyle);
+        currentStyle->setObject("parent", parentStyle);
         if (parentElement->style() && parentElement->style()->length())
-            parentStyle->set("inlineStyle", buildObjectForStyle(parentElement->style(), true));
+            parentStyle->setObject("inlineStyle", buildObjectForStyle(parentElement->style(), true));
 
         CSSStyleSelector* parentSelector = parentElement->ownerDocument()->styleSelector();
         RefPtr<CSSRuleList> parentMatchedRules = parentSelector->styleRulesForElement(parentElement, authorOnly);
-        parentStyle->set("matchedCSSRules", buildArrayForCSSRules(parentElement->ownerDocument(), parentMatchedRules.get()));
+        parentStyle->setArray("matchedCSSRules", buildArrayForCSSRules(parentElement->ownerDocument(), parentMatchedRules.get()));
 
         parentElement = parentElement->parentElement();
         currentStyle = parentStyle;
@@ -1021,7 +1021,7 @@ void InspectorDOMAgent::getAllStyles(RefPtr<InspectorArray>* styles)
         for (unsigned i = 0; i < list->length(); ++i) {
             StyleSheet* styleSheet = list->item(i);
             if (styleSheet->isCSSStyleSheet())
-                (*styles)->push(buildObjectForStyleSheet((*it).get(), static_cast<CSSStyleSheet*>(styleSheet)));
+                (*styles)->pushObject(buildObjectForStyleSheet((*it).get(), static_cast<CSSStyleSheet*>(styleSheet)));
         }
     }
 }
@@ -1044,9 +1044,9 @@ void InspectorDOMAgent::getRuleRanges(long styleSheetId, RefPtr<InspectorValue>*
         for (HashMap<long, SourceRange>::iterator it = ruleRanges.begin(); it != ruleRanges.end(); ++it) {
             if (it->second.second) {
                 RefPtr<InspectorObject> ruleRange = InspectorObject::create();
-                result->set(String::number(it->first).utf8().data(), ruleRange);
+                result->setObject(String::number(it->first).utf8().data(), ruleRange);
                 RefPtr<InspectorObject> bodyRange = InspectorObject::create();
-                ruleRange->set("bodyRange", bodyRange);
+                ruleRange->setObject("bodyRange", bodyRange);
                 bodyRange->setNumber("start", it->second.first);
                 bodyRange->setNumber("end", it->second.second);
             }
@@ -1085,7 +1085,7 @@ PassRefPtr<InspectorObject> InspectorDOMAgent::buildObjectForAttributeStyles(Ele
         Attribute* attribute = attributes->attributeItem(i);
         if (attribute->style()) {
             String attributeName = attribute->localName();
-            styleAttributes->set(attributeName.utf8().data(), buildObjectForStyle(attribute->style(), true));
+            styleAttributes->setObject(attributeName.utf8().data(), buildObjectForStyle(attribute->style(), true));
         }
     }
     return styleAttributes;
@@ -1097,7 +1097,7 @@ PassRefPtr<InspectorArray> InspectorDOMAgent::buildArrayForCSSRules(Document* ow
     for (unsigned i = 0; matchedRules && i < matchedRules->length(); ++i) {
         CSSRule* rule = matchedRules->item(i);
         if (rule->type() == CSSRule::STYLE_RULE)
-            matchedCSSRules->push(buildObjectForRule(ownerDocument, static_cast<CSSStyleRule*>(rule)));
+            matchedCSSRules->pushObject(buildObjectForRule(ownerDocument, static_cast<CSSStyleRule*>(rule)));
     }
     return matchedCSSRules.release();
 }
@@ -1113,8 +1113,8 @@ PassRefPtr<InspectorArray> InspectorDOMAgent::buildArrayForPseudoElements(Elemen
         if (matchedRules && matchedRules->length()) {
             RefPtr<InspectorObject> pseudoStyles = InspectorObject::create();
             pseudoStyles->setNumber("pseudoId", static_cast<int>(pseudoId));
-            pseudoStyles->set("rules", buildArrayForCSSRules(element->ownerDocument(), matchedRules.get()));
-            result->push(pseudoStyles.release());
+            pseudoStyles->setArray("rules", buildArrayForCSSRules(element->ownerDocument(), matchedRules.get()));
+            result->pushObject(pseudoStyles.release());
         }
     }
     return result.release();
@@ -1309,7 +1309,7 @@ PassRefPtr<InspectorObject> InspectorDOMAgent::buildObjectForStyle(CSSStyleDecla
 
         DisabledStyleDeclaration* disabledStyle = cssStore()->disabledStyleForId(styleId, false);
         if (disabledStyle)
-            result->set("disabled", buildArrayForDisabledStyleProperties(disabledStyle));
+            result->setArray("disabled", buildArrayForDisabledStyleProperties(disabledStyle));
     }
     result->setString("width", style->getPropertyValue("width"));
     result->setString("height", style->getPropertyValue("height"));
@@ -1336,10 +1336,10 @@ void InspectorDOMAgent::populateObjectWithStyleProperties(CSSStyleDeclaration* s
             shorthandValues->setString(shorthand, shorthandValue(style, shorthand));
         }
         property->setString("value", style->getPropertyValue(name));
-        properties->push(property.release());
+        properties->pushObject(property.release());
     }
-    result->set("properties", properties);
-    result->set("shorthandValues", shorthandValues);
+    result->setArray("properties", properties);
+    result->setObject("shorthandValues", shorthandValues);
 }
 
 PassRefPtr<InspectorArray> InspectorDOMAgent::buildArrayForDisabledStyleProperties(DisabledStyleDeclaration* declaration)
@@ -1350,7 +1350,7 @@ PassRefPtr<InspectorArray> InspectorDOMAgent::buildArrayForDisabledStyleProperti
         property->setString("name", it->first);
         property->setString("value", it->second.first);
         property->setString("priority", it->second.second);
-        properties->push(property.release());
+        properties->pushObject(property.release());
     }
     return properties.release();
 }
@@ -1370,10 +1370,10 @@ PassRefPtr<InspectorObject> InspectorDOMAgent::buildObjectForStyleSheet(Document
         for (unsigned i = 0; i < cssRuleList->length(); ++i) {
             CSSRule* rule = cssRuleList->item(i);
             if (rule->isStyleRule())
-                cssRules->push(buildObjectForRule(ownerDocument, static_cast<CSSStyleRule*>(rule)));
+                cssRules->pushObject(buildObjectForRule(ownerDocument, static_cast<CSSStyleRule*>(rule)));
         }
     }
-    result->set("cssRules", cssRules.release());
+    result->setArray("cssRules", cssRules.release());
     return result.release();
 }
 
@@ -1390,7 +1390,7 @@ PassRefPtr<InspectorObject> InspectorDOMAgent::buildObjectForRule(Document* owne
         RefPtr<InspectorObject> parentStyleSheetValue = InspectorObject::create();
         parentStyleSheetValue->setString("href", parentStyleSheet->href());
         parentStyleSheetValue->setNumber("id", cssStore()->bindStyleSheet(parentStyleSheet));
-        result->set("parentStyleSheet", parentStyleSheetValue.release());
+        result->setObject("parentStyleSheet", parentStyleSheetValue.release());
     }
     bool isUserAgent = parentStyleSheet && !parentStyleSheet->ownerNode() && parentStyleSheet->href().isEmpty();
     bool isUser = parentStyleSheet && parentStyleSheet->ownerNode() && parentStyleSheet->ownerNode()->nodeName() == "#document";
@@ -1400,7 +1400,7 @@ PassRefPtr<InspectorObject> InspectorDOMAgent::buildObjectForRule(Document* owne
 
     // Bind editable scripts only.
     bool bind = !isUserAgent && !isUser;
-    result->set("style", buildObjectForStyle(rule->style(), bind));
+    result->setObject("style", buildObjectForStyle(rule->style(), bind));
 
     if (bind)
         result->setNumber("id", cssStore()->bindRule(rule));
diff --git a/WebCore/inspector/InspectorDebuggerAgent.cpp b/WebCore/inspector/InspectorDebuggerAgent.cpp
index b70ddbf..e1c0dc0 100644
--- a/WebCore/inspector/InspectorDebuggerAgent.cpp
+++ b/WebCore/inspector/InspectorDebuggerAgent.cpp
@@ -236,7 +236,7 @@ void InspectorDebuggerAgent::saveBreakpoints()
         if (it->second.isEmpty())
             continue;
         RefPtr<InspectorObject> breakpointsForURL = ScriptBreakpoint::inspectorObjectFromSourceBreakpoints(it->second);
-        breakpoints->set(it->first, breakpointsForURL);
+        breakpoints->setObject(it->first, breakpointsForURL);
     }
     m_inspectorController->saveBreakpoints(breakpoints);
 }
diff --git a/WebCore/inspector/InspectorResource.cpp b/WebCore/inspector/InspectorResource.cpp
index 9259d79..a2b55b0 100644
--- a/WebCore/inspector/InspectorResource.cpp
+++ b/WebCore/inspector/InspectorResource.cpp
@@ -189,7 +189,7 @@ void InspectorResource::updateScriptObject(RemoteInspectorFrontend* frontend)
         jsonObject->setString("path", m_requestURL.path());
         jsonObject->setString("lastPathComponent", m_requestURL.lastPathComponent());
         RefPtr<InspectorObject> requestHeaders = buildHeadersObject(m_requestHeaderFields);
-        jsonObject->set("requestHeaders", requestHeaders);
+        jsonObject->setObject("requestHeaders", requestHeaders);
         jsonObject->setBool("mainResource", m_isMainResource);
         jsonObject->setString("requestMethod", m_requestMethod);
         jsonObject->setString("requestFormData", m_requestFormData);
@@ -203,12 +203,12 @@ void InspectorResource::updateScriptObject(RemoteInspectorFrontend* frontend)
         jsonObject->setNumber("statusCode", m_responseStatusCode);
         jsonObject->setString("statusText", m_responseStatusText);
         RefPtr<InspectorObject> responseHeaders = buildHeadersObject(m_responseHeaderFields);
-        jsonObject->set("responseHeaders", responseHeaders);
+        jsonObject->setObject("responseHeaders", responseHeaders);
         jsonObject->setNumber("connectionID", m_connectionID);
         jsonObject->setBool("connectionReused", m_connectionReused);
         jsonObject->setBool("cached", m_cached);
         if (m_loadTiming && !m_cached)
-            jsonObject->set("timing", buildObjectForTiming(m_loadTiming.get()));
+            jsonObject->setObject("timing", buildObjectForTiming(m_loadTiming.get()));
         jsonObject->setBool("didResponseChange", true);
     }
 
diff --git a/WebCore/inspector/InspectorStorageAgent.cpp b/WebCore/inspector/InspectorStorageAgent.cpp
index ad39434..66d3372 100644
--- a/WebCore/inspector/InspectorStorageAgent.cpp
+++ b/WebCore/inspector/InspectorStorageAgent.cpp
@@ -66,10 +66,10 @@ void reportTransactionFailed(InspectorStorageAgent* agent, long transactionId, S
 
 class StatementCallback : public SQLStatementCallback {
 public:
-    static PassRefPtr<StatementCallback> create(long transactionId, PassRefPtr<InspectorStorageAgent> agent)
-    {
-        return adoptRef(new StatementCallback(transactionId, agent));
-    }
+    static PassRefPtr<StatementCallback> create(long transactionId, PassRefPtr<InspectorStorageAgent> agent)
+    {
+        return adoptRef(new StatementCallback(transactionId, agent));
+    }
 
     virtual ~StatementCallback() { }
 
@@ -92,7 +92,7 @@ public:
             switch (value.type()) {
                 case SQLValue::StringValue: values->pushString(value.string()); break;
                 case SQLValue::NumberValue: values->pushNumber(value.number()); break;
-                case SQLValue::NullValue: values->push(InspectorValue::null()); break;
+                case SQLValue::NullValue: values->pushValue(InspectorValue::null()); break;
             }
         }
         m_agent->frontend()->sqlTransactionSucceeded(m_transactionId, columnNames, values);
@@ -109,10 +109,10 @@ private:
 
 class StatementErrorCallback : public SQLStatementErrorCallback {
 public:
-    static PassRefPtr<StatementErrorCallback> create(long transactionId, PassRefPtr<InspectorStorageAgent> agent)
-    {
-        return adoptRef(new StatementErrorCallback(transactionId, agent));
-    }
+    static PassRefPtr<StatementErrorCallback> create(long transactionId, PassRefPtr<InspectorStorageAgent> agent)
+    {
+        return adoptRef(new StatementErrorCallback(transactionId, agent));
+    }
 
     virtual ~StatementErrorCallback() { }
 
@@ -132,10 +132,10 @@ private:
 
 class TransactionCallback : public SQLTransactionCallback {
 public:
-    static PassRefPtr<TransactionCallback> create(const String& sqlStatement, long transactionId, PassRefPtr<InspectorStorageAgent> agent)
-    {
-        return adoptRef(new TransactionCallback(sqlStatement, transactionId, agent));
-    }
+    static PassRefPtr<TransactionCallback> create(const String& sqlStatement, long transactionId, PassRefPtr<InspectorStorageAgent> agent)
+    {
+        return adoptRef(new TransactionCallback(sqlStatement, transactionId, agent));
+    }
 
     virtual ~TransactionCallback() { }
 
@@ -163,10 +163,10 @@ private:
 
 class TransactionErrorCallback : public SQLTransactionErrorCallback {
 public:
-    static PassRefPtr<TransactionErrorCallback> create(long transactionId, PassRefPtr<InspectorStorageAgent> agent)
-    {
-        return adoptRef(new TransactionErrorCallback(transactionId, agent));
-    }
+    static PassRefPtr<TransactionErrorCallback> create(long transactionId, PassRefPtr<InspectorStorageAgent> agent)
+    {
+        return adoptRef(new TransactionErrorCallback(transactionId, agent));
+    }
 
     virtual ~TransactionErrorCallback() { }
 
@@ -183,20 +183,20 @@ private:
     RefPtr<InspectorStorageAgent> m_agent;
 };
 
-class TransactionSuccessCallback : public VoidCallback {
-public:
-    static PassRefPtr<TransactionSuccessCallback> create()
-    {
-        return adoptRef(new TransactionSuccessCallback());
-    }
-
-    virtual ~TransactionSuccessCallback() { }
-
-    virtual void handleEvent() { }
-
-private:
-    TransactionSuccessCallback() { }
-};
+class TransactionSuccessCallback : public VoidCallback {
+public:
+    static PassRefPtr<TransactionSuccessCallback> create()
+    {
+        return adoptRef(new TransactionSuccessCallback());
+    }
+
+    virtual ~TransactionSuccessCallback() { }
+
+    virtual void handleEvent() { }
+
+private:
+    TransactionSuccessCallback() { }
+};
 
 } // namespace
 
@@ -212,7 +212,7 @@ InspectorStorageAgent::~InspectorStorageAgent()
 long InspectorStorageAgent::executeSQL(Database* database, const String& query)
 {
     long transactionId = ++lastTransactionId;
-    RefPtr<SQLTransactionCallback> callback(TransactionCallback::create(query, transactionId, this));
+    RefPtr<SQLTransactionCallback> callback(TransactionCallback::create(query, transactionId, this));
     RefPtr<SQLTransactionErrorCallback> errorCallback(TransactionErrorCallback::create(transactionId, this));
     RefPtr<VoidCallback> successCallback(TransactionSuccessCallback::create());
     database->transaction(callback.release(), errorCallback.release(), successCallback.release());
diff --git a/WebCore/inspector/InspectorTimelineAgent.cpp b/WebCore/inspector/InspectorTimelineAgent.cpp
index b5cff68..aa42a54 100644
--- a/WebCore/inspector/InspectorTimelineAgent.cpp
+++ b/WebCore/inspector/InspectorTimelineAgent.cpp
@@ -63,7 +63,7 @@ void InspectorTimelineAgent::pushGCEventRecords()
     m_gcEvents.clear();
     for (GCEvents::iterator i = events.begin(); i != events.end(); ++i) {
         RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(i->startTime);
-        record->set("data", TimelineRecordFactory::createGCEventData(i->collectedBytes));
+        record->setObject("data", TimelineRecordFactory::createGCEventData(i->collectedBytes));
         record->setNumber("endTime", i->endTime);
         addRecordToTimeline(record.release(), GCEventTimelineRecordType);
     }
@@ -150,7 +150,7 @@ void InspectorTimelineAgent::didInstallTimer(int timerId, int timeout, bool sing
 {
     pushGCEventRecords();
     RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(WTF::currentTimeMS());
-    record->set("data", TimelineRecordFactory::createTimerInstallData(timerId, timeout, singleShot));
+    record->setObject("data", TimelineRecordFactory::createTimerInstallData(timerId, timeout, singleShot));
     addRecordToTimeline(record.release(), TimerInstallTimelineRecordType);
 }
 
@@ -158,7 +158,7 @@ void InspectorTimelineAgent::didRemoveTimer(int timerId)
 {
     pushGCEventRecords();
     RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(WTF::currentTimeMS());
-    record->set("data", TimelineRecordFactory::createGenericTimerData(timerId));
+    record->setObject("data", TimelineRecordFactory::createGenericTimerData(timerId));
     addRecordToTimeline(record.release(), TimerRemoveTimelineRecordType);
 }
 
@@ -206,7 +206,7 @@ void InspectorTimelineAgent::didScheduleResourceRequest(const String& url)
 {
     pushGCEventRecords();
     RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(WTF::currentTimeMS());
-    record->set("data", TimelineRecordFactory::createScheduleResourceRequestData(url));
+    record->setObject("data", TimelineRecordFactory::createScheduleResourceRequestData(url));
     record->setNumber("type", ScheduleResourceRequestTimelineRecordType);
     addRecordToTimeline(record.release(), ScheduleResourceRequestTimelineRecordType);
 }
@@ -216,7 +216,7 @@ void InspectorTimelineAgent::willSendResourceRequest(unsigned long identifier, b
 {
     pushGCEventRecords();
     RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(WTF::currentTimeMS());
-    record->set("data", TimelineRecordFactory::createResourceSendRequestData(identifier, isMainResource, request));
+    record->setObject("data", TimelineRecordFactory::createResourceSendRequestData(identifier, isMainResource, request));
     record->setNumber("type", ResourceSendRequestTimelineRecordType);
     setHeapSizeStatistic(record.get());
     m_frontend->addRecordToTimeline(record.release());
@@ -246,7 +246,7 @@ void InspectorTimelineAgent::didFinishLoadingResource(unsigned long identifier,
 {
     pushGCEventRecords();
     RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(WTF::currentTimeMS());
-    record->set("data", TimelineRecordFactory::createResourceFinishData(identifier, didFail));
+    record->setObject("data", TimelineRecordFactory::createResourceFinishData(identifier, didFail));
     record->setNumber("type", ResourceFinishTimelineRecordType);
     setHeapSizeStatistic(record.get());
     m_frontend->addRecordToTimeline(record.release());
@@ -256,7 +256,7 @@ void InspectorTimelineAgent::didMarkTimeline(const String& message)
 {
     pushGCEventRecords();
     RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(WTF::currentTimeMS());
-    record->set("data", TimelineRecordFactory::createMarkTimelineData(message));
+    record->setObject("data", TimelineRecordFactory::createMarkTimelineData(message));
     addRecordToTimeline(record.release(), MarkTimelineRecordType);
 }
 
@@ -295,7 +295,7 @@ void InspectorTimelineAgent::addRecordToTimeline(PassRefPtr<InspectorObject> prp
         m_frontend->addRecordToTimeline(record.release());
     else {
         TimelineRecordEntry parent = m_recordStack.last();
-        parent.children->push(record.release());
+        parent.children->pushObject(record.release());
     }
 }
 
@@ -317,8 +317,8 @@ void InspectorTimelineAgent::didCompleteCurrentRecord(TimelineRecordType type)
         TimelineRecordEntry entry = m_recordStack.last();
         m_recordStack.removeLast();
         ASSERT(entry.type == type);
-        entry.record->set("data", entry.data);
-        entry.record->set("children", entry.children);
+        entry.record->setObject("data", entry.data);
+        entry.record->setArray("children", entry.children);
         entry.record->setNumber("endTime", WTF::currentTimeMS());
         addRecordToTimeline(entry.record, type);
     }
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;
diff --git a/WebCore/inspector/InspectorValues.h b/WebCore/inspector/InspectorValues.h
index e523032..4bc36f2 100644
--- a/WebCore/inspector/InspectorValues.h
+++ b/WebCore/inspector/InspectorValues.h
@@ -73,6 +73,9 @@ public:
     virtual bool asNumber(unsigned long* output) const;
     virtual bool asNumber(unsigned int* output) const;
     virtual bool asString(String* output) const;
+    virtual bool asValue(RefPtr<InspectorValue>* output);
+    virtual bool asObject(RefPtr<InspectorObject>* output);
+    virtual bool asArray(RefPtr<InspectorArray>* output);
     virtual PassRefPtr<InspectorObject> asObject();
     virtual PassRefPtr<InspectorArray> asArray();
 
@@ -163,12 +166,15 @@ public:
     }
     ~InspectorObject() { }
 
+    virtual bool asObject(RefPtr<InspectorObject>* output);
     virtual PassRefPtr<InspectorObject> asObject();
 
     void setBool(const String& name, bool);
     void setNumber(const String& name, double);
     void setString(const String& name, const String&);
-    void set(const String& name, PassRefPtr<InspectorValue>);
+    void setValue(const String& name, PassRefPtr<InspectorValue>);
+    void setObject(const String& name, PassRefPtr<InspectorObject>);
+    void setArray(const String& name, PassRefPtr<InspectorArray>);
 
     bool getBool(const String& name, bool* output) const;
     bool getNumber(const String& name, double* output) const;
@@ -198,12 +204,15 @@ public:
     }
     ~InspectorArray() { }
 
+    virtual bool asArray(RefPtr<InspectorArray>* output);
     virtual PassRefPtr<InspectorArray> asArray();
 
     void pushBool(bool);
     void pushNumber(double);
     void pushString(const String&);
-    void push(PassRefPtr<InspectorValue>);
+    void pushValue(PassRefPtr<InspectorValue>);
+    void pushObject(PassRefPtr<InspectorObject>);
+    void pushArray(PassRefPtr<InspectorArray>);
     unsigned length() const { return m_data.size(); }
 
     PassRefPtr<InspectorValue> get(size_t index);
@@ -217,20 +226,32 @@ private:
 
 inline void InspectorObject::setBool(const String& name, bool value)
 {
-    set(name, InspectorBasicValue::create(value));
+    setValue(name, InspectorBasicValue::create(value));
 }
 
 inline void InspectorObject::setNumber(const String& name, double value)
 {
-    set(name, InspectorBasicValue::create(value));
+    setValue(name, InspectorBasicValue::create(value));
 }
 
 inline void InspectorObject::setString(const String& name, const String& value)
 {
-    set(name, InspectorString::create(value));
+    setValue(name, InspectorString::create(value));
 }
 
-inline void InspectorObject::set(const String& name, PassRefPtr<InspectorValue> value)
+inline void InspectorObject::setValue(const String& name, PassRefPtr<InspectorValue> value)
+{
+    if (m_data.set(name, value).second)
+        m_order.append(name);
+}
+
+inline void InspectorObject::setObject(const String& name, PassRefPtr<InspectorObject> value)
+{
+    if (m_data.set(name, value).second)
+        m_order.append(name);
+}
+
+inline void InspectorObject::setArray(const String& name, PassRefPtr<InspectorArray> value)
 {
     if (m_data.set(name, value).second)
         m_order.append(name);
@@ -251,7 +272,17 @@ inline void InspectorArray::pushString(const String& value)
     m_data.append(InspectorString::create(value));
 }
 
-inline void InspectorArray::push(PassRefPtr<InspectorValue> value)
+inline void InspectorArray::pushValue(PassRefPtr<InspectorValue> value)
+{
+    m_data.append(value);
+}
+
+inline void InspectorArray::pushObject(PassRefPtr<InspectorObject> value)
+{
+    m_data.append(value);
+}
+
+inline void InspectorArray::pushArray(PassRefPtr<InspectorArray> value)
 {
     m_data.append(value);
 }
diff --git a/WebCore/inspector/ScriptBreakpoint.cpp b/WebCore/inspector/ScriptBreakpoint.cpp
index ce0d18a..24401f1 100644
--- a/WebCore/inspector/ScriptBreakpoint.cpp
+++ b/WebCore/inspector/ScriptBreakpoint.cpp
@@ -64,7 +64,7 @@ PassRefPtr<InspectorObject> ScriptBreakpoint::inspectorObjectFromSourceBreakpoin
         RefPtr<InspectorObject> breakpoint = InspectorObject::create();
         breakpoint->setBool("enabled", it->second.enabled);
         breakpoint->setString("condition", it->second.condition);
-        breakpoints->set(String::number(it->first), breakpoint);
+        breakpoints->setObject(String::number(it->first), breakpoint);
     }
     return breakpoints.release();
 }
diff --git a/WebCore/inspector/TimelineRecordFactory.cpp b/WebCore/inspector/TimelineRecordFactory.cpp
index ad9fdec..e1c2bbb 100644
--- a/WebCore/inspector/TimelineRecordFactory.cpp
+++ b/WebCore/inspector/TimelineRecordFactory.cpp
@@ -49,7 +49,7 @@ PassRefPtr<InspectorObject> TimelineRecordFactory::createGenericRecord(double st
 
     RefPtr<InspectorArray> stackTrace = InspectorArray::create();
     if (ScriptCallStack::stackTrace(5, stackTrace))
-        record->set("stackTrace", stackTrace);
+        record->setArray("stackTrace", stackTrace);
     return record.release();
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list