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

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

Issue 2681233004: Make External per-window rather than a static Persistent. (Closed)
Patch Set: Created 3 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 | « third_party/WebKit/Source/core/frame/DOMWindow.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/DOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMWindow.cpp b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
index 934330219586b487fa5da3e0682a892ab0448231..537b92df46bca3027a311a3cc1dc9e61cd59d3ca 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
@@ -107,9 +107,10 @@ DOMWindow* DOMWindow::top() const {
return frame()->tree().top()->domWindow();
}
-External* DOMWindow::external() const {
- DEFINE_STATIC_LOCAL(Persistent<External>, external, (new External));
- return external;
+External* DOMWindow::external() {
+ if (!m_external)
+ m_external = new External;
+ return m_external;
}
DOMWindow* DOMWindow::anonymousIndexedGetter(uint32_t index) const {
@@ -434,6 +435,7 @@ void DOMWindow::focus(ExecutionContext* context) {
DEFINE_TRACE(DOMWindow) {
visitor->trace(m_location);
+ visitor->trace(m_external);
EventTargetWithInlineData::trace(visitor);
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698