Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (173553 => 173554)
--- trunk/Source/_javascript_Core/ChangeLog 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-09-12 04:53:35 UTC (rev 173554)
@@ -1,3 +1,79 @@
+2014-09-11 Brian J. Burg <[email protected]>
+
+ 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>):
+
2014-09-11 Joseph Pecoraro <[email protected]>
Web Inspector: Occasional ASSERT closing web inspector
Modified: trunk/Source/_javascript_Core/bindings/ScriptValue.cpp (173553 => 173554)
--- trunk/Source/_javascript_Core/bindings/ScriptValue.cpp 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/bindings/ScriptValue.cpp 2014-09-12 04:53:35 UTC (rev 173554)
@@ -114,8 +114,10 @@
return InspectorValue::null();
if (value.isBoolean())
return InspectorBasicValue::create(value.asBoolean());
- if (value.isNumber())
+ if (value.isNumber() && value.isDouble())
return InspectorBasicValue::create(value.asNumber());
+ if (value.isNumber() && value.isMachineInt())
+ return InspectorBasicValue::create(static_cast<int>(value.asMachineInt()));
if (value.isString())
return InspectorString::create(value.getString(scriptState));
Modified: trunk/Source/_javascript_Core/inspector/InjectedScriptManager.cpp (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/InjectedScriptManager.cpp 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/InjectedScriptManager.cpp 2014-09-12 04:53:35 UTC (rev 173554)
@@ -97,7 +97,7 @@
RefPtr<InspectorValue> parsedObjectId = InspectorValue::parseJSON(objectId);
if (parsedObjectId && parsedObjectId->type() == InspectorValue::Type::Object) {
long injectedScriptId = 0;
- bool success = parsedObjectId->asObject()->getNumber(ASCIILiteral("injectedScriptId"), &injectedScriptId);
+ bool success = parsedObjectId->asObject()->getInteger(ASCIILiteral("injectedScriptId"), &injectedScriptId);
if (success)
return m_idToInjectedScript.get(injectedScriptId);
}
Modified: trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.cpp (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.cpp 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.cpp 2014-09-12 04:53:35 UTC (rev 173554)
@@ -97,8 +97,8 @@
}
long callId = 0;
- if (!callIdValue->asNumber(&callId)) {
- reportProtocolError(nullptr, InvalidRequest, ASCIILiteral("The type of 'id' property must be number"));
+ if (!callIdValue->asInteger(&callId)) {
+ reportProtocolError(nullptr, InvalidRequest, ASCIILiteral("The type of 'id' property must be integer"));
return;
}
@@ -143,7 +143,7 @@
RefPtr<InspectorObject> responseMessage = InspectorObject::create();
responseMessage->setObject(ASCIILiteral("result"), result);
- responseMessage->setNumber(ASCIILiteral("id"), callId);
+ responseMessage->setInteger(ASCIILiteral("id"), callId);
m_inspectorFrontendChannel->sendMessageToFrontend(responseMessage->toJSONString());
}
@@ -171,7 +171,7 @@
return;
RefPtr<InspectorObject> error = InspectorObject::create();
- error->setNumber(ASCIILiteral("code"), errorCodes[errorCode]);
+ error->setInteger(ASCIILiteral("code"), errorCodes[errorCode]);
error->setString(ASCIILiteral("message"), errorMessage);
if (data)
error->setArray(ASCIILiteral("data"), data);
@@ -179,7 +179,7 @@
RefPtr<InspectorObject> message = InspectorObject::create();
message->setObject(ASCIILiteral("error"), error.release());
if (callId)
- message->setNumber(ASCIILiteral("id"), *callId);
+ message->setInteger(ASCIILiteral("id"), *callId);
else
message->setValue(ASCIILiteral("id"), InspectorValue::null());
@@ -221,17 +221,17 @@
}
struct AsMethodBridges {
- static bool asInt(InspectorValue* value, int* output) { return value->asNumber(output); }
- static bool asDouble(InspectorValue* value, double* output) { return value->asNumber(output); }
+ static bool asInteger(InspectorValue* value, int* output) { return value->asInteger(output); }
+ static bool asDouble(InspectorValue* value, double* output) { return value->asDouble(output); }
static bool asString(InspectorValue* value, String* output) { return value->asString(output); }
static bool asBoolean(InspectorValue* value, bool* output) { return value->asBoolean(output); }
static bool asObject(InspectorValue* value, RefPtr<InspectorObject>* output) { return value->asObject(output); }
static bool asArray(InspectorValue* value, RefPtr<InspectorArray>* output) { return value->asArray(output); }
};
-int InspectorBackendDispatcher::getInt(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
+int InspectorBackendDispatcher::getInteger(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
{
- return getPropertyValue<int, int, int>(object, name, valueFound, protocolErrors, 0, AsMethodBridges::asInt, "Number");
+ return getPropertyValue<int, int, int>(object, name, valueFound, protocolErrors, 0, AsMethodBridges::asInteger, "Integer");
}
double InspectorBackendDispatcher::getDouble(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
Modified: trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.h (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.h 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.h 2014-09-12 04:53:35 UTC (rev 173554)
@@ -86,7 +86,7 @@
void reportProtocolError(const long* const callId, CommonErrorCode, const String& errorMessage) const;
void reportProtocolError(const long* const callId, CommonErrorCode, const String& errorMessage, PassRefPtr<InspectorArray> data) const;
- static int getInt(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
+ static int getInteger(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
static double getDouble(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
static String getString(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
static bool getBoolean(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
Modified: trunk/Source/_javascript_Core/inspector/InspectorProtocolTypes.h (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/InspectorProtocolTypes.h 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/InspectorProtocolTypes.h 2014-09-12 04:53:35 UTC (rev 173554)
@@ -120,7 +120,7 @@
struct Traits {
static void pushRaw(InspectorArray* array, int value)
{
- array->pushInt(value);
+ array->pushInteger(value);
}
};
};
@@ -130,7 +130,7 @@
struct Traits {
static void pushRaw(InspectorArray* array, double value)
{
- array->pushNumber(value);
+ array->pushDouble(value);
}
};
};
@@ -248,22 +248,9 @@
template<> struct BindingTraits<InspectorObject> : public PrimitiveBindingTraits<InspectorValue::Type::Object> { };
template<> struct BindingTraits<String> : public PrimitiveBindingTraits<InspectorValue::Type::String> { };
template<> struct BindingTraits<bool> : public PrimitiveBindingTraits<InspectorValue::Type::Boolean> { };
-template<> struct BindingTraits<double> : public PrimitiveBindingTraits<InspectorValue::Type::Number> { };
+template<> struct BindingTraits<double> : public PrimitiveBindingTraits<InspectorValue::Type::Double> { };
+template<> struct BindingTraits<int> : public PrimitiveBindingTraits<InspectorValue::Type::Integer> { };
-// 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
-};
-
} // namespace Protocol
using Protocol::BindingTraits;
Modified: trunk/Source/_javascript_Core/inspector/InspectorValues.cpp (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/InspectorValues.cpp 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/InspectorValues.cpp 2014-09-12 04:53:35 UTC (rev 173554)
@@ -485,42 +485,42 @@
return false;
}
-bool InspectorValue::asNumber(double*) const
+bool InspectorValue::asDouble(double*) const
{
return false;
}
-bool InspectorValue::asNumber(float*) const
+bool InspectorValue::asDouble(float*) const
{
return false;
}
-bool InspectorValue::asNumber(int*) const
+bool InspectorValue::asInteger(int*) const
{
return false;
}
-bool InspectorValue::asNumber(unsigned*) const
+bool InspectorValue::asInteger(unsigned*) const
{
return false;
}
-bool InspectorValue::asNumber(long*) const
+bool InspectorValue::asInteger(long*) const
{
return false;
}
-bool InspectorValue::asNumber(long long*) const
+bool InspectorValue::asInteger(long long*) const
{
return false;
}
-bool InspectorValue::asNumber(unsigned long*) const
+bool InspectorValue::asInteger(unsigned long*) const
{
return false;
}
-bool InspectorValue::asNumber(unsigned long long*) const
+bool InspectorValue::asInteger(unsigned long long*) const
{
return false;
}
@@ -591,65 +591,65 @@
return true;
}
-bool InspectorBasicValue::asNumber(double* output) const
+bool InspectorBasicValue::asDouble(double* output) const
{
- if (type() != Type::Number)
+ if (type() != Type::Double)
return false;
*output = m_doubleValue;
return true;
}
-bool InspectorBasicValue::asNumber(float* output) const
+bool InspectorBasicValue::asDouble(float* output) const
{
- if (type() != Type::Number)
+ if (type() != Type::Double)
return false;
*output = static_cast<float>(m_doubleValue);
return true;
}
-bool InspectorBasicValue::asNumber(int* output) const
+bool InspectorBasicValue::asInteger(int* output) const
{
- if (type() != Type::Number)
+ if (type() != Type::Integer && type() != Type::Double)
return false;
*output = static_cast<int>(m_doubleValue);
return true;
}
-bool InspectorBasicValue::asNumber(unsigned* output) const
+bool InspectorBasicValue::asInteger(unsigned* output) const
{
- if (type() != Type::Number)
+ if (type() != Type::Integer && type() != Type::Double)
return false;
*output = static_cast<unsigned>(m_doubleValue);
return true;
}
-bool InspectorBasicValue::asNumber(long* output) const
+bool InspectorBasicValue::asInteger(long* output) const
{
- if (type() != Type::Number)
+ if (type() != Type::Integer && type() != Type::Double)
return false;
*output = static_cast<long>(m_doubleValue);
return true;
}
-bool InspectorBasicValue::asNumber(long long* output) const
+bool InspectorBasicValue::asInteger(long long* output) const
{
- if (type() != Type::Number)
+ if (type() != Type::Integer && type() != Type::Double)
return false;
*output = static_cast<long long>(m_doubleValue);
return true;
}
-bool InspectorBasicValue::asNumber(unsigned long* output) const
+bool InspectorBasicValue::asInteger(unsigned long* output) const
{
- if (type() != Type::Number)
+ if (type() != Type::Integer && type() != Type::Double)
return false;
*output = static_cast<unsigned long>(m_doubleValue);
return true;
}
-bool InspectorBasicValue::asNumber(unsigned long long* output) const
+bool InspectorBasicValue::asInteger(unsigned long long* output) const
{
- if (type() != Type::Number)
+ if (type() != Type::Integer && type() != Type::Double)
return false;
*output = static_cast<unsigned long long>(m_doubleValue);
return true;
@@ -657,13 +657,13 @@
void InspectorBasicValue::writeJSON(StringBuilder* output) const
{
- ASSERT(type() == Type::Boolean || type() == Type::Number);
+ ASSERT(type() == Type::Boolean || type() == Type::Double || type() == Type::Integer);
if (type() == Type::Boolean) {
if (m_boolValue)
output->append(trueString, 4);
else
output->append(falseString, 5);
- } else if (type() == Type::Number) {
+ } else if (type() == Type::Double || type() == Type::Integer) {
NumberToLStringBuffer buffer;
if (!std::isfinite(m_doubleValue)) {
output->append(nullString, 4);
Modified: trunk/Source/_javascript_Core/inspector/InspectorValues.h (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/InspectorValues.h 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/InspectorValues.h 2014-09-12 04:53:35 UTC (rev 173554)
@@ -58,7 +58,8 @@
enum class Type {
Null = 0,
Boolean,
- Number,
+ Double,
+ Integer,
String,
Object,
Array
@@ -69,14 +70,14 @@
bool isNull() const { return m_type == Type::Null; }
virtual bool asBoolean(bool* output) const;
- 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;
+ 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;
virtual bool asString(String* output) const;
virtual bool asValue(RefPtr<InspectorValue>* output);
virtual bool asObject(RefPtr<InspectorObject>* output);
@@ -104,14 +105,16 @@
static PassRefPtr<InspectorBasicValue> create(double);
virtual bool asBoolean(bool* output) const override;
- 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;
+ // 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;
virtual void writeJSON(StringBuilder* output) const override;
@@ -121,11 +124,11 @@
, m_boolValue(value) { }
explicit InspectorBasicValue(int value)
- : InspectorValue(Type::Number)
+ : InspectorValue(Type::Integer)
, m_doubleValue(static_cast<double>(value)) { }
explicit InspectorBasicValue(double value)
- : InspectorValue(Type::Number)
+ : InspectorValue(Type::Double)
, m_doubleValue(value) { }
union {
@@ -171,8 +174,10 @@
virtual bool asObject(RefPtr<InspectorObject>* output) override;
+ // FIXME: use templates to reduce the amount of duplicated set*() methods.
void setBoolean(const String& name, bool);
- void setNumber(const String& name, double);
+ void setInteger(const String& name, int);
+ void setDouble(const String& name, double);
void setString(const String& name, const String&);
void setValue(const String& name, PassRefPtr<InspectorValue>);
void setObject(const String& name, PassRefPtr<InspectorObjectBase>);
@@ -180,14 +185,24 @@
iterator find(const String& name);
const_iterator find(const String& name) const;
+
+ // FIXME: use templates to reduce the amount of duplicated get*() methods.
bool getBoolean(const String& name, bool* output) const;
- template<class T> bool getNumber(const String& name, T* output) const
+ template<class T> bool getDouble(const String& name, T* output) const
{
RefPtr<InspectorValue> value = get(name);
if (!value)
return false;
- return value->asNumber(output);
+ return value->asDouble(output);
}
+ template<class T> bool getInteger(const String& name, T* output) const
+ {
+ RefPtr<InspectorValue> value = get(name);
+ if (!value)
+ return false;
+ return value->asInteger(output);
+ }
+
bool getString(const String& name, String* output) const;
PassRefPtr<InspectorObject> getObject(const String& name) const;
PassRefPtr<InspectorArray> getArray(const String& name) const;
@@ -219,7 +234,8 @@
using InspectorObjectBase::asObject;
using InspectorObjectBase::setBoolean;
- using InspectorObjectBase::setNumber;
+ using InspectorObjectBase::setInteger;
+ using InspectorObjectBase::setDouble;
using InspectorObjectBase::setString;
using InspectorObjectBase::setValue;
using InspectorObjectBase::setObject;
@@ -227,7 +243,8 @@
using InspectorObjectBase::find;
using InspectorObjectBase::getBoolean;
- using InspectorObjectBase::getNumber;
+ using InspectorObjectBase::getInteger;
+ using InspectorObjectBase::getDouble;
using InspectorObjectBase::getString;
using InspectorObjectBase::getObject;
using InspectorObjectBase::getArray;
@@ -257,8 +274,8 @@
virtual bool asArray(RefPtr<InspectorArray>* output) override;
void pushBoolean(bool);
- void pushInt(int);
- void pushNumber(double);
+ void pushInteger(int);
+ void pushDouble(double);
void pushString(const String&);
void pushValue(PassRefPtr<InspectorValue>);
void pushObject(PassRefPtr<InspectorObject>);
@@ -287,8 +304,8 @@
using InspectorArrayBase::asArray;
using InspectorArrayBase::pushBoolean;
- using InspectorArrayBase::pushInt;
- using InspectorArrayBase::pushNumber;
+ using InspectorArrayBase::pushInteger;
+ using InspectorArrayBase::pushDouble;
using InspectorArrayBase::pushString;
using InspectorArrayBase::pushValue;
using InspectorArrayBase::pushObject;
@@ -316,11 +333,16 @@
setValue(name, InspectorBasicValue::create(value));
}
-inline void InspectorObjectBase::setNumber(const String& name, double value)
+inline void InspectorObjectBase::setInteger(const String& name, int value)
{
setValue(name, InspectorBasicValue::create(value));
}
+inline void InspectorObjectBase::setDouble(const String& name, double value)
+{
+ setValue(name, InspectorBasicValue::create(value));
+}
+
inline void InspectorObjectBase::setString(const String& name, const String& value)
{
setValue(name, InspectorString::create(value));
@@ -352,12 +374,12 @@
m_data.append(InspectorBasicValue::create(value));
}
-inline void InspectorArrayBase::pushInt(int value)
+inline void InspectorArrayBase::pushInteger(int value)
{
m_data.append(InspectorBasicValue::create(value));
}
-inline void InspectorArrayBase::pushNumber(double value)
+inline void InspectorArrayBase::pushDouble(double value)
{
m_data.append(InspectorBasicValue::create(value));
}
Modified: trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.cpp (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.cpp 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.cpp 2014-09-12 04:53:35 UTC (rev 173554)
@@ -152,8 +152,8 @@
{
RefPtr<InspectorObject> breakpointObject = InspectorObject::create();
breakpointObject->setString(ASCIILiteral("url"), url);
- breakpointObject->setNumber(ASCIILiteral("lineNumber"), lineNumber);
- breakpointObject->setNumber(ASCIILiteral("columnNumber"), columnNumber);
+ breakpointObject->setInteger(ASCIILiteral("lineNumber"), lineNumber);
+ breakpointObject->setInteger(ASCIILiteral("columnNumber"), columnNumber);
breakpointObject->setString(ASCIILiteral("condition"), condition);
breakpointObject->setBoolean(ASCIILiteral("isRegex"), isRegex);
breakpointObject->setBoolean(ASCIILiteral("autoContinue"), autoContinue);
@@ -228,7 +228,7 @@
// Specifying an identifier is optional. They are used to correlate probe samples
// in the frontend across multiple backend probe actions and segregate object groups.
int identifier = 0;
- object->getNumber(ASCIILiteral("id"), &identifier);
+ object->getInteger(ASCIILiteral("id"), &identifier);
String data;
object->getString(ASCIILiteral("data"), &data);
@@ -288,7 +288,7 @@
static bool parseLocation(ErrorString* errorString, InspectorObject* location, JSC::SourceID* sourceID, unsigned* lineNumber, unsigned* columnNumber)
{
String scriptIDStr;
- if (!location->getString(ASCIILiteral("scriptId"), &scriptIDStr) || !location->getNumber(ASCIILiteral("lineNumber"), lineNumber)) {
+ if (!location->getString(ASCIILiteral("scriptId"), &scriptIDStr) || !location->getInteger(ASCIILiteral("lineNumber"), lineNumber)) {
*sourceID = JSC::noSourceID;
*errorString = ASCIILiteral("scriptId and lineNumber are required.");
return false;
@@ -296,7 +296,7 @@
*sourceID = scriptIDStr.toIntPtr();
*columnNumber = 0;
- location->getNumber(ASCIILiteral("columnNumber"), columnNumber);
+ location->getInteger(ASCIILiteral("columnNumber"), columnNumber);
return true;
}
@@ -601,8 +601,8 @@
if (!matches(scriptURL, url, isRegex))
continue;
ScriptBreakpoint breakpoint;
- breakpointObject->getNumber(ASCIILiteral("lineNumber"), &breakpoint.lineNumber);
- breakpointObject->getNumber(ASCIILiteral("columnNumber"), &breakpoint.columnNumber);
+ breakpointObject->getInteger(ASCIILiteral("lineNumber"), &breakpoint.lineNumber);
+ breakpointObject->getInteger(ASCIILiteral("columnNumber"), &breakpoint.columnNumber);
breakpointObject->getString(ASCIILiteral("condition"), &breakpoint.condition);
breakpointObject->getBoolean(ASCIILiteral("autoContinue"), &breakpoint.autoContinue);
ErrorString errorString;
Modified: trunk/Source/_javascript_Core/inspector/agents/InspectorRuntimeAgent.cpp (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/agents/InspectorRuntimeAgent.cpp 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/agents/InspectorRuntimeAgent.cpp 2014-09-12 04:53:35 UTC (rev 173554)
@@ -221,9 +221,9 @@
int descriptor;
String sourceIDAsString;
int divot;
- location->getNumber(ASCIILiteral("typeInformationDescriptor"), &descriptor);
+ location->getInteger(ASCIILiteral("typeInformationDescriptor"), &descriptor);
location->getString(ASCIILiteral("sourceID"), &sourceIDAsString);
- location->getNumber(ASCIILiteral("divot"), &divot);
+ location->getInteger(ASCIILiteral("divot"), &divot);
bool okay;
TypeLocation* typeLocation = vm.typeProfiler()->findLocation(divot, sourceIDAsString.toIntPtrStrict(&okay), static_cast<TypeProfilerSearchDescriptor>(descriptor));
Modified: trunk/Source/_javascript_Core/inspector/scripts/codegen/generator.py (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/scripts/codegen/generator.py 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/scripts/codegen/generator.py 2014-09-12 04:53:35 UTC (rev 173554)
@@ -232,7 +232,9 @@
return 'getArray'
if isinstance(_type, PrimitiveType):
if _type.raw_name() is 'integer':
- return 'getInt'
+ return 'getInteger'
+ elif _type.raw_name() is 'number':
+ return 'getDouble'
else:
return 'get' + ucfirst(_type.raw_name())
if isinstance(_type, AliasedType):
@@ -247,9 +249,11 @@
if isinstance(_type, ArrayType):
return 'setArray'
if isinstance(_type, PrimitiveType):
- if _type.raw_name() in ['integer', 'number']:
- return 'setNumber'
- elif _type.raw_name() in ['any']:
+ if _type.raw_name() is 'integer':
+ return 'setInteger'
+ elif _type.raw_name() is 'number':
+ return 'setDouble'
+ elif _type.raw_name() is 'any':
return 'setValue'
else:
return 'set' + ucfirst(_type.raw_name())
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-async-attribute.json-result (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-async-attribute.json-result 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-async-attribute.json-result 2014-09-12 04:53:35 UTC (rev 173554)
@@ -215,7 +215,7 @@
RefPtr<InspectorObject> paramsContainer = message.getObject(ASCIILiteral("params"));
InspectorObject* paramsContainerPtr = paramsContainer.get();
InspectorArray* protocolErrorsPtr = protocolErrors.get();
- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
String in_query = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("query"), nullptr, protocolErrorsPtr);
if (protocolErrors->length()) {
String errorMessage = String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLSyncOptionalReturnValues");
@@ -242,13 +242,13 @@
if (out_notes.isAssigned())
result->setString(ASCIILiteral("notes"), out_notes.getValue());
if (out_timestamp.isAssigned())
- result->setNumber(ASCIILiteral("timestamp"), out_timestamp.getValue());
+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp.getValue());
if (out_values.isAssigned())
result->setObject(ASCIILiteral("values"), out_values.getValue());
if (out_payload.isAssigned())
result->setValue(ASCIILiteral("payload"), out_payload.getValue());
if (out_databaseId.isAssigned())
- result->setNumber(ASCIILiteral("databaseId"), out_databaseId.getValue());
+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId.getValue());
if (out_sqlError)
result->setObject(ASCIILiteral("sqlError"), out_sqlError);
if (out_screenColor.isAssigned())
@@ -269,13 +269,13 @@
if (notes.isAssigned())
jsonMessage->setString(ASCIILiteral("notes"), notes.getValue());
if (timestamp.isAssigned())
- jsonMessage->setNumber(ASCIILiteral("timestamp"), timestamp.getValue());
+ jsonMessage->setDouble(ASCIILiteral("timestamp"), timestamp.getValue());
if (values.isAssigned())
jsonMessage->setObject(ASCIILiteral("values"), values.getValue());
if (payload.isAssigned())
jsonMessage->setValue(ASCIILiteral("payload"), payload.getValue());
if (databaseId.isAssigned())
- jsonMessage->setNumber(ASCIILiteral("databaseId"), databaseId.getValue());
+ jsonMessage->setInteger(ASCIILiteral("databaseId"), databaseId.getValue());
if (sqlError)
jsonMessage->setObject(ASCIILiteral("sqlError"), sqlError);
if (screenColor.isAssigned())
@@ -291,7 +291,7 @@
RefPtr<InspectorObject> paramsContainer = message.getObject(ASCIILiteral("params"));
InspectorObject* paramsContainerPtr = paramsContainer.get();
InspectorArray* protocolErrorsPtr = protocolErrors.get();
- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
String in_query = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("query"), nullptr, protocolErrorsPtr);
if (protocolErrors->length()) {
String errorMessage = String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLAsyncOptionalReturnValues");
@@ -317,7 +317,7 @@
RefPtr<InspectorObject> paramsContainer = message.getObject(ASCIILiteral("params"));
InspectorObject* paramsContainerPtr = paramsContainer.get();
InspectorArray* protocolErrorsPtr = protocolErrors.get();
- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
String in_query = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("query"), nullptr, protocolErrorsPtr);
if (protocolErrors->length()) {
String errorMessage = String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLSync");
@@ -341,10 +341,10 @@
if (!error.length()) {
result->setArray(ASCIILiteral("columnNames"), out_columnNames);
result->setString(ASCIILiteral("notes"), out_notes);
- result->setNumber(ASCIILiteral("timestamp"), out_timestamp);
+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp);
result->setObject(ASCIILiteral("values"), out_values);
result->setValue(ASCIILiteral("payload"), out_payload);
- result->setNumber(ASCIILiteral("databaseId"), out_databaseId);
+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId);
result->setObject(ASCIILiteral("sqlError"), out_sqlError);
result->setString(ASCIILiteral("screenColor"), Inspector::Protocol::getTestEnumConstantValue(out_screenColor));
result->setString(ASCIILiteral("printColor"), Inspector::Protocol::getTestEnumConstantValue(out_printColor));
@@ -359,10 +359,10 @@
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setArray(ASCIILiteral("columnNames"), columnNames);
jsonMessage->setString(ASCIILiteral("notes"), notes);
- jsonMessage->setNumber(ASCIILiteral("timestamp"), timestamp);
+ jsonMessage->setDouble(ASCIILiteral("timestamp"), timestamp);
jsonMessage->setObject(ASCIILiteral("values"), values);
jsonMessage->setValue(ASCIILiteral("payload"), payload);
- jsonMessage->setNumber(ASCIILiteral("databaseId"), databaseId);
+ jsonMessage->setInteger(ASCIILiteral("databaseId"), databaseId);
jsonMessage->setObject(ASCIILiteral("sqlError"), sqlError);
jsonMessage->setString(ASCIILiteral("screenColor"), Inspector::Protocol::getTestEnumConstantValue(screenColor));
jsonMessage->setString(ASCIILiteral("printColor"), Inspector::Protocol::getTestEnumConstantValue(printColor));
@@ -375,7 +375,7 @@
RefPtr<InspectorObject> paramsContainer = message.getObject(ASCIILiteral("params"));
InspectorObject* paramsContainerPtr = paramsContainer.get();
InspectorArray* protocolErrorsPtr = protocolErrors.get();
- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
String in_query = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("query"), nullptr, protocolErrorsPtr);
if (protocolErrors->length()) {
String errorMessage = String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLAsync");
@@ -614,7 +614,7 @@
Builder<STATE | CodeSet>& setCode(int value)
{
COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
- m_result->setNumber(ASCIILiteral("code"), value);
+ m_result->setInteger(ASCIILiteral("code"), value);
return castState<CodeSet>();
}
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result 2014-09-12 04:53:35 UTC (rev 173554)
@@ -199,13 +199,13 @@
bool notes_valueFound = false;
String in_notes = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("notes"), ¬es_valueFound, protocolErrorsPtr);
bool timestamp_valueFound = false;
- Inspector::Protocol::OptOutput<double> in_timestamp = InspectorBackendDispatcher::getNumber(paramsContainerPtr, ASCIILiteral("timestamp"), ×tamp_valueFound, protocolErrorsPtr);
+ Inspector::Protocol::OptOutput<double> in_timestamp = InspectorBackendDispatcher::getDouble(paramsContainerPtr, ASCIILiteral("timestamp"), ×tamp_valueFound, protocolErrorsPtr);
bool values_valueFound = false;
RefPtr<Inspector::InspectorObject> in_values = InspectorBackendDispatcher::getObject(paramsContainerPtr, ASCIILiteral("values"), &values_valueFound, protocolErrorsPtr);
bool payload_valueFound = false;
RefPtr<Inspector::InspectorValue> in_payload = InspectorBackendDispatcher::getAny(paramsContainerPtr, ASCIILiteral("payload"), &payload_valueFound, protocolErrorsPtr);
bool databaseId_valueFound = false;
- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), &databaseId_valueFound, protocolErrorsPtr);
+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), &databaseId_valueFound, protocolErrorsPtr);
bool sqlError_valueFound = false;
RefPtr<Inspector::InspectorObject> in_sqlError = InspectorBackendDispatcher::getObject(paramsContainerPtr, ASCIILiteral("sqlError"), &sqlError_valueFound, protocolErrorsPtr);
bool screenColor_valueFound = false;
@@ -237,13 +237,13 @@
if (out_notes.isAssigned())
result->setString(ASCIILiteral("notes"), out_notes.getValue());
if (out_timestamp.isAssigned())
- result->setNumber(ASCIILiteral("timestamp"), out_timestamp.getValue());
+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp.getValue());
if (out_values.isAssigned())
result->setObject(ASCIILiteral("values"), out_values.getValue());
if (out_payload.isAssigned())
result->setValue(ASCIILiteral("payload"), out_payload.getValue());
if (out_databaseId.isAssigned())
- result->setNumber(ASCIILiteral("databaseId"), out_databaseId.getValue());
+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId.getValue());
if (out_sqlError)
result->setObject(ASCIILiteral("sqlError"), out_sqlError);
if (out_screenColor.isAssigned())
@@ -262,10 +262,10 @@
InspectorArray* protocolErrorsPtr = protocolErrors.get();
RefPtr<Inspector::InspectorArray> in_columnNames = InspectorBackendDispatcher::getArray(paramsContainerPtr, ASCIILiteral("columnNames"), nullptr, protocolErrorsPtr);
String in_notes = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("notes"), nullptr, protocolErrorsPtr);
- double in_timestamp = InspectorBackendDispatcher::getNumber(paramsContainerPtr, ASCIILiteral("timestamp"), nullptr, protocolErrorsPtr);
+ double in_timestamp = InspectorBackendDispatcher::getDouble(paramsContainerPtr, ASCIILiteral("timestamp"), nullptr, protocolErrorsPtr);
RefPtr<Inspector::InspectorObject> in_values = InspectorBackendDispatcher::getObject(paramsContainerPtr, ASCIILiteral("values"), nullptr, protocolErrorsPtr);
RefPtr<Inspector::InspectorValue> in_payload = InspectorBackendDispatcher::getAny(paramsContainerPtr, ASCIILiteral("payload"), nullptr, protocolErrorsPtr);
- int in_databaseId = InspectorBackendDispatcher::getInt(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
+ int in_databaseId = InspectorBackendDispatcher::getInteger(paramsContainerPtr, ASCIILiteral("databaseId"), nullptr, protocolErrorsPtr);
RefPtr<Inspector::InspectorObject> in_sqlError = InspectorBackendDispatcher::getObject(paramsContainerPtr, ASCIILiteral("sqlError"), nullptr, protocolErrorsPtr);
String in_screenColor = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("screenColor"), nullptr, protocolErrorsPtr);
String in_printColor = InspectorBackendDispatcher::getString(paramsContainerPtr, ASCIILiteral("printColor"), nullptr, protocolErrorsPtr);
@@ -291,10 +291,10 @@
if (!error.length()) {
result->setArray(ASCIILiteral("columnNames"), out_columnNames);
result->setString(ASCIILiteral("notes"), out_notes);
- result->setNumber(ASCIILiteral("timestamp"), out_timestamp);
+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp);
result->setObject(ASCIILiteral("values"), out_values);
result->setValue(ASCIILiteral("payload"), out_payload);
- result->setNumber(ASCIILiteral("databaseId"), out_databaseId);
+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId);
result->setObject(ASCIILiteral("sqlError"), out_sqlError);
result->setString(ASCIILiteral("screenColor"), Inspector::Protocol::getTestEnumConstantValue(out_screenColor));
result->setString(ASCIILiteral("printColor"), Inspector::Protocol::getTestEnumConstantValue(out_printColor));
@@ -521,7 +521,7 @@
Builder<STATE | CodeSet>& setCode(int value)
{
COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
- m_result->setNumber(ASCIILiteral("code"), value);
+ m_result->setInteger(ASCIILiteral("code"), value);
return castState<CodeSet>();
}
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/events-with-optional-parameters.json-result (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/events-with-optional-parameters.json-result 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/events-with-optional-parameters.json-result 2014-09-12 04:53:35 UTC (rev 173554)
@@ -249,7 +249,7 @@
if (notes)
paramsObject->setString(ASCIILiteral("notes"), *notes);
if (timestamp)
- paramsObject->setNumber(ASCIILiteral("timestamp"), *timestamp);
+ paramsObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
if (values)
paramsObject->setObject(ASCIILiteral("values"), values);
if (payload)
@@ -272,7 +272,7 @@
RefPtr<InspectorObject> paramsObject = InspectorObject::create();
paramsObject->setArray(ASCIILiteral("columnNames"), columnNames);
paramsObject->setString(ASCIILiteral("notes"), notes);
- paramsObject->setNumber(ASCIILiteral("timestamp"), timestamp);
+ paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp);
paramsObject->setObject(ASCIILiteral("values"), values);
paramsObject->setValue(ASCIILiteral("payload"), payload);
paramsObject->setObject(ASCIILiteral("sqlError"), sqlError);
@@ -398,7 +398,7 @@
Builder<STATE | CodeSet>& setCode(int value)
{
COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
- m_result->setNumber(ASCIILiteral("code"), value);
+ m_result->setInteger(ASCIILiteral("code"), value);
return castState<CodeSet>();
}
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result 2014-09-12 04:53:35 UTC (rev 173554)
@@ -419,7 +419,7 @@
Builder<STATE | CodeSet>& setCode(int value)
{
COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
- m_result->setNumber(ASCIILiteral("code"), value);
+ m_result->setInteger(ASCIILiteral("code"), value);
return castState<CodeSet>();
}
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-object-type.json-result (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-object-type.json-result 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-object-type.json-result 2014-09-12 04:53:35 UTC (rev 173554)
@@ -341,7 +341,7 @@
Builder<STATE | CodeSet>& setCode(int value)
{
COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
- m_result->setNumber(ASCIILiteral("code"), value);
+ m_result->setInteger(ASCIILiteral("code"), value);
return castState<CodeSet>();
}
@@ -431,7 +431,7 @@
void setTimestamp(double value)
{
- InspectorObjectBase::setNumber(ASCIILiteral("timestamp"), value);
+ InspectorObjectBase::setDouble(ASCIILiteral("timestamp"), value);
}
void setValues(PassRefPtr<Inspector::InspectorObject> value)
@@ -498,7 +498,7 @@
Builder<STATE | TimestampSet>& setTimestamp(double value)
{
COMPILE_ASSERT(!(STATE & TimestampSet), property_timestamp_already_set);
- m_result->setNumber(ASCIILiteral("timestamp"), value);
+ m_result->setDouble(ASCIILiteral("timestamp"), value);
return castState<TimestampSet>();
}
@@ -699,7 +699,7 @@
Builder<STATE | TimestampSet>& setTimestamp(double value)
{
COMPILE_ASSERT(!(STATE & TimestampSet), property_timestamp_already_set);
- m_result->setNumber(ASCIILiteral("timestamp"), value);
+ m_result->setDouble(ASCIILiteral("timestamp"), value);
return castState<TimestampSet>();
}
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result (173553 => 173554)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result 2014-09-12 04:53:35 UTC (rev 173554)
@@ -350,7 +350,7 @@
Builder<STATE | NumberSet>& setNumber(int value)
{
COMPILE_ASSERT(!(STATE & NumberSet), property_number_already_set);
- m_result->setNumber(ASCIILiteral("number"), value);
+ m_result->setInteger(ASCIILiteral("number"), value);
return castState<NumberSet>();
}
@@ -364,7 +364,7 @@
Builder<STATE | IdSet>& setId(int value)
{
COMPILE_ASSERT(!(STATE & IdSet), property_id_already_set);
- m_result->setNumber(ASCIILiteral("id"), value);
+ m_result->setInteger(ASCIILiteral("id"), value);
return castState<IdSet>();
}
Modified: trunk/Source/_javascript_Core/replay/EncodedValue.cpp (173553 => 173554)
--- trunk/Source/_javascript_Core/replay/EncodedValue.cpp 2014-09-12 04:19:03 UTC (rev 173553)
+++ trunk/Source/_javascript_Core/replay/EncodedValue.cpp 2014-09-12 04:53:35 UTC (rev 173554)
@@ -112,7 +112,7 @@
template<> double EncodedValue::convertTo<double>()
{
double result;
- bool castSucceeded = m_value->asNumber(&result);
+ bool castSucceeded = m_value->asDouble(&result);
ASSERT_UNUSED(castSucceeded, castSucceeded);
return result;
@@ -121,7 +121,7 @@
template<> float EncodedValue::convertTo<float>()
{
float result;
- bool castSucceeded = m_value->asNumber(&result);
+ bool castSucceeded = m_value->asDouble(&result);
ASSERT_UNUSED(castSucceeded, castSucceeded);
return result;
@@ -130,7 +130,7 @@
template<> int32_t EncodedValue::convertTo<int32_t>()
{
int32_t result;
- bool castSucceeded = m_value->asNumber(&result);
+ bool castSucceeded = m_value->asInteger(&result);
ASSERT_UNUSED(castSucceeded, castSucceeded);
return result;
@@ -139,7 +139,7 @@
template<> int64_t EncodedValue::convertTo<int64_t>()
{
int64_t result;
- bool castSucceeded = m_value->asNumber(&result);
+ bool castSucceeded = m_value->asInteger(&result);
ASSERT_UNUSED(castSucceeded, castSucceeded);
return result;
@@ -148,7 +148,7 @@
template<> uint32_t EncodedValue::convertTo<uint32_t>()
{
uint32_t result;
- bool castSucceeded = m_value->asNumber(&result);
+ bool castSucceeded = m_value->asInteger(&result);
ASSERT_UNUSED(castSucceeded, castSucceeded);
return result;
@@ -157,7 +157,7 @@
template<> uint64_t EncodedValue::convertTo<uint64_t>()
{
uint64_t result;
- bool castSucceeded = m_value->asNumber(&result);
+ bool castSucceeded = m_value->asInteger(&result);
ASSERT_UNUSED(castSucceeded, castSucceeded);
return result;
Modified: trunk/Source/WebCore/ChangeLog (173553 => 173554)
--- 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)
@@ -1,3 +1,57 @@
+2014-09-11 Brian J. Burg <[email protected]>
+
+ 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):
+
2014-09-11 Ryuan Choi <[email protected]>
[EFL][CoordinatedGraphics] Move CoordinatedGraphicsScene and CoordinatedBackingStore to WebKit2
Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (173553 => 173554)
--- 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)
@@ -119,14 +119,14 @@
int r;
int g;
int b;
- bool success = (*colorObject)->getNumber("r", &r);
- success |= (*colorObject)->getNumber("g", &g);
- success |= (*colorObject)->getNumber("b", &b);
+ bool success = (*colorObject)->getInteger("r", &r);
+ success |= (*colorObject)->getInteger("g", &g);
+ success |= (*colorObject)->getInteger("b", &b);
if (!success)
return Color::transparent;
double a;
- success = (*colorObject)->getNumber("a", &a);
+ success = (*colorObject)->getDouble("a", &a);
if (!success)
return Color(r, g, b);
@@ -154,7 +154,7 @@
if (quadArray->length() != coordinatesInQuad)
return false;
for (size_t i = 0; i < coordinatesInQuad; ++i) {
- if (!quadArray->get(i)->asNumber(coordinates + i))
+ if (!quadArray->get(i)->asDouble(coordinates + i))
return false;
}
quad->setP1(FloatPoint(coordinates[0], coordinates[1]));
@@ -899,7 +899,7 @@
return;
}
int nodeId = 0;
- if (!nodeValue->asNumber(&nodeId)) {
+ if (!nodeValue->asInteger(&nodeId)) {
*errorString = "Invalid nodeIds item type. Expecting integer types.";
return;
}
Modified: trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp (173553 => 173554)
--- 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)
@@ -328,7 +328,7 @@
int breakpointOwnerNodeId = m_domAgent->boundNodeId(breakpointOwner);
ASSERT(breakpointOwnerNodeId);
- description->setNumber("nodeId", breakpointOwnerNodeId);
+ description->setInteger("nodeId", breakpointOwnerNodeId);
description->setString("type", domTypeName(breakpointType));
}
Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (173553 => 173554)
--- 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)
@@ -336,7 +336,7 @@
if (type == number) {
double number;
- if (!key->getNumber("number", &number))
+ if (!key->getDouble("number", &number))
return nullptr;
idbKey = IDBKey::createNumber(number);
} else if (type == string) {
@@ -346,7 +346,7 @@
idbKey = IDBKey::createString(string);
} else if (type == date) {
double date;
- if (!key->getNumber("date", &date))
+ if (!key->getDouble("date", &date))
return nullptr;
idbKey = IDBKey::createDate(date);
} else if (type == array) {
Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (173553 => 173554)
--- 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)
@@ -333,18 +333,18 @@
static PassRefPtr<InspectorObject> buildObjectForPoint(const FloatPoint& point)
{
RefPtr<InspectorObject> object = InspectorObject::create();
- object->setNumber(ASCIILiteral("x"), point.x());
- object->setNumber(ASCIILiteral("y"), point.y());
+ object->setDouble(ASCIILiteral("x"), point.x());
+ object->setDouble(ASCIILiteral("y"), point.y());
return object.release();
}
static PassRefPtr<InspectorObject> buildObjectForRect(const FloatRect& rect)
{
RefPtr<InspectorObject> object = InspectorObject::create();
- object->setNumber(ASCIILiteral("x"), rect.x());
- object->setNumber(ASCIILiteral("y"), rect.y());
- object->setNumber(ASCIILiteral("width"), rect.width());
- object->setNumber(ASCIILiteral("height"), rect.height());
+ object->setDouble(ASCIILiteral("x"), rect.x());
+ object->setDouble(ASCIILiteral("y"), rect.y());
+ object->setDouble(ASCIILiteral("width"), rect.width());
+ object->setDouble(ASCIILiteral("height"), rect.height());
return object.release();
}
@@ -440,8 +440,8 @@
static PassRefPtr<InspectorObject> buildObjectForSize(const IntSize& size)
{
RefPtr<InspectorObject> result = InspectorObject::create();
- result->setNumber("width", size.width());
- result->setNumber("height", size.height());
+ result->setInteger("width", size.width());
+ result->setInteger("height", size.height());
return result.release();
}
@@ -599,8 +599,8 @@
for (unsigned i = 0; i < length; i++) {
point = info->shapeOutsideInfo->shapeToRendererPoint(points[i]);
point = localPointToRoot(info->renderer, info->rootView, info->view, point);
- info->array->pushNumber(point.x());
- info->array->pushNumber(point.y());
+ info->array->pushDouble(point.x());
+ info->array->pushDouble(point.y());
}
}
@@ -859,7 +859,7 @@
void InspectorOverlay::reset(const IntSize& viewportSize, const IntSize& frameViewFullSize)
{
RefPtr<InspectorObject> resetData = InspectorObject::create();
- resetData->setNumber("deviceScaleFactor", m_page.deviceScaleFactor());
+ resetData->setDouble("deviceScaleFactor", m_page.deviceScaleFactor());
resetData->setObject("viewportSize", buildObjectForSize(viewportSize));
resetData->setObject("frameViewFullSize", buildObjectForSize(frameViewFullSize));
evaluateInOverlay("reset", resetData.release());
Modified: trunk/Source/WebCore/inspector/InspectorReplayAgent.cpp (173553 => 173554)
--- 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)
@@ -340,12 +340,12 @@
void InspectorReplayAgent::replayToPosition(ErrorString* errorString, const RefPtr<InspectorObject>& positionObject, bool fastReplay)
{
ReplayPosition position;
- if (!positionObject->getNumber(ASCIILiteral("segmentOffset"), &position.segmentOffset)) {
+ if (!positionObject->getInteger(ASCIILiteral("segmentOffset"), &position.segmentOffset)) {
*errorString = ASCIILiteral("Couldn't decode ReplayPosition segment offset provided to ReplayAgent.replayToPosition.");
return;
}
- if (!positionObject->getNumber(ASCIILiteral("inputOffset"), &position.inputOffset)) {
+ if (!positionObject->getInteger(ASCIILiteral("inputOffset"), &position.inputOffset)) {
*errorString = ASCIILiteral("Couldn't decode ReplayPosition input offset provided to ReplayAgent.replayToPosition.");
return;
}
Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.h (173553 => 173554)
--- 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)
@@ -69,7 +69,7 @@
return;
RefPtr<Inspector::InspectorValue> ordinalValue = value->get("ordinal");
- if (!ordinalValue || !ordinalValue->asNumber(&m_ordinal))
+ if (!ordinalValue || !ordinalValue->asInteger(&m_ordinal))
m_styleSheetId = "";
}
Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (173553 => 173554)
--- 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)
@@ -356,7 +356,7 @@
{
if (!m_recordStack.isEmpty()) {
const TimelineRecordEntry& entry = m_recordStack.last();
- entry.data->setNumber("endLine", endLine);
+ entry.data->setInteger("endLine", endLine);
didCompleteCurrentRecord(TimelineRecordType::ParseHTML);
}
}
@@ -670,7 +670,7 @@
{
entry.record->setObject(ASCIILiteral("data"), entry.data);
entry.record->setArray(ASCIILiteral("children"), entry.children);
- entry.record->setNumber(ASCIILiteral("endTime"), timestamp());
+ entry.record->setDouble(ASCIILiteral("endTime"), timestamp());
addRecordToTimeline(entry.record, entry.type);
}
Modified: trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp (173553 => 173554)
--- 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)
@@ -56,7 +56,7 @@
PassRefPtr<InspectorObject> TimelineRecordFactory::createGenericRecord(double startTime, int maxCallStackDepth)
{
RefPtr<InspectorObject> record = InspectorObject::create();
- record->setNumber("startTime", startTime);
+ record->setDouble("startTime", startTime);
if (maxCallStackDepth) {
RefPtr<ScriptCallStack> stackTrace = createScriptCallStack(JSMainThreadExecState::currentState(), maxCallStackDepth);
@@ -69,7 +69,7 @@
PassRefPtr<InspectorObject> TimelineRecordFactory::createBackgroundRecord(double startTime, const String& threadName)
{
RefPtr<InspectorObject> record = InspectorObject::create();
- record->setNumber("startTime", startTime);
+ record->setDouble("startTime", startTime);
record->setString("thread", threadName);
return record.release();
}
@@ -77,7 +77,7 @@
PassRefPtr<InspectorObject> TimelineRecordFactory::createGCEventData(const size_t usedHeapSizeDelta)
{
RefPtr<InspectorObject> data = ""
- data->setNumber("usedHeapSizeDelta", usedHeapSizeDelta);
+ data->setInteger("usedHeapSizeDelta", usedHeapSizeDelta);
return data.release();
}
@@ -85,7 +85,7 @@
{
RefPtr<InspectorObject> data = ""
data->setString("scriptName", scriptName);
- data->setNumber("scriptLine", scriptLine);
+ data->setInteger("scriptLine", scriptLine);
return data.release();
}
@@ -99,8 +99,8 @@
PassRefPtr<InspectorObject> TimelineRecordFactory::createProbeSampleData(const ScriptBreakpointAction& action, int hitCount)
{
RefPtr<InspectorObject> data = ""
- data->setNumber(ASCIILiteral("probeId"), action.identifier);
- data->setNumber(ASCIILiteral("hitCount"), hitCount);
+ data->setInteger(ASCIILiteral("probeId"), action.identifier);
+ data->setInteger(ASCIILiteral("hitCount"), hitCount);
return data.release();
}
@@ -114,15 +114,15 @@
PassRefPtr<InspectorObject> TimelineRecordFactory::createGenericTimerData(int timerId)
{
RefPtr<InspectorObject> data = ""
- data->setNumber("timerId", timerId);
+ data->setInteger("timerId", timerId);
return data.release();
}
PassRefPtr<InspectorObject> TimelineRecordFactory::createTimerInstallData(int timerId, int timeout, bool singleShot)
{
RefPtr<InspectorObject> data = ""
- data->setNumber("timerId", timerId);
- data->setNumber("timeout", timeout);
+ data->setInteger("timerId", timerId);
+ data->setInteger("timeout", timeout);
data->setBoolean("singleShot", singleShot);
return data.release();
}
@@ -131,7 +131,7 @@
{
RefPtr<InspectorObject> data = ""
data->setString("url", url);
- data->setNumber("readyState", readyState);
+ data->setInteger("readyState", readyState);
return data.release();
}
@@ -146,7 +146,7 @@
{
RefPtr<InspectorObject> data = ""
data->setString("url", url);
- data->setNumber("lineNumber", lineNumber);
+ data->setInteger("lineNumber", lineNumber);
return data.release();
}
@@ -177,7 +177,7 @@
{
RefPtr<InspectorObject> data = ""
data->setString("requestId", requestId);
- data->setNumber("statusCode", response.httpStatusCode());
+ data->setInteger("statusCode", response.httpStatusCode());
data->setString("mimeType", response.mimeType());
return data.release();
}
@@ -188,7 +188,7 @@
data->setString("requestId", requestId);
data->setBoolean("didFail", didFail);
if (finishTime)
- data->setNumber("networkTime", finishTime);
+ data->setDouble("networkTime", finishTime);
return data.release();
}
@@ -196,15 +196,15 @@
{
RefPtr<InspectorObject> data = ""
data->setString("requestId", requestId);
- data->setNumber("encodedDataLength", length);
+ data->setInteger("encodedDataLength", length);
return data.release();
}
PassRefPtr<InspectorObject> TimelineRecordFactory::createLayoutData(unsigned dirtyObjects, unsigned totalObjects, bool partialLayout)
{
RefPtr<InspectorObject> data = ""
- data->setNumber("dirtyObjects", dirtyObjects);
- data->setNumber("totalObjects", totalObjects);
+ data->setInteger("dirtyObjects", dirtyObjects);
+ data->setInteger("totalObjects", totalObjects);
data->setBoolean("partialLayout", partialLayout);
return data.release();
}
@@ -233,28 +233,28 @@
PassRefPtr<InspectorObject> TimelineRecordFactory::createParseHTMLData(unsigned startLine)
{
RefPtr<InspectorObject> data = ""
- data->setNumber("startLine", startLine);
+ data->setInteger("startLine", startLine);
return data.release();
}
PassRefPtr<InspectorObject> TimelineRecordFactory::createAnimationFrameData(int callbackId)
{
RefPtr<InspectorObject> data = ""
- data->setNumber("id", callbackId);
+ data->setInteger("id", callbackId);
return data.release();
}
static PassRefPtr<InspectorArray> createQuad(const FloatQuad& quad)
{
RefPtr<InspectorArray> array = InspectorArray::create();
- 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());
+ 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());
return array.release();
}
Modified: trunk/Source/WebCore/inspector/TimelineRecordFactory.h (173553 => 173554)
--- 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)
@@ -111,7 +111,7 @@
static inline PassRefPtr<Inspector::InspectorObject> createWebSocketCreateData(unsigned long identifier, const URL& url, const String& protocol)
{
RefPtr<Inspector::InspectorObject> data = ""
- data->setNumber("identifier", identifier);
+ data->setInteger("identifier", identifier);
data->setString("url", url.string());
if (!protocol.isNull())
data->setString("webSocketProtocol", protocol);
@@ -121,7 +121,7 @@
static inline PassRefPtr<Inspector::InspectorObject> createGenericWebSocketData(unsigned long identifier)
{
RefPtr<Inspector::InspectorObject> data = ""
- data->setNumber("identifier", identifier);
+ data->setInteger("identifier", identifier);
return data.release();
}
#endif
Modified: trunk/Source/WebCore/page/ContentSecurityPolicy.cpp (173553 => 173554)
--- 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)
@@ -1661,7 +1661,7 @@
if (callFrame && callFrame->lineNumber()) {
URL source = URL(URL(), callFrame->sourceURL());
cspReport->setString(ASCIILiteral("source-file"), stripURLForUseInReport(document, source));
- cspReport->setNumber(ASCIILiteral("line-number"), callFrame->lineNumber());
+ cspReport->setInteger(ASCIILiteral("line-number"), callFrame->lineNumber());
}
RefPtr<InspectorObject> reportObject = InspectorObject::create();