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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp

Issue 1779033003: DevTools: always use 16bit strings for inspector protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 years, 9 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/core/inspector/InspectorHeapProfilerAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
index b24a92b1d1d48f497d0b66e4cbb8258a3dc9975e..2116fb3350c1af3ee4d6b63faed35263b133e19f 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
@@ -172,7 +172,7 @@ void InspectorHeapProfilerAgent::takeHeapSnapshot(ErrorString* errorString, cons
void InspectorHeapProfilerAgent::getObjectByHeapObjectId(ErrorString* error, const String16& heapSnapshotObjectId, const protocol::Maybe<String16>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* result)
{
bool ok;
- unsigned id = heapSnapshotObjectId.toUInt(&ok);
+ int id = heapSnapshotObjectId.toInt(&ok);
if (!ok) {
*error = "Invalid heap snapshot object id";
return;
@@ -189,7 +189,7 @@ void InspectorHeapProfilerAgent::getObjectByHeapObjectId(ErrorString* error, con
void InspectorHeapProfilerAgent::addInspectedHeapObject(ErrorString* error, const String16& inspectedHeapObjectId)
{
bool ok;
- unsigned id = inspectedHeapObjectId.toUInt(&ok);
+ int id = inspectedHeapObjectId.toInt(&ok);
if (!ok) {
*error = "Invalid heap snapshot object id";
return;
@@ -208,11 +208,11 @@ void InspectorHeapProfilerAgent::getHeapObjectId(ErrorString* errorString, const
m_v8HeapProfilerAgent->getHeapObjectId(errorString, objectId, heapSnapshotObjectId);
}
-bool InspectorHeapProfilerAgent::isInspectableHeapObject(unsigned id)
+bool InspectorHeapProfilerAgent::isInspectableHeapObject(int id)
{
v8::HandleScope scope(m_isolate);
v8::HeapProfiler* profiler = m_isolate->GetHeapProfiler();
- v8::Local<v8::Value> value = profiler->FindObjectById(id);
+ v8::Local<v8::Value> value = profiler->FindObjectById(static_cast<unsigned>(id));
if (value.IsEmpty() || !value->IsObject())
return false;
v8::Local<v8::Object> object = value.As<v8::Object>();

Powered by Google App Engine
This is Rietveld 408576698