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

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

Issue 2151083002: DevTools: explicitly differentiate ints vs doubles in the protocol bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 5 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 9a2a6c00886e96fffb3fcf36fc75c6dbce88eab4..e9aaf26d51e028b04d748d6f2e607375505a041f 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp
@@ -19,7 +19,7 @@ std::unique_ptr<protocol::DictionaryValue> RemoteObjectIdBase::parseInjectedScri
return nullptr;
std::unique_ptr<protocol::DictionaryValue> parsedObjectId(protocol::DictionaryValue::cast(parsedValue.release()));
- bool success = parsedObjectId->getNumber("injectedScriptId", &m_injectedScriptId);
+ bool success = parsedObjectId->getInteger("injectedScriptId", &m_injectedScriptId);
if (success)
return parsedObjectId;
return nullptr;
@@ -36,7 +36,7 @@ std::unique_ptr<RemoteObjectId> RemoteObjectId::parse(ErrorString* errorString,
return nullptr;
}
- bool success = parsedObjectId->getNumber("id", &result->m_id);
+ bool success = parsedObjectId->getInteger("id", &result->m_id);
if (!success) {
*errorString = "Invalid remote object id";
return nullptr;
@@ -55,7 +55,7 @@ std::unique_ptr<RemoteCallFrameId> RemoteCallFrameId::parse(ErrorString* errorSt
return nullptr;
}
- bool success = parsedObjectId->getNumber("ordinal", &result->m_frameOrdinal);
+ bool success = parsedObjectId->getInteger("ordinal", &result->m_frameOrdinal);
if (!success) {
*errorString = "Invalid call frame id";
return nullptr;
@@ -66,7 +66,7 @@ std::unique_ptr<RemoteCallFrameId> RemoteCallFrameId::parse(ErrorString* errorSt
String16 RemoteCallFrameId::serialize(int injectedScriptId, int frameOrdinal)
{
- return "{\"ordinal\":" + String16::number(frameOrdinal) + ",\"injectedScriptId\":" + String16::number(injectedScriptId) + "}";
+ return "{\"ordinal\":" + String16::fromInteger(frameOrdinal) + ",\"injectedScriptId\":" + String16::fromInteger(injectedScriptId) + "}";
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698