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

Unified Diff: content/browser/web_contents/navigation_controller_impl.cc

Issue 12086109: Prevent bindings escalation on an existing NavigationEntry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Catch another case where pending WebUI was set. Created 7 years, 10 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 | « no previous file | content/browser/web_contents/navigation_controller_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/navigation_controller_impl.cc
diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc
index a4ec35fb626b3b13b14125f0b7c86edc4d305d79..69516fbd9a4509a06050e4d45e3a05f2424d9367 100644
--- a/content/browser/web_contents/navigation_controller_impl.cc
+++ b/content/browser/web_contents/navigation_controller_impl.cc
@@ -926,6 +926,11 @@ bool NavigationControllerImpl::RendererDidNavigate(
// The active entry's SiteInstance should match our SiteInstance.
DCHECK(active_entry->site_instance() == web_contents_->GetSiteInstance());
+ // Remember the bindings the renderer process has at this point, so that
+ // we do not grant this entry additional bindings if we come back to it.
+ active_entry->SetBindings(
+ web_contents_->GetRenderViewHost()->GetEnabledBindings());
+
// Now prep the rest of the details for the notification and broadcast.
details->entry = active_entry;
details->is_main_frame =
« no previous file with comments | « no previous file | content/browser/web_contents/navigation_controller_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698