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

Unified Diff: third_party/WebKit/Source/core/page/Page.cpp

Issue 2901353002: Move blink::PluginData, blink::PluginInfo, blink::MimeTypeInfo to oilpan heap. (Closed)
Patch Set: nits, remove dead code Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/page/Page.h ('k') | third_party/WebKit/Source/modules/plugins/DOMMimeType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/Page.cpp
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
index 6dc4b2180bc29db3eaaf4c604531a8cad016befb..f4992eac2723f8a0a80d53b6961334b7729972a4 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -116,6 +116,7 @@ Page::Page(PageClients& page_clients)
overscroll_controller_(
OverscrollController::Create(GetVisualViewport(), GetChromeClient())),
main_frame_(nullptr),
+ plugin_data_(nullptr),
editor_client_(page_clients.editor_client),
spell_checker_client_(page_clients.spell_checker_client),
use_counter_(page_clients.chrome_client &&
@@ -290,14 +291,18 @@ void Page::RefreshPlugins() {
for (const Page* page : AllPages()) {
// Clear out the page's plugin data.
if (page->plugin_data_)
- page->plugin_data_ = nullptr;
+ page->plugin_data_->ResetPluginData();
}
}
-PluginData* Page::GetPluginData(SecurityOrigin* main_frame_origin) const {
- if (!plugin_data_ ||
+PluginData* Page::GetPluginData(SecurityOrigin* main_frame_origin) {
+ if (!plugin_data_)
+ plugin_data_ = PluginData::Create();
+
+ if (!plugin_data_->Origin() ||
!main_frame_origin->IsSameSchemeHostPort(plugin_data_->Origin()))
- plugin_data_ = PluginData::Create(main_frame_origin);
+ plugin_data_->UpdatePluginList(main_frame_origin);
+
return plugin_data_.Get();
}
@@ -628,6 +633,7 @@ DEFINE_TRACE(Page) {
visitor->Trace(visual_viewport_);
visitor->Trace(overscroll_controller_);
visitor->Trace(main_frame_);
+ visitor->Trace(plugin_data_);
visitor->Trace(validation_message_client_);
visitor->Trace(use_counter_);
Supplementable<Page>::Trace(visitor);
« no previous file with comments | « third_party/WebKit/Source/core/page/Page.h ('k') | third_party/WebKit/Source/modules/plugins/DOMMimeType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698