Chromium Code Reviews| Index: Source/modules/filesystem/InspectorFileSystemAgent.cpp |
| diff --git a/Source/modules/filesystem/InspectorFileSystemAgent.cpp b/Source/modules/filesystem/InspectorFileSystemAgent.cpp |
| index b705d218617286d4c9641a6f482280a4eb604bcc..084488cebc8315ad34229d0a3050cc74691692a9 100644 |
| --- a/Source/modules/filesystem/InspectorFileSystemAgent.cpp |
| +++ b/Source/modules/filesystem/InspectorFileSystemAgent.cpp |
| @@ -714,9 +714,9 @@ 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() && toLocalFrame(frame)->document() && toLocalFrame(frame)->document()->securityOrigin()->isSameSchemeHostPort(origin)) |
|
yurys
2014/06/02 07:56:27
LocalFrame* localFrame = toLocalFrame(frame); ...
kenrb
2014/06/02 15:20:48
Done.
|
| + return toLocalFrame(frame)->document(); |
| } |
| *error = "No frame is available for the request"; |