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

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: Check existence of BlameContext before using it Created 4 years, 6 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 d4a05863b5abae030a8074773ca690dc531ff9b8..ce196174ba063c5b407dcd01fbb07ac19689bbb5 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -827,4 +827,17 @@ FrameNavigationDisabler::~FrameNavigationDisabler()
m_frame->enableNavigation();
}
+ScopedFrameBlamer::ScopedFrameBlamer(LocalFrame* frame)
+ : m_frame(frame)
+{
+ if (m_frame && m_frame->client())
+ m_frame->client()->frameBlameContext()->Enter();
+}
+
+ScopedFrameBlamer::~ScopedFrameBlamer()
+{
+ if (m_frame && m_frame->client())
+ m_frame->client()->frameBlameContext()->Leave();
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698