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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2028523002: Attribute Stuff to Frames with FrameBlamer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: UTC201606010826 Created 4 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
Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 39c12736e097ac15d5204c3786a700af17525bf3..c8b5f3b327e96a5d3a24eb75ff94da97ed656bb7 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -827,4 +827,19 @@ FrameNavigationDisabler::~FrameNavigationDisabler()
m_frame->enableNavigation();
}
+ScopedFrameBlamer::ScopedFrameBlamer(LocalFrame* frame)
+ : m_frameBlameContext(frame ? frame->client()->frameBlameContext() : nullptr)
+{
+ if (m_frameBlameContext) {
+ DCHECK(isMainThread());
+ m_frameBlameContext->Enter();
+ }
+}
+
+ScopedFrameBlamer::~ScopedFrameBlamer()
+{
+ if (m_frameBlameContext)
+ m_frameBlameContext->Leave();
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698