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

Side by Side Diff: src/inspector/V8HeapProfilerAgentImpl.cpp

Issue 2339173004: Revert of [inspector] fixed all shorten-64-to-32 warnings (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/inspector/V8FunctionCall.cpp ('k') | src/inspector/V8InternalValueType.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/inspector/V8HeapProfilerAgentImpl.h" 5 #include "src/inspector/V8HeapProfilerAgentImpl.h"
6 6
7 #include "src/inspector/InjectedScript.h" 7 #include "src/inspector/InjectedScript.h"
8 #include "src/inspector/StringUtil.h" 8 #include "src/inspector/StringUtil.h"
9 #include "src/inspector/V8Debugger.h" 9 #include "src/inspector/V8Debugger.h"
10 #include "src/inspector/V8InspectorImpl.h" 10 #include "src/inspector/V8InspectorImpl.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 String16* heapSnapshotObjectId) { 287 String16* heapSnapshotObjectId) {
288 v8::HandleScope handles(m_isolate); 288 v8::HandleScope handles(m_isolate);
289 v8::Local<v8::Value> value; 289 v8::Local<v8::Value> value;
290 v8::Local<v8::Context> context; 290 v8::Local<v8::Context> context;
291 if (!m_session->unwrapObject(errorString, objectId, &value, &context, 291 if (!m_session->unwrapObject(errorString, objectId, &value, &context,
292 nullptr) || 292 nullptr) ||
293 value->IsUndefined()) 293 value->IsUndefined())
294 return; 294 return;
295 295
296 v8::SnapshotObjectId id = m_isolate->GetHeapProfiler()->GetObjectId(value); 296 v8::SnapshotObjectId id = m_isolate->GetHeapProfiler()->GetObjectId(value);
297 *heapSnapshotObjectId = String16::fromInteger(static_cast<size_t>(id)); 297 *heapSnapshotObjectId = String16::fromInteger(id);
298 } 298 }
299 299
300 void V8HeapProfilerAgentImpl::requestHeapStatsUpdate() { 300 void V8HeapProfilerAgentImpl::requestHeapStatsUpdate() {
301 HeapStatsStream stream(&m_frontend); 301 HeapStatsStream stream(&m_frontend);
302 v8::SnapshotObjectId lastSeenObjectId = 302 v8::SnapshotObjectId lastSeenObjectId =
303 m_isolate->GetHeapProfiler()->GetHeapStats(&stream); 303 m_isolate->GetHeapProfiler()->GetHeapStats(&stream);
304 m_frontend.lastSeenObjectId( 304 m_frontend.lastSeenObjectId(
305 lastSeenObjectId, m_session->inspector()->client()->currentTimeMS()); 305 lastSeenObjectId, m_session->inspector()->client()->currentTimeMS());
306 } 306 }
307 307
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 *errorString = "Cannot access v8 sampled heap profile."; 398 *errorString = "Cannot access v8 sampled heap profile.";
399 return; 399 return;
400 } 400 }
401 v8::AllocationProfile::Node* root = v8Profile->GetRootNode(); 401 v8::AllocationProfile::Node* root = v8Profile->GetRootNode();
402 *profile = protocol::HeapProfiler::SamplingHeapProfile::create() 402 *profile = protocol::HeapProfiler::SamplingHeapProfile::create()
403 .setHead(buildSampingHeapProfileNode(root)) 403 .setHead(buildSampingHeapProfileNode(root))
404 .build(); 404 .build();
405 } 405 }
406 406
407 } // namespace v8_inspector 407 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/V8FunctionCall.cpp ('k') | src/inspector/V8InternalValueType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698