Chromium Code Reviews| Index: Source/core/frame/LocalDOMWindow.cpp |
| diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp |
| index 0ffefbc9f3026c909f369bca438422e598acdad5..3feb9960f5f950b364295674b2b39d3625c93fb7 100644 |
| --- a/Source/core/frame/LocalDOMWindow.cpp |
| +++ b/Source/core/frame/LocalDOMWindow.cpp |
| @@ -661,6 +661,12 @@ ApplicationCache* LocalDOMWindow::applicationCache() const |
| Navigator* LocalDOMWindow::navigator() const |
| { |
| + if (frame() && frame()->domWindow() != this) { |
|
haraken
2015/08/24 02:22:15
It would be better to use:
if (!isCurrentlyDisp
yhirano
2015/08/24 03:27:11
Done.
|
| + // This window is already detached. |
| + ASSERT(!m_navigator); |
| + return nullptr; |
| + } |
| + |
| if (!m_navigator) |
| m_navigator = Navigator::create(frame()); |
| return m_navigator.get(); |