| Index: Source/modules/filesystem/InspectorFileSystemAgent.cpp
|
| diff --git a/Source/modules/filesystem/InspectorFileSystemAgent.cpp b/Source/modules/filesystem/InspectorFileSystemAgent.cpp
|
| index b705d218617286d4c9641a6f482280a4eb604bcc..4ee0ceea9ec3f01ed7217a4d2850118a74e13f54 100644
|
| --- a/Source/modules/filesystem/InspectorFileSystemAgent.cpp
|
| +++ b/Source/modules/filesystem/InspectorFileSystemAgent.cpp
|
| @@ -714,9 +714,12 @@ bool InspectorFileSystemAgent::assertEnabled(ErrorString* error)
|
|
|
| ExecutionContext* InspectorFileSystemAgent::assertExecutionContextForOrigin(ErrorString* error, SecurityOrigin* origin)
|
| {
|
| - for (LocalFrame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
|
| - if (frame->document() && frame->document()->securityOrigin()->isSameSchemeHostPort(origin))
|
| - return frame->document();
|
| + for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
|
| + if (!frame->isLocalFrame())
|
| + continue;
|
| + LocalFrame* localFrame = toLocalFrame(frame);
|
| + if (localFrame->document() && localFrame->document()->securityOrigin()->isSameSchemeHostPort(origin))
|
| + return localFrame->document();
|
| }
|
|
|
| *error = "No frame is available for the request";
|
|
|