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

Side by Side Diff: third_party/WebKit/Source/web/WebFrame.cpp

Issue 1635873003: Replicating WebFrame::uniqueName across renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump-render-tree3
Patch Set: Rebasing... Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "public/web/WebFrame.h" 5 #include "public/web/WebFrame.h"
6 6
7 #include "bindings/core/v8/WindowProxyManager.h" 7 #include "bindings/core/v8/WindowProxyManager.h"
8 #include "core/frame/FrameHost.h" 8 #include "core/frame/FrameHost.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 if (m_opener) { 65 if (m_opener) {
66 frame->setOpener(m_opener); 66 frame->setOpener(m_opener);
67 setOpener(nullptr); 67 setOpener(nullptr);
68 } 68 }
69 m_openedFrameTracker->transferTo(frame); 69 m_openedFrameTracker->transferTo(frame);
70 70
71 FrameHost* host = oldFrame->host(); 71 FrameHost* host = oldFrame->host();
72 AtomicString name = oldFrame->tree().name(); 72 AtomicString name = oldFrame->tree().name();
73 AtomicString uniqueName = oldFrame->tree().uniqueName();
73 FrameOwner* owner = oldFrame->owner(); 74 FrameOwner* owner = oldFrame->owner();
74 oldFrame->disconnectOwnerElement(); 75 oldFrame->disconnectOwnerElement();
75 76
76 v8::HandleScope handleScope(v8::Isolate::GetCurrent()); 77 v8::HandleScope handleScope(v8::Isolate::GetCurrent());
77 HashMap<DOMWrapperWorld*, v8::Local<v8::Object>> globals; 78 HashMap<DOMWrapperWorld*, v8::Local<v8::Object>> globals;
78 oldFrame->windowProxyManager()->clearForNavigation(); 79 oldFrame->windowProxyManager()->clearForNavigation();
79 oldFrame->windowProxyManager()->releaseGlobals(globals); 80 oldFrame->windowProxyManager()->releaseGlobals(globals);
80 81
81 // Although the Document in this frame is now unloaded, many resources 82 // Although the Document in this frame is now unloaded, many resources
82 // associated with the frame itself have not yet been freed yet. 83 // associated with the frame itself have not yet been freed yet.
(...skipping 11 matching lines...) Expand all
94 HTMLFrameOwnerElement* ownerElement = toHTMLFrameOwnerElement(ow ner); 95 HTMLFrameOwnerElement* ownerElement = toHTMLFrameOwnerElement(ow ner);
95 ownerElement->setContentFrame(localFrame); 96 ownerElement->setContentFrame(localFrame);
96 ownerElement->setWidget(localFrame.view()); 97 ownerElement->setWidget(localFrame.view());
97 } else { 98 } else {
98 toRemoteBridgeFrameOwner(owner)->setContentFrame(toWebLocalFrame Impl(frame)); 99 toRemoteBridgeFrameOwner(owner)->setContentFrame(toWebLocalFrame Impl(frame));
99 } 100 }
100 } else { 101 } else {
101 localFrame.page()->setMainFrame(&localFrame); 102 localFrame.page()->setMainFrame(&localFrame);
102 } 103 }
103 } else { 104 } else {
104 toWebRemoteFrameImpl(frame)->initializeCoreFrame(host, owner, name, null Atom); 105 toWebRemoteFrameImpl(frame)->initializeCoreFrame(host, owner, name, uniq ueName);
105 } 106 }
106 107
107 frame->toImplBase()->frame()->windowProxyManager()->setGlobals(globals); 108 frame->toImplBase()->frame()->windowProxyManager()->setGlobals(globals);
108 109
109 m_parent = nullptr; 110 m_parent = nullptr;
110 111
111 return true; 112 return true;
112 } 113 }
113 114
114 void WebFrame::detach() 115 void WebFrame::detach()
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \ 357 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \
357 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); } 358 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); }
358 359
359 DEFINE_VISITOR_METHOD(Visitor*) 360 DEFINE_VISITOR_METHOD(Visitor*)
360 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) 361 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor)
361 362
362 #undef DEFINE_VISITOR_METHOD 363 #undef DEFINE_VISITOR_METHOD
363 #endif 364 #endif
364 365
365 } // namespace blink 366 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp ('k') | third_party/WebKit/Source/web/WebFrameImplBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698