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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 437623003: Fix testGetVisitedHistoryCallbackAfterDestroy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientVisitedHistoryTest.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 params.route_id); 1524 params.route_id);
1525 } 1525 }
1526 1526
1527 void RenderThreadImpl::OnMemoryPressure( 1527 void RenderThreadImpl::OnMemoryPressure(
1528 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { 1528 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) {
1529 base::allocator::ReleaseFreeMemory(); 1529 base::allocator::ReleaseFreeMemory();
1530 1530
1531 // Trigger full v8 garbage collection on critical memory notification. This 1531 // Trigger full v8 garbage collection on critical memory notification. This
1532 // will potentially hang the renderer for a long time, however, when we 1532 // will potentially hang the renderer for a long time, however, when we
1533 // receive a memory pressure notification, we might be about to be killed. 1533 // receive a memory pressure notification, we might be about to be killed.
1534 if (blink::mainThreadIsolate()) { 1534 if (webkit_platform_support_ && blink::mainThreadIsolate()) {
1535 blink::mainThreadIsolate()->LowMemoryNotification(); 1535 blink::mainThreadIsolate()->LowMemoryNotification();
1536 } 1536 }
1537 1537
1538 if (memory_pressure_level == 1538 if (memory_pressure_level ==
1539 base::MemoryPressureListener::MEMORY_PRESSURE_CRITICAL) { 1539 base::MemoryPressureListener::MEMORY_PRESSURE_CRITICAL) {
1540 if (webkit_platform_support_) { 1540 if (webkit_platform_support_) {
1541 // Clear the image cache. Do not call into blink if it is not initialized. 1541 // Clear the image cache. Do not call into blink if it is not initialized.
1542 blink::WebImageCache::clear(); 1542 blink::WebImageCache::clear();
1543 } 1543 }
1544 1544
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 hidden_widget_count_--; 1613 hidden_widget_count_--;
1614 1614
1615 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1615 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1616 return; 1616 return;
1617 } 1617 }
1618 1618
1619 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1619 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1620 } 1620 }
1621 1621
1622 } // namespace content 1622 } // namespace content
OLDNEW
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientVisitedHistoryTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698