| Index: Source/core/page/Chrome.cpp
|
| diff --git a/Source/core/page/Chrome.cpp b/Source/core/page/Chrome.cpp
|
| index 8b07313692f9ae99e5b932560c23fd76b0be13c1..dbbe26f9708c3233c41ab632d2666a39cae260c5 100644
|
| --- a/Source/core/page/Chrome.cpp
|
| +++ b/Source/core/page/Chrome.cpp
|
| @@ -141,8 +141,10 @@ bool Chrome::canRunModal() const
|
|
|
| static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogType dialog, const String& message)
|
| {
|
| - for (LocalFrame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
|
| - Document::PageDismissalType dismissal = frame->document()->pageDismissalEventBeingDispatched();
|
| + for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
|
| + if (!frame->isLocalFrame())
|
| + continue;
|
| + Document::PageDismissalType dismissal = toLocalFrame(frame)->document()->pageDismissalEventBeingDispatched();
|
| if (dismissal != Document::NoDismissal)
|
| return page->chrome().client().shouldRunModalDialogDuringPageDismissal(dialog, message, dismissal);
|
| }
|
|
|