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

Side by Side Diff: third_party/WebKit/Source/web/WebKit.cpp

Issue 1900583002: Abandon prerenders upon render thread shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "bindings/core/v8/V8GCController.h" 35 #include "bindings/core/v8/V8GCController.h"
36 #include "bindings/core/v8/V8Initializer.h" 36 #include "bindings/core/v8/V8Initializer.h"
37 #include "core/animation/AnimationClock.h" 37 #include "core/animation/AnimationClock.h"
38 #include "core/page/Page.h" 38 #include "core/page/Page.h"
39 #include "gin/public/v8_platform.h" 39 #include "gin/public/v8_platform.h"
40 #include "modules/ModulesInitializer.h" 40 #include "modules/ModulesInitializer.h"
41 #include "platform/LayoutTestSupport.h" 41 #include "platform/LayoutTestSupport.h"
42 #include "platform/Logging.h" 42 #include "platform/Logging.h"
43 #include "platform/heap/Heap.h" 43 #include "platform/heap/Heap.h"
44 #include "public/platform/Platform.h" 44 #include "public/platform/Platform.h"
45 #include "public/platform/WebPrerenderingSupport.h"
45 #include "public/platform/WebThread.h" 46 #include "public/platform/WebThread.h"
46 #include "wtf/Assertions.h" 47 #include "wtf/Assertions.h"
47 #include "wtf/WTF.h" 48 #include "wtf/WTF.h"
48 #include "wtf/allocator/Partitions.h" 49 #include "wtf/allocator/Partitions.h"
49 #include "wtf/text/AtomicString.h" 50 #include "wtf/text/AtomicString.h"
50 #include "wtf/text/TextEncoding.h" 51 #include "wtf/text/TextEncoding.h"
51 #include <v8.h> 52 #include <v8.h>
52 53
53 namespace blink { 54 namespace blink {
54 55
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // message loop, because the message loop is already destructed before 104 // message loop, because the message loop is already destructed before
104 // the shutdown() is called. 105 // the shutdown() is called.
105 delete s_endOfTaskRunner; 106 delete s_endOfTaskRunner;
106 s_endOfTaskRunner = nullptr; 107 s_endOfTaskRunner = nullptr;
107 } 108 }
108 109
109 V8Initializer::shutdownMainThread(); 110 V8Initializer::shutdownMainThread();
110 111
111 modulesInitializer().shutdown(); 112 modulesInitializer().shutdown();
112 113
114 if (WebPrerenderingSupport* prerender = WebPrerenderingSupport::current())
115 prerender->detachRenderer();
116
113 Platform::shutdown(); 117 Platform::shutdown();
114 } 118 }
115 119
116 v8::Isolate* mainThreadIsolate() 120 v8::Isolate* mainThreadIsolate()
117 { 121 {
118 return V8PerIsolateData::mainThreadIsolate(); 122 return V8PerIsolateData::mainThreadIsolate();
119 } 123 }
120 124
121 // TODO(tkent): The following functions to wrap LayoutTestSupport should be 125 // TODO(tkent): The following functions to wrap LayoutTestSupport should be
122 // moved to public/platform/. 126 // moved to public/platform/.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 DCHECK(!reloadPages); 174 DCHECK(!reloadPages);
171 Page::refreshPlugins(); 175 Page::refreshPlugins();
172 } 176 }
173 177
174 void decommitFreeableMemory() 178 void decommitFreeableMemory()
175 { 179 {
176 WTF::Partitions::decommitFreeableMemory(); 180 WTF::Partitions::decommitFreeableMemory();
177 } 181 }
178 182
179 } // namespace blink 183 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698