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

Unified Diff: content/browser/child_process_security_policy_impl.cc

Issue 1855383002: Add DumpWithoutCrashing to RenderFrameMessageFilter cookie kills (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@doghouse_now
Patch Set: Add second dump site. 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/child_process_security_policy_impl.cc
diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
index 34bad5ad0e55ab8d4a4ce2b2b788f511271de1e8..ed946fd37326d37a6ac7265e3346e54cca3bb59e 100644
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -10,6 +10,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
@@ -237,6 +238,9 @@ class ChildProcessSecurityPolicyImpl::SecurityState {
return origin_lock_ == site_gurl;
}
+ // TODO(nick): Remove this once we understand http://crbug.com/600441
+ GURL GetOriginLock() { return origin_lock_; }
+
void LockToOrigin(const GURL& gurl) {
origin_lock_ = gurl;
}
@@ -822,6 +826,18 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(int child_id,
return state->second->CanAccessDataForOrigin(gurl);
}
+// TODO(nick): Remove this once we understand http://crbug.com/600441
+std::unique_ptr<base::debug::ScopedCrashKey>
+ChildProcessSecurityPolicyImpl::GetOriginLockCrashKey(int child_id) {
+ base::AutoLock lock(lock_);
+ SecurityStateMap::iterator state = security_state_.find(child_id);
+ return base::WrapUnique(new base::debug::ScopedCrashKey(
+ "security_policy_origin_lock",
+ state == security_state_.end()
+ ? "not-found"
+ : state->second->GetOriginLock().possibly_invalid_spec()));
+}
+
void ChildProcessSecurityPolicyImpl::LockToOrigin(int child_id,
const GURL& gurl) {
// "gurl" can be currently empty in some cases, such as file://blah.
« no previous file with comments | « content/browser/child_process_security_policy_impl.h ('k') | content/browser/frame_host/render_frame_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698