| Index: third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_cpp.template
|
| diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_cpp.template b/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_cpp.template
|
| index 7d9170a37879f219f88e661040b4229df2170753..95538cf34e26beb0010b07635175eb242ee39452 100644
|
| --- a/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_cpp.template
|
| +++ b/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_cpp.template
|
| @@ -71,7 +71,7 @@
|
| {% endfor %}
|
|
|
| template<typename R, typename V, typename V0>
|
| - static R getPropertyValueImpl(JSONObject* object, const char* name, bool* valueFound, JSONArray* protocolErrors, V0 initial_value, bool (*as_method)(PassRefPtr<JSONValue>, V*), const char* type_name);
|
| + static R getPropertyValueImpl(JSONObject* object, const char* name, bool* valueFound, JSONArray* protocolErrors, V0 initial_value, bool (*as_method)(JSONValue*, V*), const char* type_name);
|
|
|
| static OptionalValue<int> getInteger(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
|
| static OptionalValue<double> getNumber(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
|
| @@ -213,7 +213,7 @@
|
| int callId = 0;
|
| RefPtr<JSONValue> parsedMessage = parseJSON(message);
|
| ASSERT(parsedMessage);
|
| - RefPtr<JSONObject> messageObject = JSONObject::cast(parsedMessage.release());
|
| + RefPtr<JSONObject> messageObject = parsedMessage->asObject();
|
| ASSERT(messageObject);
|
|
|
| RefPtr<JSONValue> callIdValue = messageObject->get("id");
|
| @@ -273,7 +273,7 @@
|
| }
|
|
|
| template<typename R, typename V, typename V0>
|
| -R DispatcherImpl::getPropertyValueImpl(JSONObject* object, const char* name, bool* valueFound, JSONArray* protocolErrors, V0 initial_value, bool (*as_method)(PassRefPtr<JSONValue>, V*), const char* type_name)
|
| +R DispatcherImpl::getPropertyValueImpl(JSONObject* object, const char* name, bool* valueFound, JSONArray* protocolErrors, V0 initial_value, bool (*as_method)(JSONValue*, V*), const char* type_name)
|
| {
|
| ASSERT(protocolErrors);
|
|
|
| @@ -308,12 +308,12 @@
|
| }
|
|
|
| struct AsMethodBridges {
|
| - static bool asInteger(PassRefPtr<JSONValue> value, int* output) { return value->asNumber(output); }
|
| - static bool asNumber(PassRefPtr<JSONValue> value, double* output) { return value->asNumber(output); }
|
| - static bool asString(PassRefPtr<JSONValue> value, String* output) { return value->asString(output); }
|
| - static bool asBoolean(PassRefPtr<JSONValue> value, bool* output) { return value->asBoolean(output); }
|
| - static bool asObject(PassRefPtr<JSONValue> value, RefPtr<JSONObject>* output) { *output = JSONObject::cast(value); return *output; }
|
| - static bool asArray(PassRefPtr<JSONValue> value, RefPtr<JSONArray>* output) { *output = JSONArray::cast(value); return *output; }
|
| + static bool asInteger(JSONValue* value, int* output) { return value->asNumber(output); }
|
| + static bool asNumber(JSONValue* value, double* output) { return value->asNumber(output); }
|
| + static bool asString(JSONValue* value, String* output) { return value->asString(output); }
|
| + static bool asBoolean(JSONValue* value, bool* output) { return value->asBoolean(output); }
|
| + static bool asObject(JSONValue* value, RefPtr<JSONObject>* output) { return value->asObject(output); }
|
| + static bool asArray(JSONValue* value, RefPtr<JSONArray>* output) { return value->asArray(output); }
|
| };
|
|
|
| OptionalValue<int> DispatcherImpl::getInteger(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors)
|
| @@ -362,7 +362,7 @@
|
| if (!value)
|
| return false;
|
|
|
| - RefPtr<JSONObject> object = JSONObject::cast(value.release());
|
| + RefPtr<JSONObject> object = value->asObject();
|
| if (!object)
|
| return false;
|
|
|
|
|