<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[173554] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/173554">173554</a></dd>
<dt>Author</dt> <dd>burg@cs.washington.edu</dd>
<dt>Date</dt> <dd>2014-09-11 21:53:35 -0700 (Thu, 11 Sep 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Source/JavaScriptCore:
Web Inspector: disambiguate double and integer primitive types in the protocol
https://bugs.webkit.org/show_bug.cgi?id=136606
Reviewed by Timothy Hatcher.
Right now it's really easy to mix up doubles and integers when serializing or deserializing
values for the inspector protocol. This patch disambiguates setting/getting doubles and integers
so that it is clearer as to which type is intended.
A new InspectorValue::Type is added for Integer types, and the Number type is renamed to Double.
The existing callsites for asNumber/getNumber/setNumber have been fixed.
Address various integration points to make sure the right type tag is assigned to InspectorValues.
* bindings/ScriptValue.cpp:
(Deprecated::jsToInspectorValue): Make an Integer if the JSValue is Int52 or smaller.
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::injectedScriptForObjectId):
* inspector/InspectorBackendDispatcher.cpp:
(Inspector::InspectorBackendDispatcher::dispatch):
(Inspector::InspectorBackendDispatcher::sendResponse):
(Inspector::InspectorBackendDispatcher::reportProtocolError):
(Inspector::AsMethodBridges::asInteger):
(Inspector::AsMethodBridges::asDouble):
(Inspector::InspectorBackendDispatcher::getInteger):
(Inspector::InspectorBackendDispatcher::getDouble):
(Inspector::AsMethodBridges::asInt): Deleted.
(Inspector::InspectorBackendDispatcher::getInt): Deleted.
* inspector/InspectorBackendDispatcher.h:
* inspector/InspectorProtocolTypes.h: Remove the special case for checking int type tags.
(Inspector::Protocol::ArrayItemHelper<int>::Traits::pushRaw):
(Inspector::Protocol::ArrayItemHelper<double>::Traits::pushRaw):
(Inspector::Protocol::BindingTraits<int>::assertValueHasExpectedType): Deleted.
* inspector/InspectorValues.cpp: Allow integers and doubles to be convertible using asInteger/asDouble.
(Inspector::InspectorValue::asDouble):
(Inspector::InspectorValue::asInteger):
(Inspector::InspectorBasicValue::asDouble):
(Inspector::InspectorBasicValue::asInteger):
(Inspector::InspectorBasicValue::writeJSON):
(Inspector::InspectorValue::asNumber): Deleted.
(Inspector::InspectorBasicValue::asNumber): Deleted.
* inspector/InspectorValues.h:
(Inspector::InspectorObjectBase::setInteger):
(Inspector::InspectorObjectBase::setDouble):
(Inspector::InspectorArrayBase::pushInteger):
(Inspector::InspectorArrayBase::pushDouble):
(Inspector::InspectorObjectBase::setNumber): Deleted.
(Inspector::InspectorArrayBase::pushInt): Deleted.
(Inspector::InspectorArrayBase::pushNumber): Deleted.
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::buildObjectForBreakpointCookie):
(Inspector::InspectorDebuggerAgent::breakpointActionsFromProtocol):
(Inspector::parseLocation):
(Inspector::InspectorDebuggerAgent::didParseSource):
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
* inspector/scripts/codegen/generator.py: Update emitted code and rebaseline test results.
(Generator.keyed_get_method_for_type):
(Generator.keyed_set_method_for_type):
* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
* replay/EncodedValue.cpp:
(JSC::EncodedValue::convertTo<double>):
(JSC::EncodedValue::convertTo<float>):
(JSC::EncodedValue::convertTo<int32_t>):
(JSC::EncodedValue::convertTo<int64_t>):
(JSC::EncodedValue::convertTo<uint32_t>):
(JSC::EncodedValue::convertTo<uint64_t>):
Source/WebCore:
Web Inspector: disambiguate integral and real number primitive types in the protocol
https://bugs.webkit.org/show_bug.cgi?id=136606
Reviewed by Timothy Hatcher.
Update clients of InspectorValue to disambiguate integer and double primitive types.
No new tests, no behavior changed.
* inspector/InspectorDOMAgent.cpp:
(WebCore::parseColor):
(WebCore::parseQuad):
(WebCore::InspectorDOMAgent::performSearch):
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForPoint):
(WebCore::buildObjectForRect):
(WebCore::buildObjectForSize):
(WebCore::appendPathCommandAndPoints):
(WebCore::InspectorOverlay::reset):
* inspector/InspectorReplayAgent.cpp:
(WebCore::InspectorReplayAgent::replayToPosition):
* inspector/InspectorStyleSheet.h:
(WebCore::InspectorCSSId::InspectorCSSId):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didWriteHTML):
(WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
(WebCore::TimelineRecordFactory::createBackgroundRecord):
(WebCore::TimelineRecordFactory::createGCEventData):
(WebCore::TimelineRecordFactory::createFunctionCallData):
(WebCore::TimelineRecordFactory::createProbeSampleData):
(WebCore::TimelineRecordFactory::createGenericTimerData):
(WebCore::TimelineRecordFactory::createTimerInstallData):
(WebCore::TimelineRecordFactory::createXHRReadyStateChangeData):
(WebCore::TimelineRecordFactory::createEvaluateScriptData):
(WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
(WebCore::TimelineRecordFactory::createResourceFinishData):
(WebCore::TimelineRecordFactory::createReceiveResourceData):
(WebCore::TimelineRecordFactory::createLayoutData):
(WebCore::TimelineRecordFactory::createParseHTMLData):
(WebCore::TimelineRecordFactory::createAnimationFrameData):
(WebCore::createQuad):
* inspector/TimelineRecordFactory.h:
(WebCore::TimelineRecordFactory::createWebSocketCreateData):
(WebCore::TimelineRecordFactory::createGenericWebSocketData):
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebindingsScriptValuecpp">trunk/Source/JavaScriptCore/bindings/ScriptValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptManagercpp">trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInspectorBackendDispatchercpp">trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInspectorBackendDispatcherh">trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInspectorProtocolTypesh">trunk/Source/JavaScriptCore/inspector/InspectorProtocolTypes.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInspectorValuescpp">trunk/Source/JavaScriptCore/inspector/InspectorValues.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInspectorValuesh">trunk/Source/JavaScriptCore/inspector/InspectorValues.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorRuntimeAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptscodegengeneratorpy">trunk/Source/JavaScriptCore/inspector/scripts/codegen/generator.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsexpectedcommandswithasyncattributejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-async-attribute.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsexpectedcommandswithoptionalcallreturnparametersjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsexpectedeventswithoptionalparametersjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/events-with-optional-parameters.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsexpectedgeneratedomainswithfeatureguardsjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsexpectedtypedeclarationobjecttypejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-object-type.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsexpectedtyperequiringruntimecastsjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayEncodedValuecpp">trunk/Source/JavaScriptCore/replay/EncodedValue.cpp</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMAgentcpp">trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMDebuggerAgentcpp">trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp">trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorOverlaycpp">trunk/Source/WebCore/inspector/InspectorOverlay.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorReplayAgentcpp">trunk/Source/WebCore/inspector/InspectorReplayAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorStyleSheeth">trunk/Source/WebCore/inspector/InspectorStyleSheet.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorTimelineAgentcpp">trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorTimelineRecordFactorycpp">trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorTimelineRecordFactoryh">trunk/Source/WebCore/inspector/TimelineRecordFactory.h</a></li>
<li><a href="#trunkSourceWebCorepageContentSecurityPolicycpp">trunk/Source/WebCore/page/ContentSecurityPolicy.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -1,3 +1,79 @@
</span><ins>+2014-09-11 Brian J. Burg <burg@cs.washington.edu>
+
+ Web Inspector: disambiguate double and integer primitive types in the protocol
+ https://bugs.webkit.org/show_bug.cgi?id=136606
+
+ Reviewed by Timothy Hatcher.
+
+ Right now it's really easy to mix up doubles and integers when serializing or deserializing
+ values for the inspector protocol. This patch disambiguates setting/getting doubles and integers
+ so that it is clearer as to which type is intended.
+
+ A new InspectorValue::Type is added for Integer types, and the Number type is renamed to Double.
+ The existing callsites for asNumber/getNumber/setNumber have been fixed.
+
+ Address various integration points to make sure the right type tag is assigned to InspectorValues.
+
+ * bindings/ScriptValue.cpp:
+ (Deprecated::jsToInspectorValue): Make an Integer if the JSValue is Int52 or smaller.
+ * inspector/InjectedScriptManager.cpp:
+ (Inspector::InjectedScriptManager::injectedScriptForObjectId):
+ * inspector/InspectorBackendDispatcher.cpp:
+ (Inspector::InspectorBackendDispatcher::dispatch):
+ (Inspector::InspectorBackendDispatcher::sendResponse):
+ (Inspector::InspectorBackendDispatcher::reportProtocolError):
+ (Inspector::AsMethodBridges::asInteger):
+ (Inspector::AsMethodBridges::asDouble):
+ (Inspector::InspectorBackendDispatcher::getInteger):
+ (Inspector::InspectorBackendDispatcher::getDouble):
+ (Inspector::AsMethodBridges::asInt): Deleted.
+ (Inspector::InspectorBackendDispatcher::getInt): Deleted.
+ * inspector/InspectorBackendDispatcher.h:
+ * inspector/InspectorProtocolTypes.h: Remove the special case for checking int type tags.
+ (Inspector::Protocol::ArrayItemHelper<int>::Traits::pushRaw):
+ (Inspector::Protocol::ArrayItemHelper<double>::Traits::pushRaw):
+ (Inspector::Protocol::BindingTraits<int>::assertValueHasExpectedType): Deleted.
+ * inspector/InspectorValues.cpp: Allow integers and doubles to be convertible using asInteger/asDouble.
+ (Inspector::InspectorValue::asDouble):
+ (Inspector::InspectorValue::asInteger):
+ (Inspector::InspectorBasicValue::asDouble):
+ (Inspector::InspectorBasicValue::asInteger):
+ (Inspector::InspectorBasicValue::writeJSON):
+ (Inspector::InspectorValue::asNumber): Deleted.
+ (Inspector::InspectorBasicValue::asNumber): Deleted.
+ * inspector/InspectorValues.h:
+ (Inspector::InspectorObjectBase::setInteger):
+ (Inspector::InspectorObjectBase::setDouble):
+ (Inspector::InspectorArrayBase::pushInteger):
+ (Inspector::InspectorArrayBase::pushDouble):
+ (Inspector::InspectorObjectBase::setNumber): Deleted.
+ (Inspector::InspectorArrayBase::pushInt): Deleted.
+ (Inspector::InspectorArrayBase::pushNumber): Deleted.
+ * inspector/agents/InspectorDebuggerAgent.cpp:
+ (Inspector::buildObjectForBreakpointCookie):
+ (Inspector::InspectorDebuggerAgent::breakpointActionsFromProtocol):
+ (Inspector::parseLocation):
+ (Inspector::InspectorDebuggerAgent::didParseSource):
+ * inspector/agents/InspectorRuntimeAgent.cpp:
+ (Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
+ * inspector/scripts/codegen/generator.py: Update emitted code and rebaseline test results.
+ (Generator.keyed_get_method_for_type):
+ (Generator.keyed_set_method_for_type):
+ * inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
+ * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
+ * inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
+ * inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
+ * inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
+ * inspector/scripts/tests/expected/type-declaration-object-type.json-result:
+ * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
+ * replay/EncodedValue.cpp:
+ (JSC::EncodedValue::convertTo<double>):
+ (JSC::EncodedValue::convertTo<float>):
+ (JSC::EncodedValue::convertTo<int32_t>):
+ (JSC::EncodedValue::convertTo<int64_t>):
+ (JSC::EncodedValue::convertTo<uint32_t>):
+ (JSC::EncodedValue::convertTo<uint64_t>):
+
</ins><span class="cx"> 2014-09-11 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Occasional ASSERT closing web inspector
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebindingsScriptValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bindings/ScriptValue.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bindings/ScriptValue.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/bindings/ScriptValue.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -114,8 +114,10 @@
</span><span class="cx"> return InspectorValue::null();
</span><span class="cx"> if (value.isBoolean())
</span><span class="cx"> return InspectorBasicValue::create(value.asBoolean());
</span><del>- if (value.isNumber())
</del><ins>+ if (value.isNumber() && value.isDouble())
</ins><span class="cx"> return InspectorBasicValue::create(value.asNumber());
</span><ins>+ if (value.isNumber() && value.isMachineInt())
+ return InspectorBasicValue::create(static_cast<int>(value.asMachineInt()));
</ins><span class="cx"> if (value.isString())
</span><span class="cx"> return InspectorString::create(value.getString(scriptState));
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> RefPtr<InspectorValue> parsedObjectId = InspectorValue::parseJSON(objectId);
</span><span class="cx"> if (parsedObjectId && parsedObjectId->type() == InspectorValue::Type::Object) {
</span><span class="cx"> long injectedScriptId = 0;
</span><del>- bool success = parsedObjectId->asObject()->getNumber(ASCIILiteral("injectedScriptId"), &injectedScriptId);
</del><ins>+ bool success = parsedObjectId->asObject()->getInteger(ASCIILiteral("injectedScriptId"), &injectedScriptId);
</ins><span class="cx"> if (success)
</span><span class="cx"> return m_idToInjectedScript.get(injectedScriptId);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInspectorBackendDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -97,8 +97,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> long callId = 0;
</span><del>- if (!callIdValue->asNumber(&callId)) {
- reportProtocolError(nullptr, InvalidRequest, ASCIILiteral("The type of 'id' property must be number"));
</del><ins>+ if (!callIdValue->asInteger(&callId)) {
+ reportProtocolError(nullptr, InvalidRequest, ASCIILiteral("The type of 'id' property must be integer"));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> responseMessage = InspectorObject::create();
</span><span class="cx"> responseMessage->setObject(ASCIILiteral("result"), result);
</span><del>- responseMessage->setNumber(ASCIILiteral("id"), callId);
</del><ins>+ responseMessage->setInteger(ASCIILiteral("id"), callId);
</ins><span class="cx"> m_inspectorFrontendChannel->sendMessageToFrontend(responseMessage->toJSONString());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> error = InspectorObject::create();
</span><del>- error->setNumber(ASCIILiteral("code"), errorCodes[errorCode]);
</del><ins>+ error->setInteger(ASCIILiteral("code"), errorCodes[errorCode]);
</ins><span class="cx"> error->setString(ASCIILiteral("message"), errorMessage);
</span><span class="cx"> if (data)
</span><span class="cx"> error->setArray(ASCIILiteral("data"), data);
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx"> RefPtr<InspectorObject> message = InspectorObject::create();
</span><span class="cx"> message->setObject(ASCIILiteral("error"), error.release());
</span><span class="cx"> if (callId)
</span><del>- message->setNumber(ASCIILiteral("id"), *callId);
</del><ins>+ message->setInteger(ASCIILiteral("id"), *callId);
</ins><span class="cx"> else
</span><span class="cx"> message->setValue(ASCIILiteral("id"), InspectorValue::null());
</span><span class="cx">
</span><span class="lines">@@ -221,17 +221,17 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> struct AsMethodBridges {
</span><del>- static bool asInt(InspectorValue* value, int* output) { return value->asNumber(output); }
- static bool asDouble(InspectorValue* value, double* output) { return value->asNumber(output); }
</del><ins>+ static bool asInteger(InspectorValue* value, int* output) { return value->asInteger(output); }
+ static bool asDouble(InspectorValue* value, double* output) { return value->asDouble(output); }
</ins><span class="cx"> static bool asString(InspectorValue* value, String* output) { return value->asString(output); }
</span><span class="cx"> static bool asBoolean(InspectorValue* value, bool* output) { return value->asBoolean(output); }
</span><span class="cx"> static bool asObject(InspectorValue* value, RefPtr<InspectorObject>* output) { return value->asObject(output); }
</span><span class="cx"> static bool asArray(InspectorValue* value, RefPtr<InspectorArray>* output) { return value->asArray(output); }
</span><span class="cx"> };
</span><span class="cx">
</span><del>-int InspectorBackendDispatcher::getInt(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
</del><ins>+int InspectorBackendDispatcher::getInteger(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
</ins><span class="cx"> {
</span><del>- return getPropertyValue<int, int, int>(object, name, valueFound, protocolErrors, 0, AsMethodBridges::asInt, "Number");
</del><ins>+ return getPropertyValue<int, int, int>(object, name, valueFound, protocolErrors, 0, AsMethodBridges::asInteger, "Integer");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double InspectorBackendDispatcher::getDouble(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInspectorBackendDispatcherh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> void reportProtocolError(const long* const callId, CommonErrorCode, const String& errorMessage) const;
</span><span class="cx"> void reportProtocolError(const long* const callId, CommonErrorCode, const String& errorMessage, PassRefPtr<InspectorArray> data) const;
</span><span class="cx">
</span><del>- static int getInt(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
</del><ins>+ static int getInteger(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
</ins><span class="cx"> static double getDouble(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
</span><span class="cx"> static String getString(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
</span><span class="cx"> static bool getBoolean(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInspectorProtocolTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InspectorProtocolTypes.h (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InspectorProtocolTypes.h        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/InspectorProtocolTypes.h        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx"> struct Traits {
</span><span class="cx"> static void pushRaw(InspectorArray* array, int value)
</span><span class="cx"> {
</span><del>- array->pushInt(value);
</del><ins>+ array->pushInteger(value);
</ins><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx"> };
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> struct Traits {
</span><span class="cx"> static void pushRaw(InspectorArray* array, double value)
</span><span class="cx"> {
</span><del>- array->pushNumber(value);
</del><ins>+ array->pushDouble(value);
</ins><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx"> };
</span><span class="lines">@@ -248,22 +248,9 @@
</span><span class="cx"> template<> struct BindingTraits<InspectorObject> : public PrimitiveBindingTraits<InspectorValue::Type::Object> { };
</span><span class="cx"> template<> struct BindingTraits<String> : public PrimitiveBindingTraits<InspectorValue::Type::String> { };
</span><span class="cx"> template<> struct BindingTraits<bool> : public PrimitiveBindingTraits<InspectorValue::Type::Boolean> { };
</span><del>-template<> struct BindingTraits<double> : public PrimitiveBindingTraits<InspectorValue::Type::Number> { };
</del><ins>+template<> struct BindingTraits<double> : public PrimitiveBindingTraits<InspectorValue::Type::Double> { };
+template<> struct BindingTraits<int> : public PrimitiveBindingTraits<InspectorValue::Type::Integer> { };
</ins><span class="cx">
</span><del>-// FIXME: Add an Inspector::Type tag for int so we can remove this special case.
-template<>
-struct BindingTraits<int> {
-#if !ASSERT_DISABLED
- static void assertValueHasExpectedType(InspectorValue* value)
- {
- double v;
- bool castRes = value->asNumber(&v);
- ASSERT_UNUSED(castRes, castRes);
- ASSERT(static_cast<double>(static_cast<int>(v)) == v);
- }
-#endif // !ASSERT_DISABLED
-};
-
</del><span class="cx"> } // namespace Protocol
</span><span class="cx">
</span><span class="cx"> using Protocol::BindingTraits;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInspectorValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InspectorValues.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InspectorValues.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/InspectorValues.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -485,42 +485,42 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorValue::asNumber(double*) const
</del><ins>+bool InspectorValue::asDouble(double*) const
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorValue::asNumber(float*) const
</del><ins>+bool InspectorValue::asDouble(float*) const
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorValue::asNumber(int*) const
</del><ins>+bool InspectorValue::asInteger(int*) const
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorValue::asNumber(unsigned*) const
</del><ins>+bool InspectorValue::asInteger(unsigned*) const
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorValue::asNumber(long*) const
</del><ins>+bool InspectorValue::asInteger(long*) const
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorValue::asNumber(long long*) const
</del><ins>+bool InspectorValue::asInteger(long long*) const
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorValue::asNumber(unsigned long*) const
</del><ins>+bool InspectorValue::asInteger(unsigned long*) const
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorValue::asNumber(unsigned long long*) const
</del><ins>+bool InspectorValue::asInteger(unsigned long long*) const
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="lines">@@ -591,65 +591,65 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorBasicValue::asNumber(double* output) const
</del><ins>+bool InspectorBasicValue::asDouble(double* output) const
</ins><span class="cx"> {
</span><del>- if (type() != Type::Number)
</del><ins>+ if (type() != Type::Double)
</ins><span class="cx"> return false;
</span><span class="cx"> *output = m_doubleValue;
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorBasicValue::asNumber(float* output) const
</del><ins>+bool InspectorBasicValue::asDouble(float* output) const
</ins><span class="cx"> {
</span><del>- if (type() != Type::Number)
</del><ins>+ if (type() != Type::Double)
</ins><span class="cx"> return false;
</span><span class="cx"> *output = static_cast<float>(m_doubleValue);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorBasicValue::asNumber(int* output) const
</del><ins>+bool InspectorBasicValue::asInteger(int* output) const
</ins><span class="cx"> {
</span><del>- if (type() != Type::Number)
</del><ins>+ if (type() != Type::Integer && type() != Type::Double)
</ins><span class="cx"> return false;
</span><span class="cx"> *output = static_cast<int>(m_doubleValue);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorBasicValue::asNumber(unsigned* output) const
</del><ins>+bool InspectorBasicValue::asInteger(unsigned* output) const
</ins><span class="cx"> {
</span><del>- if (type() != Type::Number)
</del><ins>+ if (type() != Type::Integer && type() != Type::Double)
</ins><span class="cx"> return false;
</span><span class="cx"> *output = static_cast<unsigned>(m_doubleValue);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorBasicValue::asNumber(long* output) const
</del><ins>+bool InspectorBasicValue::asInteger(long* output) const
</ins><span class="cx"> {
</span><del>- if (type() != Type::Number)
</del><ins>+ if (type() != Type::Integer && type() != Type::Double)
</ins><span class="cx"> return false;
</span><span class="cx"> *output = static_cast<long>(m_doubleValue);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorBasicValue::asNumber(long long* output) const
</del><ins>+bool InspectorBasicValue::asInteger(long long* output) const
</ins><span class="cx"> {
</span><del>- if (type() != Type::Number)
</del><ins>+ if (type() != Type::Integer && type() != Type::Double)
</ins><span class="cx"> return false;
</span><span class="cx"> *output = static_cast<long long>(m_doubleValue);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorBasicValue::asNumber(unsigned long* output) const
</del><ins>+bool InspectorBasicValue::asInteger(unsigned long* output) const
</ins><span class="cx"> {
</span><del>- if (type() != Type::Number)
</del><ins>+ if (type() != Type::Integer && type() != Type::Double)
</ins><span class="cx"> return false;
</span><span class="cx"> *output = static_cast<unsigned long>(m_doubleValue);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool InspectorBasicValue::asNumber(unsigned long long* output) const
</del><ins>+bool InspectorBasicValue::asInteger(unsigned long long* output) const
</ins><span class="cx"> {
</span><del>- if (type() != Type::Number)
</del><ins>+ if (type() != Type::Integer && type() != Type::Double)
</ins><span class="cx"> return false;
</span><span class="cx"> *output = static_cast<unsigned long long>(m_doubleValue);
</span><span class="cx"> return true;
</span><span class="lines">@@ -657,13 +657,13 @@
</span><span class="cx">
</span><span class="cx"> void InspectorBasicValue::writeJSON(StringBuilder* output) const
</span><span class="cx"> {
</span><del>- ASSERT(type() == Type::Boolean || type() == Type::Number);
</del><ins>+ ASSERT(type() == Type::Boolean || type() == Type::Double || type() == Type::Integer);
</ins><span class="cx"> if (type() == Type::Boolean) {
</span><span class="cx"> if (m_boolValue)
</span><span class="cx"> output->append(trueString, 4);
</span><span class="cx"> else
</span><span class="cx"> output->append(falseString, 5);
</span><del>- } else if (type() == Type::Number) {
</del><ins>+ } else if (type() == Type::Double || type() == Type::Integer) {
</ins><span class="cx"> NumberToLStringBuffer buffer;
</span><span class="cx"> if (!std::isfinite(m_doubleValue)) {
</span><span class="cx"> output->append(nullString, 4);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInspectorValuesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InspectorValues.h (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InspectorValues.h        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/InspectorValues.h        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -58,7 +58,8 @@
</span><span class="cx"> enum class Type {
</span><span class="cx"> Null = 0,
</span><span class="cx"> Boolean,
</span><del>- Number,
</del><ins>+ Double,
+ Integer,
</ins><span class="cx"> String,
</span><span class="cx"> Object,
</span><span class="cx"> Array
</span><span class="lines">@@ -69,14 +70,14 @@
</span><span class="cx"> bool isNull() const { return m_type == Type::Null; }
</span><span class="cx">
</span><span class="cx"> virtual bool asBoolean(bool* output) const;
</span><del>- virtual bool asNumber(double* output) const;
- virtual bool asNumber(float* output) const;
- virtual bool asNumber(int* output) const;
- virtual bool asNumber(unsigned* output) const;
- virtual bool asNumber(long* output) const;
- virtual bool asNumber(long long* output) const;
- virtual bool asNumber(unsigned long* output) const;
- virtual bool asNumber(unsigned long long* output) const;
</del><ins>+ virtual bool asInteger(int* output) const;
+ virtual bool asInteger(unsigned* output) const;
+ virtual bool asInteger(long* output) const;
+ virtual bool asInteger(long long* output) const;
+ virtual bool asInteger(unsigned long* output) const;
+ virtual bool asInteger(unsigned long long* output) const;
+ virtual bool asDouble(double* output) const;
+ virtual bool asDouble(float* output) const;
</ins><span class="cx"> virtual bool asString(String* output) const;
</span><span class="cx"> virtual bool asValue(RefPtr<InspectorValue>* output);
</span><span class="cx"> virtual bool asObject(RefPtr<InspectorObject>* output);
</span><span class="lines">@@ -104,14 +105,16 @@
</span><span class="cx"> static PassRefPtr<InspectorBasicValue> create(double);
</span><span class="cx">
</span><span class="cx"> virtual bool asBoolean(bool* output) const override;
</span><del>- virtual bool asNumber(double* output) const override;
- virtual bool asNumber(float* output) const override;
- virtual bool asNumber(int* output) const override;
- virtual bool asNumber(unsigned* output) const override;
- virtual bool asNumber(long* output) const override;
- virtual bool asNumber(long long* output) const override;
- virtual bool asNumber(unsigned long* output) const override;
- virtual bool asNumber(unsigned long long* output) const override;
</del><ins>+ // Numbers from the frontend are always parsed as doubles, so we allow
+ // clients to convert to integral values with this function.
+ virtual bool asInteger(int* output) const override;
+ virtual bool asInteger(unsigned* output) const override;
+ virtual bool asInteger(long* output) const override;
+ virtual bool asInteger(long long* output) const override;
+ virtual bool asInteger(unsigned long* output) const override;
+ virtual bool asInteger(unsigned long long* output) const override;
+ virtual bool asDouble(double* output) const override;
+ virtual bool asDouble(float* output) const override;
</ins><span class="cx">
</span><span class="cx"> virtual void writeJSON(StringBuilder* output) const override;
</span><span class="cx">
</span><span class="lines">@@ -121,11 +124,11 @@
</span><span class="cx"> , m_boolValue(value) { }
</span><span class="cx">
</span><span class="cx"> explicit InspectorBasicValue(int value)
</span><del>- : InspectorValue(Type::Number)
</del><ins>+ : InspectorValue(Type::Integer)
</ins><span class="cx"> , m_doubleValue(static_cast<double>(value)) { }
</span><span class="cx">
</span><span class="cx"> explicit InspectorBasicValue(double value)
</span><del>- : InspectorValue(Type::Number)
</del><ins>+ : InspectorValue(Type::Double)
</ins><span class="cx"> , m_doubleValue(value) { }
</span><span class="cx">
</span><span class="cx"> union {
</span><span class="lines">@@ -171,8 +174,10 @@
</span><span class="cx">
</span><span class="cx"> virtual bool asObject(RefPtr<InspectorObject>* output) override;
</span><span class="cx">
</span><ins>+ // FIXME: use templates to reduce the amount of duplicated set*() methods.
</ins><span class="cx"> void setBoolean(const String& name, bool);
</span><del>- void setNumber(const String& name, double);
</del><ins>+ void setInteger(const String& name, int);
+ void setDouble(const String& name, double);
</ins><span class="cx"> void setString(const String& name, const String&);
</span><span class="cx"> void setValue(const String& name, PassRefPtr<InspectorValue>);
</span><span class="cx"> void setObject(const String& name, PassRefPtr<InspectorObjectBase>);
</span><span class="lines">@@ -180,14 +185,24 @@
</span><span class="cx">
</span><span class="cx"> iterator find(const String& name);
</span><span class="cx"> const_iterator find(const String& name) const;
</span><ins>+
+ // FIXME: use templates to reduce the amount of duplicated get*() methods.
</ins><span class="cx"> bool getBoolean(const String& name, bool* output) const;
</span><del>- template<class T> bool getNumber(const String& name, T* output) const
</del><ins>+ template<class T> bool getDouble(const String& name, T* output) const
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorValue> value = get(name);
</span><span class="cx"> if (!value)
</span><span class="cx"> return false;
</span><del>- return value->asNumber(output);
</del><ins>+ return value->asDouble(output);
</ins><span class="cx"> }
</span><ins>+ template<class T> bool getInteger(const String& name, T* output) const
+ {
+ RefPtr<InspectorValue> value = get(name);
+ if (!value)
+ return false;
+ return value->asInteger(output);
+ }
+
</ins><span class="cx"> bool getString(const String& name, String* output) const;
</span><span class="cx"> PassRefPtr<InspectorObject> getObject(const String& name) const;
</span><span class="cx"> PassRefPtr<InspectorArray> getArray(const String& name) const;
</span><span class="lines">@@ -219,7 +234,8 @@
</span><span class="cx"> using InspectorObjectBase::asObject;
</span><span class="cx">
</span><span class="cx"> using InspectorObjectBase::setBoolean;
</span><del>- using InspectorObjectBase::setNumber;
</del><ins>+ using InspectorObjectBase::setInteger;
+ using InspectorObjectBase::setDouble;
</ins><span class="cx"> using InspectorObjectBase::setString;
</span><span class="cx"> using InspectorObjectBase::setValue;
</span><span class="cx"> using InspectorObjectBase::setObject;
</span><span class="lines">@@ -227,7 +243,8 @@
</span><span class="cx">
</span><span class="cx"> using InspectorObjectBase::find;
</span><span class="cx"> using InspectorObjectBase::getBoolean;
</span><del>- using InspectorObjectBase::getNumber;
</del><ins>+ using InspectorObjectBase::getInteger;
+ using InspectorObjectBase::getDouble;
</ins><span class="cx"> using InspectorObjectBase::getString;
</span><span class="cx"> using InspectorObjectBase::getObject;
</span><span class="cx"> using InspectorObjectBase::getArray;
</span><span class="lines">@@ -257,8 +274,8 @@
</span><span class="cx"> virtual bool asArray(RefPtr<InspectorArray>* output) override;
</span><span class="cx">
</span><span class="cx"> void pushBoolean(bool);
</span><del>- void pushInt(int);
- void pushNumber(double);
</del><ins>+ void pushInteger(int);
+ void pushDouble(double);
</ins><span class="cx"> void pushString(const String&);
</span><span class="cx"> void pushValue(PassRefPtr<InspectorValue>);
</span><span class="cx"> void pushObject(PassRefPtr<InspectorObject>);
</span><span class="lines">@@ -287,8 +304,8 @@
</span><span class="cx"> using InspectorArrayBase::asArray;
</span><span class="cx">
</span><span class="cx"> using InspectorArrayBase::pushBoolean;
</span><del>- using InspectorArrayBase::pushInt;
- using InspectorArrayBase::pushNumber;
</del><ins>+ using InspectorArrayBase::pushInteger;
+ using InspectorArrayBase::pushDouble;
</ins><span class="cx"> using InspectorArrayBase::pushString;
</span><span class="cx"> using InspectorArrayBase::pushValue;
</span><span class="cx"> using InspectorArrayBase::pushObject;
</span><span class="lines">@@ -316,11 +333,16 @@
</span><span class="cx"> setValue(name, InspectorBasicValue::create(value));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline void InspectorObjectBase::setNumber(const String& name, double value)
</del><ins>+inline void InspectorObjectBase::setInteger(const String& name, int value)
</ins><span class="cx"> {
</span><span class="cx"> setValue(name, InspectorBasicValue::create(value));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline void InspectorObjectBase::setDouble(const String& name, double value)
+{
+ setValue(name, InspectorBasicValue::create(value));
+}
+
</ins><span class="cx"> inline void InspectorObjectBase::setString(const String& name, const String& value)
</span><span class="cx"> {
</span><span class="cx"> setValue(name, InspectorString::create(value));
</span><span class="lines">@@ -352,12 +374,12 @@
</span><span class="cx"> m_data.append(InspectorBasicValue::create(value));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline void InspectorArrayBase::pushInt(int value)
</del><ins>+inline void InspectorArrayBase::pushInteger(int value)
</ins><span class="cx"> {
</span><span class="cx"> m_data.append(InspectorBasicValue::create(value));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline void InspectorArrayBase::pushNumber(double value)
</del><ins>+inline void InspectorArrayBase::pushDouble(double value)
</ins><span class="cx"> {
</span><span class="cx"> m_data.append(InspectorBasicValue::create(value));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -152,8 +152,8 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> breakpointObject = InspectorObject::create();
</span><span class="cx"> breakpointObject->setString(ASCIILiteral("url"), url);
</span><del>- breakpointObject->setNumber(ASCIILiteral("lineNumber"), lineNumber);
- breakpointObject->setNumber(ASCIILiteral("columnNumber"), columnNumber);
</del><ins>+ breakpointObject->setInteger(ASCIILiteral("lineNumber"), lineNumber);
+ breakpointObject->setInteger(ASCIILiteral("columnNumber"), columnNumber);
</ins><span class="cx"> breakpointObject->setString(ASCIILiteral("condition"), condition);
</span><span class="cx"> breakpointObject->setBoolean(ASCIILiteral("isRegex"), isRegex);
</span><span class="cx"> breakpointObject->setBoolean(ASCIILiteral("autoContinue"), autoContinue);
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx"> // Specifying an identifier is optional. They are used to correlate probe samples
</span><span class="cx"> // in the frontend across multiple backend probe actions and segregate object groups.
</span><span class="cx"> int identifier = 0;
</span><del>- object->getNumber(ASCIILiteral("id"), &identifier);
</del><ins>+ object->getInteger(ASCIILiteral("id"), &identifier);
</ins><span class="cx">
</span><span class="cx"> String data;
</span><span class="cx"> object->getString(ASCIILiteral("data"), &data);
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx"> static bool parseLocation(ErrorString* errorString, InspectorObject* location, JSC::SourceID* sourceID, unsigned* lineNumber, unsigned* columnNumber)
</span><span class="cx"> {
</span><span class="cx"> String scriptIDStr;
</span><del>- if (!location->getString(ASCIILiteral("scriptId"), &scriptIDStr) || !location->getNumber(ASCIILiteral("lineNumber"), lineNumber)) {
</del><ins>+ if (!location->getString(ASCIILiteral("scriptId"), &scriptIDStr) || !location->getInteger(ASCIILiteral("lineNumber"), lineNumber)) {
</ins><span class="cx"> *sourceID = JSC::noSourceID;
</span><span class="cx"> *errorString = ASCIILiteral("scriptId and lineNumber are required.");
</span><span class="cx"> return false;
</span><span class="lines">@@ -296,7 +296,7 @@
</span><span class="cx">
</span><span class="cx"> *sourceID = scriptIDStr.toIntPtr();
</span><span class="cx"> *columnNumber = 0;
</span><del>- location->getNumber(ASCIILiteral("columnNumber"), columnNumber);
</del><ins>+ location->getInteger(ASCIILiteral("columnNumber"), columnNumber);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -601,8 +601,8 @@
</span><span class="cx"> if (!matches(scriptURL, url, isRegex))
</span><span class="cx"> continue;
</span><span class="cx"> ScriptBreakpoint breakpoint;
</span><del>- breakpointObject->getNumber(ASCIILiteral("lineNumber"), &breakpoint.lineNumber);
- breakpointObject->getNumber(ASCIILiteral("columnNumber"), &breakpoint.columnNumber);
</del><ins>+ breakpointObject->getInteger(ASCIILiteral("lineNumber"), &breakpoint.lineNumber);
+ breakpointObject->getInteger(ASCIILiteral("columnNumber"), &breakpoint.columnNumber);
</ins><span class="cx"> breakpointObject->getString(ASCIILiteral("condition"), &breakpoint.condition);
</span><span class="cx"> breakpointObject->getBoolean(ASCIILiteral("autoContinue"), &breakpoint.autoContinue);
</span><span class="cx"> ErrorString errorString;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorRuntimeAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -221,9 +221,9 @@
</span><span class="cx"> int descriptor;
</span><span class="cx"> String sourceIDAsString;
</span><span class="cx"> int divot;
</span><del>- location->getNumber(ASCIILiteral("typeInformationDescriptor"), &descriptor);
</del><ins>+ location->getInteger(ASCIILiteral("typeInformationDescriptor"), &descriptor);
</ins><span class="cx"> location->getString(ASCIILiteral("sourceID"), &sourceIDAsString);
</span><del>- location->getNumber(ASCIILiteral("divot"), &divot);
</del><ins>+ location->getInteger(ASCIILiteral("divot"), &divot);
</ins><span class="cx">
</span><span class="cx"> bool okay;
</span><span class="cx"> TypeLocation* typeLocation = vm.typeProfiler()->findLocation(divot, sourceIDAsString.toIntPtrStrict(&okay), static_cast<TypeProfilerSearchDescriptor>(descriptor));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptscodegengeneratorpy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/codegen/generator.py (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/codegen/generator.py        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/scripts/codegen/generator.py        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -232,7 +232,9 @@
</span><span class="cx"> return 'getArray'
</span><span class="cx"> if isinstance(_type, PrimitiveType):
</span><span class="cx"> if _type.raw_name() is 'integer':
</span><del>- return 'getInt'
</del><ins>+ return 'getInteger'
+ elif _type.raw_name() is 'number':
+ return 'getDouble'
</ins><span class="cx"> else:
</span><span class="cx"> return 'get' + ucfirst(_type.raw_name())
</span><span class="cx"> if isinstance(_type, AliasedType):
</span><span class="lines">@@ -247,9 +249,11 @@
</span><span class="cx"> if isinstance(_type, ArrayType):
</span><span class="cx"> return 'setArray'
</span><span class="cx"> if isinstance(_type, PrimitiveType):
</span><del>- if _type.raw_name() in ['integer', 'number']:
- return 'setNumber'
- elif _type.raw_name() in ['any']:
</del><ins>+ if _type.raw_name() is 'integer':
+ return 'setInteger'
+ elif _type.raw_name() is 'number':
+ return 'setDouble'
+ elif _type.raw_name() is 'any':
</ins><span class="cx"> return 'setValue'
</span><span class="cx"> else:
</span><span class="cx"> return 'set' + ucfirst(_type.raw_name())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsexpectedcommandswithasyncattributejsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-async-attribute.json-result (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-async-attribute.json-result        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-async-attribute.json-result        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx"> RefPtr<InspectorObject> paramsContainer = message.getObject(ASCIILiteral("params"));
</span><span class="cx"> InspectorObject* paramsContainerPtr = paramsContainer.get();
</span><span class="cx"> InspectorArray* protocolErrorsPtr = protocolErrors.get();
</span><del>- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
</del><ins>+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
</ins><span class="cx"> String in_query = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("query"), nullptr, protocolErrorsPtr);
</span><span class="cx"> if (protocolErrors->length()) {
</span><span class="cx"> String errorMessage = String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLSyncOptionalReturnValues");
</span><span class="lines">@@ -242,13 +242,13 @@
</span><span class="cx"> if (out_notes.isAssigned())
</span><span class="cx"> result->setString(ASCIILiteral("notes"), out_notes.getValue());
</span><span class="cx"> if (out_timestamp.isAssigned())
</span><del>- result->setNumber(ASCIILiteral("timestamp"), out_timestamp.getValue());
</del><ins>+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp.getValue());
</ins><span class="cx"> if (out_values.isAssigned())
</span><span class="cx"> result->setObject(ASCIILiteral("values"), out_values.getValue());
</span><span class="cx"> if (out_payload.isAssigned())
</span><span class="cx"> result->setValue(ASCIILiteral("payload"), out_payload.getValue());
</span><span class="cx"> if (out_databaseId.isAssigned())
</span><del>- result->setNumber(ASCIILiteral("databaseId"), out_databaseId.getValue());
</del><ins>+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId.getValue());
</ins><span class="cx"> if (out_sqlError)
</span><span class="cx"> result->setObject(ASCIILiteral("sqlError"), out_sqlError);
</span><span class="cx"> if (out_screenColor.isAssigned())
</span><span class="lines">@@ -269,13 +269,13 @@
</span><span class="cx"> if (notes.isAssigned())
</span><span class="cx"> jsonMessage->setString(ASCIILiteral("notes"), notes.getValue());
</span><span class="cx"> if (timestamp.isAssigned())
</span><del>- jsonMessage->setNumber(ASCIILiteral("timestamp"), timestamp.getValue());
</del><ins>+ jsonMessage->setDouble(ASCIILiteral("timestamp"), timestamp.getValue());
</ins><span class="cx"> if (values.isAssigned())
</span><span class="cx"> jsonMessage->setObject(ASCIILiteral("values"), values.getValue());
</span><span class="cx"> if (payload.isAssigned())
</span><span class="cx"> jsonMessage->setValue(ASCIILiteral("payload"), payload.getValue());
</span><span class="cx"> if (databaseId.isAssigned())
</span><del>- jsonMessage->setNumber(ASCIILiteral("databaseId"), databaseId.getValue());
</del><ins>+ jsonMessage->setInteger(ASCIILiteral("databaseId"), databaseId.getValue());
</ins><span class="cx"> if (sqlError)
</span><span class="cx"> jsonMessage->setObject(ASCIILiteral("sqlError"), sqlError);
</span><span class="cx"> if (screenColor.isAssigned())
</span><span class="lines">@@ -291,7 +291,7 @@
</span><span class="cx"> RefPtr<InspectorObject> paramsContainer = message.getObject(ASCIILiteral("params"));
</span><span class="cx"> InspectorObject* paramsContainerPtr = paramsContainer.get();
</span><span class="cx"> InspectorArray* protocolErrorsPtr = protocolErrors.get();
</span><del>- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
</del><ins>+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
</ins><span class="cx"> String in_query = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("query"), nullptr, protocolErrorsPtr);
</span><span class="cx"> if (protocolErrors->length()) {
</span><span class="cx"> String errorMessage = String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLAsyncOptionalReturnValues");
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx"> RefPtr<InspectorObject> paramsContainer = message.getObject(ASCIILiteral("params"));
</span><span class="cx"> InspectorObject* paramsContainerPtr = paramsContainer.get();
</span><span class="cx"> InspectorArray* protocolErrorsPtr = protocolErrors.get();
</span><del>- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
</del><ins>+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
</ins><span class="cx"> String in_query = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("query"), nullptr, protocolErrorsPtr);
</span><span class="cx"> if (protocolErrors->length()) {
</span><span class="cx"> String errorMessage = String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLSync");
</span><span class="lines">@@ -341,10 +341,10 @@
</span><span class="cx"> if (!error.length()) {
</span><span class="cx"> result->setArray(ASCIILiteral("columnNames"), out_columnNames);
</span><span class="cx"> result->setString(ASCIILiteral("notes"), out_notes);
</span><del>- result->setNumber(ASCIILiteral("timestamp"), out_timestamp);
</del><ins>+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp);
</ins><span class="cx"> result->setObject(ASCIILiteral("values"), out_values);
</span><span class="cx"> result->setValue(ASCIILiteral("payload"), out_payload);
</span><del>- result->setNumber(ASCIILiteral("databaseId"), out_databaseId);
</del><ins>+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId);
</ins><span class="cx"> result->setObject(ASCIILiteral("sqlError"), out_sqlError);
</span><span class="cx"> result->setString(ASCIILiteral("screenColor"), Inspector::Protocol::getTestEnumConstantValue(out_screenColor));
</span><span class="cx"> result->setString(ASCIILiteral("printColor"), Inspector::Protocol::getTestEnumConstantValue(out_printColor));
</span><span class="lines">@@ -359,10 +359,10 @@
</span><span class="cx"> RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
</span><span class="cx"> jsonMessage->setArray(ASCIILiteral("columnNames"), columnNames);
</span><span class="cx"> jsonMessage->setString(ASCIILiteral("notes"), notes);
</span><del>- jsonMessage->setNumber(ASCIILiteral("timestamp"), timestamp);
</del><ins>+ jsonMessage->setDouble(ASCIILiteral("timestamp"), timestamp);
</ins><span class="cx"> jsonMessage->setObject(ASCIILiteral("values"), values);
</span><span class="cx"> jsonMessage->setValue(ASCIILiteral("payload"), payload);
</span><del>- jsonMessage->setNumber(ASCIILiteral("databaseId"), databaseId);
</del><ins>+ jsonMessage->setInteger(ASCIILiteral("databaseId"), databaseId);
</ins><span class="cx"> jsonMessage->setObject(ASCIILiteral("sqlError"), sqlError);
</span><span class="cx"> jsonMessage->setString(ASCIILiteral("screenColor"), Inspector::Protocol::getTestEnumConstantValue(screenColor));
</span><span class="cx"> jsonMessage->setString(ASCIILiteral("printColor"), Inspector::Protocol::getTestEnumConstantValue(printColor));
</span><span class="lines">@@ -375,7 +375,7 @@
</span><span class="cx"> RefPtr<InspectorObject> paramsContainer = message.getObject(ASCIILiteral("params"));
</span><span class="cx"> InspectorObject* paramsContainerPtr = paramsContainer.get();
</span><span class="cx"> InspectorArray* protocolErrorsPtr = protocolErrors.get();
</span><del>- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
</del><ins>+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
</ins><span class="cx"> String in_query = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("query"), nullptr, protocolErrorsPtr);
</span><span class="cx"> if (protocolErrors->length()) {
</span><span class="cx"> String errorMessage = String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLAsync");
</span><span class="lines">@@ -614,7 +614,7 @@
</span><span class="cx"> Builder<STATE | CodeSet>& setCode(int value)
</span><span class="cx"> {
</span><span class="cx"> COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
</span><del>- m_result->setNumber(ASCIILiteral("code"), value);
</del><ins>+ m_result->setInteger(ASCIILiteral("code"), value);
</ins><span class="cx"> return castState<CodeSet>();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsexpectedcommandswithoptionalcallreturnparametersjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -199,13 +199,13 @@
</span><span class="cx"> bool notes_valueFound = false;
</span><span class="cx"> String in_notes = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("notes"), &notes_valueFound, protocolErrorsPtr);
</span><span class="cx"> bool timestamp_valueFound = false;
</span><del>- Inspector::Protocol::OptOutput<double> in_timestamp = InspectorBackendDispatcher::getNumber(paramsContainerPtr, ASCIILiteral("timestamp"), &timestamp_valueFound, protocolErrorsPtr);
</del><ins>+ Inspector::Protocol::OptOutput<double> in_timestamp = InspectorBackendDispatcher::getDouble(paramsContainerPtr, ASCIILiteral("timestamp"), &timestamp_valueFound, protocolErrorsPtr);
</ins><span class="cx"> bool values_valueFound = false;
</span><span class="cx"> RefPtr<Inspector::InspectorObject> in_values = InspectorBackendDispatcher::getObject(paramsContainerPtr, ASCIILiteral("values"), &values_valueFound, protocolErrorsPtr);
</span><span class="cx"> bool payload_valueFound = false;
</span><span class="cx"> RefPtr<Inspector::InspectorValue> in_payload = InspectorBackendDispatcher::getAny(paramsContainerPtr, ASCIILiteral("payload"), &payload_valueFound, protocolErrorsPtr);
</span><span class="cx"> bool databaseId_valueFound = false;
</span><del>- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), &databaseId_valueFound, protocolErrorsPtr);
</del><ins>+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), &databaseId_valueFound, protocolErrorsPtr);
</ins><span class="cx"> bool sqlError_valueFound = false;
</span><span class="cx"> RefPtr<Inspector::InspectorObject> in_sqlError = InspectorBackendDispatcher::getObject(paramsContainerPtr, ASCIILiteral("sqlError"), &sqlError_valueFound, protocolErrorsPtr);
</span><span class="cx"> bool screenColor_valueFound = false;
</span><span class="lines">@@ -237,13 +237,13 @@
</span><span class="cx"> if (out_notes.isAssigned())
</span><span class="cx"> result->setString(ASCIILiteral("notes"), out_notes.getValue());
</span><span class="cx"> if (out_timestamp.isAssigned())
</span><del>- result->setNumber(ASCIILiteral("timestamp"), out_timestamp.getValue());
</del><ins>+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp.getValue());
</ins><span class="cx"> if (out_values.isAssigned())
</span><span class="cx"> result->setObject(ASCIILiteral("values"), out_values.getValue());
</span><span class="cx"> if (out_payload.isAssigned())
</span><span class="cx"> result->setValue(ASCIILiteral("payload"), out_payload.getValue());
</span><span class="cx"> if (out_databaseId.isAssigned())
</span><del>- result->setNumber(ASCIILiteral("databaseId"), out_databaseId.getValue());
</del><ins>+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId.getValue());
</ins><span class="cx"> if (out_sqlError)
</span><span class="cx"> result->setObject(ASCIILiteral("sqlError"), out_sqlError);
</span><span class="cx"> if (out_screenColor.isAssigned())
</span><span class="lines">@@ -262,10 +262,10 @@
</span><span class="cx"> InspectorArray* protocolErrorsPtr = protocolErrors.get();
</span><span class="cx"> RefPtr<Inspector::InspectorArray> in_columnNames = InspectorBackendDispatcher::getArray(paramsContainerPtr, ASCIILiteral("columnNames"), nullptr, protocolErrorsPtr);
</span><span class="cx"> String in_notes = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("notes"), nullptr, protocolErrorsPtr);
</span><del>- double in_timestamp = InspectorBackendDispatcher::getNumber(paramsContainerPtr, ASCIILiteral("timestamp"), nullptr, protocolErrorsPtr);
</del><ins>+ double in_timestamp = InspectorBackendDispatcher::getDouble(paramsContainerPtr, ASCIILiteral("timestamp"), nullptr, protocolErrorsPtr);
</ins><span class="cx"> RefPtr<Inspector::InspectorObject> in_values = InspectorBackendDispatcher::getObject(paramsContainerPtr, ASCIILiteral("values"), nullptr, protocolErrorsPtr);
</span><span class="cx"> RefPtr<Inspector::InspectorValue> in_payload = InspectorBackendDispatcher::getAny(paramsContainerPtr, ASCIILiteral("payload"), nullptr, protocolErrorsPtr);
</span><del>- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
</del><ins>+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
</ins><span class="cx"> RefPtr<Inspector::InspectorObject> in_sqlError = InspectorBackendDispatcher::getObject(paramsContainerPtr, ASCIILiteral("sqlError"), nullptr, protocolErrorsPtr);
</span><span class="cx"> String in_screenColor = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("screenColor"), nullptr, protocolErrorsPtr);
</span><span class="cx"> String in_printColor = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("printColor"), nullptr, protocolErrorsPtr);
</span><span class="lines">@@ -291,10 +291,10 @@
</span><span class="cx"> if (!error.length()) {
</span><span class="cx"> result->setArray(ASCIILiteral("columnNames"), out_columnNames);
</span><span class="cx"> result->setString(ASCIILiteral("notes"), out_notes);
</span><del>- result->setNumber(ASCIILiteral("timestamp"), out_timestamp);
</del><ins>+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp);
</ins><span class="cx"> result->setObject(ASCIILiteral("values"), out_values);
</span><span class="cx"> result->setValue(ASCIILiteral("payload"), out_payload);
</span><del>- result->setNumber(ASCIILiteral("databaseId"), out_databaseId);
</del><ins>+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId);
</ins><span class="cx"> result->setObject(ASCIILiteral("sqlError"), out_sqlError);
</span><span class="cx"> result->setString(ASCIILiteral("screenColor"), Inspector::Protocol::getTestEnumConstantValue(out_screenColor));
</span><span class="cx"> result->setString(ASCIILiteral("printColor"), Inspector::Protocol::getTestEnumConstantValue(out_printColor));
</span><span class="lines">@@ -521,7 +521,7 @@
</span><span class="cx"> Builder<STATE | CodeSet>& setCode(int value)
</span><span class="cx"> {
</span><span class="cx"> COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
</span><del>- m_result->setNumber(ASCIILiteral("code"), value);
</del><ins>+ m_result->setInteger(ASCIILiteral("code"), value);
</ins><span class="cx"> return castState<CodeSet>();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsexpectedeventswithoptionalparametersjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/events-with-optional-parameters.json-result (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/events-with-optional-parameters.json-result        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/events-with-optional-parameters.json-result        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -249,7 +249,7 @@
</span><span class="cx"> if (notes)
</span><span class="cx"> paramsObject->setString(ASCIILiteral("notes"), *notes);
</span><span class="cx"> if (timestamp)
</span><del>- paramsObject->setNumber(ASCIILiteral("timestamp"), *timestamp);
</del><ins>+ paramsObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
</ins><span class="cx"> if (values)
</span><span class="cx"> paramsObject->setObject(ASCIILiteral("values"), values);
</span><span class="cx"> if (payload)
</span><span class="lines">@@ -272,7 +272,7 @@
</span><span class="cx"> RefPtr<InspectorObject> paramsObject = InspectorObject::create();
</span><span class="cx"> paramsObject->setArray(ASCIILiteral("columnNames"), columnNames);
</span><span class="cx"> paramsObject->setString(ASCIILiteral("notes"), notes);
</span><del>- paramsObject->setNumber(ASCIILiteral("timestamp"), timestamp);
</del><ins>+ paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp);
</ins><span class="cx"> paramsObject->setObject(ASCIILiteral("values"), values);
</span><span class="cx"> paramsObject->setValue(ASCIILiteral("payload"), payload);
</span><span class="cx"> paramsObject->setObject(ASCIILiteral("sqlError"), sqlError);
</span><span class="lines">@@ -398,7 +398,7 @@
</span><span class="cx"> Builder<STATE | CodeSet>& setCode(int value)
</span><span class="cx"> {
</span><span class="cx"> COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
</span><del>- m_result->setNumber(ASCIILiteral("code"), value);
</del><ins>+ m_result->setInteger(ASCIILiteral("code"), value);
</ins><span class="cx"> return castState<CodeSet>();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsexpectedgeneratedomainswithfeatureguardsjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -419,7 +419,7 @@
</span><span class="cx"> Builder<STATE | CodeSet>& setCode(int value)
</span><span class="cx"> {
</span><span class="cx"> COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
</span><del>- m_result->setNumber(ASCIILiteral("code"), value);
</del><ins>+ m_result->setInteger(ASCIILiteral("code"), value);
</ins><span class="cx"> return castState<CodeSet>();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsexpectedtypedeclarationobjecttypejsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-object-type.json-result (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-object-type.json-result        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-object-type.json-result        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -341,7 +341,7 @@
</span><span class="cx"> Builder<STATE | CodeSet>& setCode(int value)
</span><span class="cx"> {
</span><span class="cx"> COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
</span><del>- m_result->setNumber(ASCIILiteral("code"), value);
</del><ins>+ m_result->setInteger(ASCIILiteral("code"), value);
</ins><span class="cx"> return castState<CodeSet>();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -431,7 +431,7 @@
</span><span class="cx">
</span><span class="cx"> void setTimestamp(double value)
</span><span class="cx"> {
</span><del>- InspectorObjectBase::setNumber(ASCIILiteral("timestamp"), value);
</del><ins>+ InspectorObjectBase::setDouble(ASCIILiteral("timestamp"), value);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void setValues(PassRefPtr<Inspector::InspectorObject> value)
</span><span class="lines">@@ -498,7 +498,7 @@
</span><span class="cx"> Builder<STATE | TimestampSet>& setTimestamp(double value)
</span><span class="cx"> {
</span><span class="cx"> COMPILE_ASSERT(!(STATE & TimestampSet), property_timestamp_already_set);
</span><del>- m_result->setNumber(ASCIILiteral("timestamp"), value);
</del><ins>+ m_result->setDouble(ASCIILiteral("timestamp"), value);
</ins><span class="cx"> return castState<TimestampSet>();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -699,7 +699,7 @@
</span><span class="cx"> Builder<STATE | TimestampSet>& setTimestamp(double value)
</span><span class="cx"> {
</span><span class="cx"> COMPILE_ASSERT(!(STATE & TimestampSet), property_timestamp_already_set);
</span><del>- m_result->setNumber(ASCIILiteral("timestamp"), value);
</del><ins>+ m_result->setDouble(ASCIILiteral("timestamp"), value);
</ins><span class="cx"> return castState<TimestampSet>();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsexpectedtyperequiringruntimecastsjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -350,7 +350,7 @@
</span><span class="cx"> Builder<STATE | NumberSet>& setNumber(int value)
</span><span class="cx"> {
</span><span class="cx"> COMPILE_ASSERT(!(STATE & NumberSet), property_number_already_set);
</span><del>- m_result->setNumber(ASCIILiteral("number"), value);
</del><ins>+ m_result->setInteger(ASCIILiteral("number"), value);
</ins><span class="cx"> return castState<NumberSet>();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -364,7 +364,7 @@
</span><span class="cx"> Builder<STATE | IdSet>& setId(int value)
</span><span class="cx"> {
</span><span class="cx"> COMPILE_ASSERT(!(STATE & IdSet), property_id_already_set);
</span><del>- m_result->setNumber(ASCIILiteral("id"), value);
</del><ins>+ m_result->setInteger(ASCIILiteral("id"), value);
</ins><span class="cx"> return castState<IdSet>();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayEncodedValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/replay/EncodedValue.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/EncodedValue.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/JavaScriptCore/replay/EncodedValue.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx"> template<> double EncodedValue::convertTo<double>()
</span><span class="cx"> {
</span><span class="cx"> double result;
</span><del>- bool castSucceeded = m_value->asNumber(&result);
</del><ins>+ bool castSucceeded = m_value->asDouble(&result);
</ins><span class="cx"> ASSERT_UNUSED(castSucceeded, castSucceeded);
</span><span class="cx">
</span><span class="cx"> return result;
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx"> template<> float EncodedValue::convertTo<float>()
</span><span class="cx"> {
</span><span class="cx"> float result;
</span><del>- bool castSucceeded = m_value->asNumber(&result);
</del><ins>+ bool castSucceeded = m_value->asDouble(&result);
</ins><span class="cx"> ASSERT_UNUSED(castSucceeded, castSucceeded);
</span><span class="cx">
</span><span class="cx"> return result;
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> template<> int32_t EncodedValue::convertTo<int32_t>()
</span><span class="cx"> {
</span><span class="cx"> int32_t result;
</span><del>- bool castSucceeded = m_value->asNumber(&result);
</del><ins>+ bool castSucceeded = m_value->asInteger(&result);
</ins><span class="cx"> ASSERT_UNUSED(castSucceeded, castSucceeded);
</span><span class="cx">
</span><span class="cx"> return result;
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx"> template<> int64_t EncodedValue::convertTo<int64_t>()
</span><span class="cx"> {
</span><span class="cx"> int64_t result;
</span><del>- bool castSucceeded = m_value->asNumber(&result);
</del><ins>+ bool castSucceeded = m_value->asInteger(&result);
</ins><span class="cx"> ASSERT_UNUSED(castSucceeded, castSucceeded);
</span><span class="cx">
</span><span class="cx"> return result;
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx"> template<> uint32_t EncodedValue::convertTo<uint32_t>()
</span><span class="cx"> {
</span><span class="cx"> uint32_t result;
</span><del>- bool castSucceeded = m_value->asNumber(&result);
</del><ins>+ bool castSucceeded = m_value->asInteger(&result);
</ins><span class="cx"> ASSERT_UNUSED(castSucceeded, castSucceeded);
</span><span class="cx">
</span><span class="cx"> return result;
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx"> template<> uint64_t EncodedValue::convertTo<uint64_t>()
</span><span class="cx"> {
</span><span class="cx"> uint64_t result;
</span><del>- bool castSucceeded = m_value->asNumber(&result);
</del><ins>+ bool castSucceeded = m_value->asInteger(&result);
</ins><span class="cx"> ASSERT_UNUSED(castSucceeded, castSucceeded);
</span><span class="cx">
</span><span class="cx"> return result;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/WebCore/ChangeLog        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -1,3 +1,57 @@
</span><ins>+2014-09-11 Brian J. Burg <burg@cs.washington.edu>
+
+ Web Inspector: disambiguate integral and real number primitive types in the protocol
+ https://bugs.webkit.org/show_bug.cgi?id=136606
+
+ Reviewed by Timothy Hatcher.
+
+ Update clients of InspectorValue to disambiguate integer and double primitive types.
+
+ No new tests, no behavior changed.
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::parseColor):
+ (WebCore::parseQuad):
+ (WebCore::InspectorDOMAgent::performSearch):
+ * inspector/InspectorDOMDebuggerAgent.cpp:
+ (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
+ * inspector/InspectorIndexedDBAgent.cpp:
+ * inspector/InspectorOverlay.cpp:
+ (WebCore::buildObjectForPoint):
+ (WebCore::buildObjectForRect):
+ (WebCore::buildObjectForSize):
+ (WebCore::appendPathCommandAndPoints):
+ (WebCore::InspectorOverlay::reset):
+ * inspector/InspectorReplayAgent.cpp:
+ (WebCore::InspectorReplayAgent::replayToPosition):
+ * inspector/InspectorStyleSheet.h:
+ (WebCore::InspectorCSSId::InspectorCSSId):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::didWriteHTML):
+ (WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createGenericRecord):
+ (WebCore::TimelineRecordFactory::createBackgroundRecord):
+ (WebCore::TimelineRecordFactory::createGCEventData):
+ (WebCore::TimelineRecordFactory::createFunctionCallData):
+ (WebCore::TimelineRecordFactory::createProbeSampleData):
+ (WebCore::TimelineRecordFactory::createGenericTimerData):
+ (WebCore::TimelineRecordFactory::createTimerInstallData):
+ (WebCore::TimelineRecordFactory::createXHRReadyStateChangeData):
+ (WebCore::TimelineRecordFactory::createEvaluateScriptData):
+ (WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
+ (WebCore::TimelineRecordFactory::createResourceFinishData):
+ (WebCore::TimelineRecordFactory::createReceiveResourceData):
+ (WebCore::TimelineRecordFactory::createLayoutData):
+ (WebCore::TimelineRecordFactory::createParseHTMLData):
+ (WebCore::TimelineRecordFactory::createAnimationFrameData):
+ (WebCore::createQuad):
+ * inspector/TimelineRecordFactory.h:
+ (WebCore::TimelineRecordFactory::createWebSocketCreateData):
+ (WebCore::TimelineRecordFactory::createGenericWebSocketData):
+ * page/ContentSecurityPolicy.cpp:
+ (WebCore::ContentSecurityPolicy::reportViolation):
+
</ins><span class="cx"> 2014-09-11 Ryuan Choi <ryuan.choi@gmail.com>
</span><span class="cx">
</span><span class="cx"> [EFL][CoordinatedGraphics] Move CoordinatedGraphicsScene and CoordinatedBackingStore to WebKit2
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -119,14 +119,14 @@
</span><span class="cx"> int r;
</span><span class="cx"> int g;
</span><span class="cx"> int b;
</span><del>- bool success = (*colorObject)->getNumber("r", &r);
- success |= (*colorObject)->getNumber("g", &g);
- success |= (*colorObject)->getNumber("b", &b);
</del><ins>+ bool success = (*colorObject)->getInteger("r", &r);
+ success |= (*colorObject)->getInteger("g", &g);
+ success |= (*colorObject)->getInteger("b", &b);
</ins><span class="cx"> if (!success)
</span><span class="cx"> return Color::transparent;
</span><span class="cx">
</span><span class="cx"> double a;
</span><del>- success = (*colorObject)->getNumber("a", &a);
</del><ins>+ success = (*colorObject)->getDouble("a", &a);
</ins><span class="cx"> if (!success)
</span><span class="cx"> return Color(r, g, b);
</span><span class="cx">
</span><span class="lines">@@ -154,7 +154,7 @@
</span><span class="cx"> if (quadArray->length() != coordinatesInQuad)
</span><span class="cx"> return false;
</span><span class="cx"> for (size_t i = 0; i < coordinatesInQuad; ++i) {
</span><del>- if (!quadArray->get(i)->asNumber(coordinates + i))
</del><ins>+ if (!quadArray->get(i)->asDouble(coordinates + i))
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> quad->setP1(FloatPoint(coordinates[0], coordinates[1]));
</span><span class="lines">@@ -899,7 +899,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> int nodeId = 0;
</span><del>- if (!nodeValue->asNumber(&nodeId)) {
</del><ins>+ if (!nodeValue->asInteger(&nodeId)) {
</ins><span class="cx"> *errorString = "Invalid nodeIds item type. Expecting integer types.";
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx">
</span><span class="cx"> int breakpointOwnerNodeId = m_domAgent->boundNodeId(breakpointOwner);
</span><span class="cx"> ASSERT(breakpointOwnerNodeId);
</span><del>- description->setNumber("nodeId", breakpointOwnerNodeId);
</del><ins>+ description->setInteger("nodeId", breakpointOwnerNodeId);
</ins><span class="cx"> description->setString("type", domTypeName(breakpointType));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -336,7 +336,7 @@
</span><span class="cx">
</span><span class="cx"> if (type == number) {
</span><span class="cx"> double number;
</span><del>- if (!key->getNumber("number", &number))
</del><ins>+ if (!key->getDouble("number", &number))
</ins><span class="cx"> return nullptr;
</span><span class="cx"> idbKey = IDBKey::createNumber(number);
</span><span class="cx"> } else if (type == string) {
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx"> idbKey = IDBKey::createString(string);
</span><span class="cx"> } else if (type == date) {
</span><span class="cx"> double date;
</span><del>- if (!key->getNumber("date", &date))
</del><ins>+ if (!key->getDouble("date", &date))
</ins><span class="cx"> return nullptr;
</span><span class="cx"> idbKey = IDBKey::createDate(date);
</span><span class="cx"> } else if (type == array) {
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorOverlaycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -333,18 +333,18 @@
</span><span class="cx"> static PassRefPtr<InspectorObject> buildObjectForPoint(const FloatPoint& point)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> object = InspectorObject::create();
</span><del>- object->setNumber(ASCIILiteral("x"), point.x());
- object->setNumber(ASCIILiteral("y"), point.y());
</del><ins>+ object->setDouble(ASCIILiteral("x"), point.x());
+ object->setDouble(ASCIILiteral("y"), point.y());
</ins><span class="cx"> return object.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static PassRefPtr<InspectorObject> buildObjectForRect(const FloatRect& rect)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> object = InspectorObject::create();
</span><del>- object->setNumber(ASCIILiteral("x"), rect.x());
- object->setNumber(ASCIILiteral("y"), rect.y());
- object->setNumber(ASCIILiteral("width"), rect.width());
- object->setNumber(ASCIILiteral("height"), rect.height());
</del><ins>+ object->setDouble(ASCIILiteral("x"), rect.x());
+ object->setDouble(ASCIILiteral("y"), rect.y());
+ object->setDouble(ASCIILiteral("width"), rect.width());
+ object->setDouble(ASCIILiteral("height"), rect.height());
</ins><span class="cx"> return object.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -440,8 +440,8 @@
</span><span class="cx"> static PassRefPtr<InspectorObject> buildObjectForSize(const IntSize& size)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> result = InspectorObject::create();
</span><del>- result->setNumber("width", size.width());
- result->setNumber("height", size.height());
</del><ins>+ result->setInteger("width", size.width());
+ result->setInteger("height", size.height());
</ins><span class="cx"> return result.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -599,8 +599,8 @@
</span><span class="cx"> for (unsigned i = 0; i < length; i++) {
</span><span class="cx"> point = info->shapeOutsideInfo->shapeToRendererPoint(points[i]);
</span><span class="cx"> point = localPointToRoot(info->renderer, info->rootView, info->view, point);
</span><del>- info->array->pushNumber(point.x());
- info->array->pushNumber(point.y());
</del><ins>+ info->array->pushDouble(point.x());
+ info->array->pushDouble(point.y());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -859,7 +859,7 @@
</span><span class="cx"> void InspectorOverlay::reset(const IntSize& viewportSize, const IntSize& frameViewFullSize)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> resetData = InspectorObject::create();
</span><del>- resetData->setNumber("deviceScaleFactor", m_page.deviceScaleFactor());
</del><ins>+ resetData->setDouble("deviceScaleFactor", m_page.deviceScaleFactor());
</ins><span class="cx"> resetData->setObject("viewportSize", buildObjectForSize(viewportSize));
</span><span class="cx"> resetData->setObject("frameViewFullSize", buildObjectForSize(frameViewFullSize));
</span><span class="cx"> evaluateInOverlay("reset", resetData.release());
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorReplayAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorReplayAgent.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorReplayAgent.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/WebCore/inspector/InspectorReplayAgent.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -340,12 +340,12 @@
</span><span class="cx"> void InspectorReplayAgent::replayToPosition(ErrorString* errorString, const RefPtr<InspectorObject>& positionObject, bool fastReplay)
</span><span class="cx"> {
</span><span class="cx"> ReplayPosition position;
</span><del>- if (!positionObject->getNumber(ASCIILiteral("segmentOffset"), &position.segmentOffset)) {
</del><ins>+ if (!positionObject->getInteger(ASCIILiteral("segmentOffset"), &position.segmentOffset)) {
</ins><span class="cx"> *errorString = ASCIILiteral("Couldn't decode ReplayPosition segment offset provided to ReplayAgent.replayToPosition.");
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!positionObject->getNumber(ASCIILiteral("inputOffset"), &position.inputOffset)) {
</del><ins>+ if (!positionObject->getInteger(ASCIILiteral("inputOffset"), &position.inputOffset)) {
</ins><span class="cx"> *errorString = ASCIILiteral("Couldn't decode ReplayPosition input offset provided to ReplayAgent.replayToPosition.");
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorStyleSheeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.h (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorStyleSheet.h        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.h        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> RefPtr<Inspector::InspectorValue> ordinalValue = value->get("ordinal");
</span><del>- if (!ordinalValue || !ordinalValue->asNumber(&m_ordinal))
</del><ins>+ if (!ordinalValue || !ordinalValue->asInteger(&m_ordinal))
</ins><span class="cx"> m_styleSheetId = "";
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorTimelineAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -356,7 +356,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!m_recordStack.isEmpty()) {
</span><span class="cx"> const TimelineRecordEntry& entry = m_recordStack.last();
</span><del>- entry.data->setNumber("endLine", endLine);
</del><ins>+ entry.data->setInteger("endLine", endLine);
</ins><span class="cx"> didCompleteCurrentRecord(TimelineRecordType::ParseHTML);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -670,7 +670,7 @@
</span><span class="cx"> {
</span><span class="cx"> entry.record->setObject(ASCIILiteral("data"), entry.data);
</span><span class="cx"> entry.record->setArray(ASCIILiteral("children"), entry.children);
</span><del>- entry.record->setNumber(ASCIILiteral("endTime"), timestamp());
</del><ins>+ entry.record->setDouble(ASCIILiteral("endTime"), timestamp());
</ins><span class="cx"> addRecordToTimeline(entry.record, entry.type);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorTimelineRecordFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> PassRefPtr<InspectorObject> TimelineRecordFactory::createGenericRecord(double startTime, int maxCallStackDepth)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> record = InspectorObject::create();
</span><del>- record->setNumber("startTime", startTime);
</del><ins>+ record->setDouble("startTime", startTime);
</ins><span class="cx">
</span><span class="cx"> if (maxCallStackDepth) {
</span><span class="cx"> RefPtr<ScriptCallStack> stackTrace = createScriptCallStack(JSMainThreadExecState::currentState(), maxCallStackDepth);
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> PassRefPtr<InspectorObject> TimelineRecordFactory::createBackgroundRecord(double startTime, const String& threadName)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> record = InspectorObject::create();
</span><del>- record->setNumber("startTime", startTime);
</del><ins>+ record->setDouble("startTime", startTime);
</ins><span class="cx"> record->setString("thread", threadName);
</span><span class="cx"> return record.release();
</span><span class="cx"> }
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> PassRefPtr<InspectorObject> TimelineRecordFactory::createGCEventData(const size_t usedHeapSizeDelta)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><del>- data->setNumber("usedHeapSizeDelta", usedHeapSizeDelta);
</del><ins>+ data->setInteger("usedHeapSizeDelta", usedHeapSizeDelta);
</ins><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><span class="cx"> data->setString("scriptName", scriptName);
</span><del>- data->setNumber("scriptLine", scriptLine);
</del><ins>+ data->setInteger("scriptLine", scriptLine);
</ins><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -99,8 +99,8 @@
</span><span class="cx"> PassRefPtr<InspectorObject> TimelineRecordFactory::createProbeSampleData(const ScriptBreakpointAction& action, int hitCount)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><del>- data->setNumber(ASCIILiteral("probeId"), action.identifier);
- data->setNumber(ASCIILiteral("hitCount"), hitCount);
</del><ins>+ data->setInteger(ASCIILiteral("probeId"), action.identifier);
+ data->setInteger(ASCIILiteral("hitCount"), hitCount);
</ins><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -114,15 +114,15 @@
</span><span class="cx"> PassRefPtr<InspectorObject> TimelineRecordFactory::createGenericTimerData(int timerId)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><del>- data->setNumber("timerId", timerId);
</del><ins>+ data->setInteger("timerId", timerId);
</ins><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<InspectorObject> TimelineRecordFactory::createTimerInstallData(int timerId, int timeout, bool singleShot)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><del>- data->setNumber("timerId", timerId);
- data->setNumber("timeout", timeout);
</del><ins>+ data->setInteger("timerId", timerId);
+ data->setInteger("timeout", timeout);
</ins><span class="cx"> data->setBoolean("singleShot", singleShot);
</span><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><span class="cx"> data->setString("url", url);
</span><del>- data->setNumber("readyState", readyState);
</del><ins>+ data->setInteger("readyState", readyState);
</ins><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><span class="cx"> data->setString("url", url);
</span><del>- data->setNumber("lineNumber", lineNumber);
</del><ins>+ data->setInteger("lineNumber", lineNumber);
</ins><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><span class="cx"> data->setString("requestId", requestId);
</span><del>- data->setNumber("statusCode", response.httpStatusCode());
</del><ins>+ data->setInteger("statusCode", response.httpStatusCode());
</ins><span class="cx"> data->setString("mimeType", response.mimeType());
</span><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="lines">@@ -188,7 +188,7 @@
</span><span class="cx"> data->setString("requestId", requestId);
</span><span class="cx"> data->setBoolean("didFail", didFail);
</span><span class="cx"> if (finishTime)
</span><del>- data->setNumber("networkTime", finishTime);
</del><ins>+ data->setDouble("networkTime", finishTime);
</ins><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -196,15 +196,15 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><span class="cx"> data->setString("requestId", requestId);
</span><del>- data->setNumber("encodedDataLength", length);
</del><ins>+ data->setInteger("encodedDataLength", length);
</ins><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<InspectorObject> TimelineRecordFactory::createLayoutData(unsigned dirtyObjects, unsigned totalObjects, bool partialLayout)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><del>- data->setNumber("dirtyObjects", dirtyObjects);
- data->setNumber("totalObjects", totalObjects);
</del><ins>+ data->setInteger("dirtyObjects", dirtyObjects);
+ data->setInteger("totalObjects", totalObjects);
</ins><span class="cx"> data->setBoolean("partialLayout", partialLayout);
</span><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="lines">@@ -233,28 +233,28 @@
</span><span class="cx"> PassRefPtr<InspectorObject> TimelineRecordFactory::createParseHTMLData(unsigned startLine)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><del>- data->setNumber("startLine", startLine);
</del><ins>+ data->setInteger("startLine", startLine);
</ins><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<InspectorObject> TimelineRecordFactory::createAnimationFrameData(int callbackId)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorObject> data = InspectorObject::create();
</span><del>- data->setNumber("id", callbackId);
</del><ins>+ data->setInteger("id", callbackId);
</ins><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static PassRefPtr<InspectorArray> createQuad(const FloatQuad& quad)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InspectorArray> array = InspectorArray::create();
</span><del>- array->pushNumber(quad.p1().x());
- array->pushNumber(quad.p1().y());
- array->pushNumber(quad.p2().x());
- array->pushNumber(quad.p2().y());
- array->pushNumber(quad.p3().x());
- array->pushNumber(quad.p3().y());
- array->pushNumber(quad.p4().x());
- array->pushNumber(quad.p4().y());
</del><ins>+ array->pushDouble(quad.p1().x());
+ array->pushDouble(quad.p1().y());
+ array->pushDouble(quad.p2().x());
+ array->pushDouble(quad.p2().y());
+ array->pushDouble(quad.p3().x());
+ array->pushDouble(quad.p3().y());
+ array->pushDouble(quad.p4().x());
+ array->pushDouble(quad.p4().y());
</ins><span class="cx"> return array.release();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorTimelineRecordFactoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/TimelineRecordFactory.h (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/TimelineRecordFactory.h        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/WebCore/inspector/TimelineRecordFactory.h        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx"> static inline PassRefPtr<Inspector::InspectorObject> createWebSocketCreateData(unsigned long identifier, const URL& url, const String& protocol)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<Inspector::InspectorObject> data = Inspector::InspectorObject::create();
</span><del>- data->setNumber("identifier", identifier);
</del><ins>+ data->setInteger("identifier", identifier);
</ins><span class="cx"> data->setString("url", url.string());
</span><span class="cx"> if (!protocol.isNull())
</span><span class="cx"> data->setString("webSocketProtocol", protocol);
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx"> static inline PassRefPtr<Inspector::InspectorObject> createGenericWebSocketData(unsigned long identifier)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<Inspector::InspectorObject> data = Inspector::InspectorObject::create();
</span><del>- data->setNumber("identifier", identifier);
</del><ins>+ data->setInteger("identifier", identifier);
</ins><span class="cx"> return data.release();
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorepageContentSecurityPolicycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ContentSecurityPolicy.cpp (173553 => 173554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ContentSecurityPolicy.cpp        2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/WebCore/page/ContentSecurityPolicy.cpp        2014-09-12 04:53:35 UTC (rev 173554)
</span><span class="lines">@@ -1661,7 +1661,7 @@
</span><span class="cx"> if (callFrame && callFrame->lineNumber()) {
</span><span class="cx"> URL source = URL(URL(), callFrame->sourceURL());
</span><span class="cx"> cspReport->setString(ASCIILiteral("source-file"), stripURLForUseInReport(document, source));
</span><del>- cspReport->setNumber(ASCIILiteral("line-number"), callFrame->lineNumber());
</del><ins>+ cspReport->setInteger(ASCIILiteral("line-number"), callFrame->lineNumber());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> reportObject = InspectorObject::create();
</span></span></pre>
</div>
</div>
</body>
</html>