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

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

Issue 2156803002: [HBD] Remove PluginCache and reload plugin list when origin changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move stored SecurityOrigin to PluginData Created 4 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 side-by-side diff with in-line comments
Download patch
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 4e2a89a2e20ff22690e5f00de814170cd6d4b0ce..9a8b1d37da5c4ce09bed84e7946b50022ecc130d 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -245,8 +245,10 @@ void Page::refreshPlugins()
PluginData* Page::pluginData() const
{
- if (!m_pluginData)
- m_pluginData = PluginData::create(this);
+ RefPtr<SecurityOrigin> mainFrameOrigin = mainFrame()->securityContext()->getSecurityOrigin();
+
+ if (!m_pluginData || !mainFrameOrigin->isSameSchemeHostPort(m_pluginData->origin()))
+ m_pluginData = PluginData::create(mainFrameOrigin);
return m_pluginData.get();
}

Powered by Google App Engine
This is Rietveld 408576698