| Index: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| index 90d7742c2a7a0d82a13e9e5e742135dd53aa0b32..2bda68735dc1df7eb601ea06e62eba0184b6167d 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "core/loader/FrameLoader.h"
|
| #include "core/page/Page.h"
|
| #include "core/plugins/PluginView.h"
|
| +#include "platform/heap/HeapAllocator.h"
|
| #include "platform/weborigin/SecurityOrigin.h"
|
|
|
| namespace blink {
|
| @@ -54,9 +55,10 @@ static FrameViewBaseSet& WidgetsPendingTemporaryRemovalFromParent() {
|
| return set;
|
| }
|
|
|
| -static FrameViewBaseSet& WidgetsPendingDispose() {
|
| - DEFINE_STATIC_LOCAL(FrameViewBaseSet, set, (new FrameViewBaseSet));
|
| - return set;
|
| +using DisposeList = HeapVector<Member<FrameOrPlugin>>;
|
| +static DisposeList& PendingDispose() {
|
| + DEFINE_STATIC_LOCAL(DisposeList, list, (new DisposeList));
|
| + return list;
|
| }
|
|
|
| SubframeLoadingDisabler::SubtreeRootSet&
|
| @@ -100,10 +102,10 @@ void HTMLFrameOwnerElement::UpdateSuspendScope::
|
| }
|
|
|
| {
|
| - FrameViewBaseSet set;
|
| - WidgetsPendingDispose().Swap(set);
|
| - for (const auto& frame_view_base : set) {
|
| - frame_view_base->Dispose();
|
| + DisposeList list;
|
| + PendingDispose().Swap(list);
|
| + for (const auto& frame_or_plugin : list) {
|
| + frame_or_plugin->Dispose();
|
| }
|
| }
|
| }
|
| @@ -215,12 +217,12 @@ bool HTMLFrameOwnerElement::IsKeyboardFocusable() const {
|
| return content_frame_ && HTMLElement::IsKeyboardFocusable();
|
| }
|
|
|
| -void HTMLFrameOwnerElement::DisposeWidgetSoon(FrameViewBase* frame_view_base) {
|
| +void HTMLFrameOwnerElement::DisposeSoon(FrameOrPlugin* frame_or_plugin) {
|
| if (g_update_suspend_count) {
|
| - WidgetsPendingDispose().insert(frame_view_base);
|
| + PendingDispose().push_back(frame_or_plugin);
|
| return;
|
| }
|
| - frame_view_base->Dispose();
|
| + frame_or_plugin->Dispose();
|
| }
|
|
|
| void HTMLFrameOwnerElement::FrameOwnerPropertiesChanged() {
|
|
|