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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2553983002: [TEST ONLY] Call MemoryPressure-related things in implicitClose()
Patch Set: Critical Created 4 years 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 | « no previous file | 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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 2845 matching lines...) Expand 10 before | Expand all | Expand 10 after
2856 2856
2857 void Document::implicitClose() { 2857 void Document::implicitClose() {
2858 DCHECK(!inStyleRecalc()); 2858 DCHECK(!inStyleRecalc());
2859 if (processingLoadEvent() || !m_parser) 2859 if (processingLoadEvent() || !m_parser)
2860 return; 2860 return;
2861 if (frame() && frame()->navigationScheduler().locationChangePending()) { 2861 if (frame() && frame()->navigationScheduler().locationChangePending()) {
2862 suppressLoadEvent(); 2862 suppressLoadEvent();
2863 return; 2863 return;
2864 } 2864 }
2865 2865
2866 // MemoryCoordinator::instance().onMemoryPressure(WebMemoryPressureLevelNone);
2867 // MemoryCoordinator::instance().onMemoryPressure(WebMemoryPressureLevelModera te);
2868 MemoryCoordinator::instance().onMemoryPressure(WebMemoryPressureLevelCritical) ;
2869 // MemoryCoordinator::instance().onMemoryStateChange(MemoryState::SUSPENDED);
2870 // MemoryCoordinator::instance().onMemoryStateChange(MemoryState::THROTTLED);
2871 // MemoryCoordinator::instance().onMemoryStateChange(MemoryState::NORMAL);
2872
2866 m_loadEventProgress = LoadEventInProgress; 2873 m_loadEventProgress = LoadEventInProgress;
2867 2874
2868 ScriptableDocumentParser* parser = scriptableDocumentParser(); 2875 ScriptableDocumentParser* parser = scriptableDocumentParser();
2869 m_wellFormed = parser && parser->wellFormed(); 2876 m_wellFormed = parser && parser->wellFormed();
2870 2877
2871 // We have to clear the parser, in case someone document.write()s from the 2878 // We have to clear the parser, in case someone document.write()s from the
2872 // onLoad event handler, as in Radar 3206524. 2879 // onLoad event handler, as in Radar 3206524.
2873 detachParser(); 2880 detachParser();
2874 2881
2875 if (frame() && frame()->script().canExecuteScripts(NotAboutToExecuteScript)) { 2882 if (frame() && frame()->script().canExecuteScripts(NotAboutToExecuteScript)) {
(...skipping 3667 matching lines...) Expand 10 before | Expand all | Expand 10 after
6543 } 6550 }
6544 6551
6545 void showLiveDocumentInstances() { 6552 void showLiveDocumentInstances() {
6546 WeakDocumentSet& set = liveDocumentSet(); 6553 WeakDocumentSet& set = liveDocumentSet();
6547 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6554 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6548 for (Document* document : set) 6555 for (Document* document : set)
6549 fprintf(stderr, "- Document %p URL: %s\n", document, 6556 fprintf(stderr, "- Document %p URL: %s\n", document,
6550 document->url().getString().utf8().data()); 6557 document->url().getString().utf8().data());
6551 } 6558 }
6552 #endif 6559 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698