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

Side by Side Diff: third_party/WebKit/Source/core/exported/WebFrame.cpp

Issue 2948983002: Low memory page navigation GC for low end devices (Closed)
Patch Set: fix Created 3 years, 5 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 <algorithm> 7 #include <algorithm>
8 #include "bindings/core/v8/WindowProxyManager.h" 8 #include "bindings/core/v8/WindowProxyManager.h"
9 #include "core/HTMLNames.h" 9 #include "core/HTMLNames.h"
10 #include "core/dom/IncrementLoadEventDelayCount.h" 10 #include "core/dom/IncrementLoadEventDelayCount.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 SetOpener(nullptr); 77 SetOpener(nullptr);
78 } 78 }
79 opened_frame_tracker_->TransferTo(frame); 79 opened_frame_tracker_->TransferTo(frame);
80 80
81 Page* page = old_frame->GetPage(); 81 Page* page = old_frame->GetPage();
82 AtomicString name = old_frame->Tree().GetName(); 82 AtomicString name = old_frame->Tree().GetName();
83 FrameOwner* owner = old_frame->Owner(); 83 FrameOwner* owner = old_frame->Owner();
84 84
85 v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); 85 v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
86 WindowProxyManager::GlobalProxyVector global_proxies; 86 WindowProxyManager::GlobalProxyVector global_proxies;
87 old_frame->GetWindowProxyManager()->ClearForNavigation(); 87 old_frame->GetWindowProxyManager()->ClearForSwap();
88 old_frame->GetWindowProxyManager()->ReleaseGlobalProxies(global_proxies); 88 old_frame->GetWindowProxyManager()->ReleaseGlobalProxies(global_proxies);
89 89
90 // Although the Document in this frame is now unloaded, many resources 90 // Although the Document in this frame is now unloaded, many resources
91 // associated with the frame itself have not yet been freed yet. 91 // associated with the frame itself have not yet been freed yet.
92 old_frame->Detach(FrameDetachType::kSwap); 92 old_frame->Detach(FrameDetachType::kSwap);
93 93
94 // Clone the state of the current Frame into the one being swapped in. 94 // Clone the state of the current Frame into the one being swapped in.
95 // FIXME: This is a bit clunky; this results in pointless decrements and 95 // FIXME: This is a bit clunky; this results in pointless decrements and
96 // increments of connected subframes. 96 // increments of connected subframes.
97 if (frame->IsWebLocalFrame()) { 97 if (frame->IsWebLocalFrame()) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 Frame* WebFrame::ToCoreFrame(const WebFrame& frame) { 356 Frame* WebFrame::ToCoreFrame(const WebFrame& frame) {
357 if (frame.IsWebLocalFrame()) 357 if (frame.IsWebLocalFrame())
358 return ToWebLocalFrameBase(frame).GetFrame(); 358 return ToWebLocalFrameBase(frame).GetFrame();
359 if (frame.IsWebRemoteFrame()) 359 if (frame.IsWebRemoteFrame())
360 return ToWebRemoteFrameBase(frame).GetFrame(); 360 return ToWebRemoteFrameBase(frame).GetFrame();
361 NOTREACHED(); 361 NOTREACHED();
362 return nullptr; 362 return nullptr;
363 } 363 }
364 364
365 } // namespace blink 365 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698