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

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: 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 5b61f07c93ceff26be57e184832764afa96c0edf..8403b85fa7fbdfa12b93296378a139a7823de277 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
@@ -167,7 +167,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;
@@ -184,7 +184,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;
@@ -203,11 +203,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