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

Side by Side Diff: chrome/renderer/chrome_render_process_observer.cc

Issue 12398007: Replaced deprecated v8 API calls by their non-deprecated counterparts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium 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 "chrome/renderer/chrome_render_process_observer.h" 5 #include "chrome/renderer/chrome_render_process_observer.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/allocator/allocator_extension.h" 10 #include "base/allocator/allocator_extension.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 base::FieldTrial* trial = 281 base::FieldTrial* trial =
282 base::FieldTrialList::CreateFieldTrial(field_trial_name, group_name); 282 base::FieldTrialList::CreateFieldTrial(field_trial_name, group_name);
283 // Ensure the trial is marked as "used" by calling group() on it. This is 283 // Ensure the trial is marked as "used" by calling group() on it. This is
284 // needed to ensure the trial is properly reported in renderer crash reports. 284 // needed to ensure the trial is properly reported in renderer crash reports.
285 trial->group(); 285 trial->group();
286 chrome_variations::SetChildProcessLoggingVariationList(); 286 chrome_variations::SetChildProcessLoggingVariationList();
287 } 287 }
288 288
289 void ChromeRenderProcessObserver::OnGetV8HeapStats() { 289 void ChromeRenderProcessObserver::OnGetV8HeapStats() {
290 v8::HeapStatistics heap_stats; 290 v8::HeapStatistics heap_stats;
291 v8::V8::GetHeapStatistics(&heap_stats); 291 v8::Isolate::GetCurrent()->GetHeapStatistics(&heap_stats);
jochen (gone - plz use gerrit) 2013/03/04 13:51:25 can you add a TODO that this doesn't include worke
Sven Panne 2013/03/04 15:01:46 Done, here and in MemoryUsageKB, which is basicall
292 RenderThread::Get()->Send(new ChromeViewHostMsg_V8HeapStats( 292 RenderThread::Get()->Send(new ChromeViewHostMsg_V8HeapStats(
293 heap_stats.total_heap_size(), heap_stats.used_heap_size())); 293 heap_stats.total_heap_size(), heap_stats.used_heap_size()));
294 } 294 }
295 295
296 void ChromeRenderProcessObserver::OnToggleWebKitSharedTimer(bool suspend) { 296 void ChromeRenderProcessObserver::OnToggleWebKitSharedTimer(bool suspend) {
297 RenderThread::Get()->ToggleWebKitSharedTimer(suspend); 297 RenderThread::Get()->ToggleWebKitSharedTimer(suspend);
298 } 298 }
299 299
300 void ChromeRenderProcessObserver::OnPurgeMemory() { 300 void ChromeRenderProcessObserver::OnPurgeMemory() {
301 RenderThread::Get()->EnsureWebKitInitialized(); 301 RenderThread::Get()->EnsureWebKitInitialized();
(...skipping 26 matching lines...) Expand all
328 if (clear_cache_pending_) { 328 if (clear_cache_pending_) {
329 clear_cache_pending_ = false; 329 clear_cache_pending_ = false;
330 WebCache::clear(); 330 WebCache::clear();
331 } 331 }
332 } 332 }
333 333
334 const RendererContentSettingRules* 334 const RendererContentSettingRules*
335 ChromeRenderProcessObserver::content_setting_rules() const { 335 ChromeRenderProcessObserver::content_setting_rules() const {
336 return &content_setting_rules_; 336 return &content_setting_rules_;
337 } 337 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698