Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp

Issue 1738073002: DevTools: introduce protocol::Value, baseline for hierarchical data in remote debugging protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp b/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp
index 35542df790e3809fc77a68827a84b977c68bfc2b..35f715978b17d9542861b3c9a6b354cb0f32c925 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp
@@ -4,8 +4,8 @@
#include "platform/v8_inspector/RemoteObjectId.h"
-#include "platform/JSONParser.h"
-#include "platform/JSONValues.h"
+#include "platform/inspector_protocol/Parser.h"
+#include "platform/inspector_protocol/Values.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/text/WTFString.h"
@@ -14,13 +14,13 @@ namespace blink {
RemoteObjectIdBase::RemoteObjectIdBase() : m_injectedScriptId(0) { }
-PassRefPtr<JSONObject> RemoteObjectIdBase::parseInjectedScriptId(const String& objectId)
+PassRefPtr<protocol::DictionaryValue> RemoteObjectIdBase::parseInjectedScriptId(const String& objectId)
{
- RefPtr<JSONValue> parsedValue = parseJSON(objectId);
- if (!parsedValue || parsedValue->type() != JSONValue::TypeObject)
+ RefPtr<protocol::Value> parsedValue = protocol::parseJSON(objectId);
+ if (!parsedValue || parsedValue->type() != protocol::Value::TypeObject)
return nullptr;
- RefPtr<JSONObject> parsedObjectId = JSONObject::cast(parsedValue.release());
+ RefPtr<protocol::DictionaryValue> parsedObjectId = protocol::DictionaryValue::cast(parsedValue.release());
bool success = parsedObjectId->getNumber("injectedScriptId", &m_injectedScriptId);
if (success)
return parsedObjectId.release();
@@ -32,7 +32,7 @@ RemoteObjectId::RemoteObjectId() : RemoteObjectIdBase(), m_id(0) { }
PassOwnPtr<RemoteObjectId> RemoteObjectId::parse(const String& objectId)
{
OwnPtr<RemoteObjectId> result = adoptPtr(new RemoteObjectId());
- RefPtr<JSONObject> parsedObjectId = result->parseInjectedScriptId(objectId);
+ RefPtr<protocol::DictionaryValue> parsedObjectId = result->parseInjectedScriptId(objectId);
if (!parsedObjectId)
return nullptr;
@@ -47,7 +47,7 @@ RemoteCallFrameId::RemoteCallFrameId() : RemoteObjectIdBase(), m_frameOrdinal(0)
PassOwnPtr<RemoteCallFrameId> RemoteCallFrameId::parse(const String& objectId)
{
OwnPtr<RemoteCallFrameId> result = adoptPtr(new RemoteCallFrameId());
- RefPtr<JSONObject> parsedObjectId = result->parseInjectedScriptId(objectId);
+ RefPtr<protocol::DictionaryValue> parsedObjectId = result->parseInjectedScriptId(objectId);
if (!parsedObjectId)
return nullptr;
@@ -55,7 +55,7 @@ PassOwnPtr<RemoteCallFrameId> RemoteCallFrameId::parse(const String& objectId)
if (!success)
return nullptr;
- RefPtr<JSONValue> value = parsedObjectId->get("asyncOrdinal");
+ RefPtr<protocol::Value> value = parsedObjectId->get("asyncOrdinal");
if (value &&!value->asNumber(&result->m_asyncStackOrdinal))
return nullptr;
return result.release();

Powered by Google App Engine
This is Rietveld 408576698