OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
6 * (http://www.torchmobile.com/) | 6 * (http://www.torchmobile.com/) |
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1744 void FrameLoader::runScriptsAtDocumentElementAvailable() { | 1744 void FrameLoader::runScriptsAtDocumentElementAvailable() { |
1745 client()->runScriptsAtDocumentElementAvailable(); | 1745 client()->runScriptsAtDocumentElementAvailable(); |
1746 // The frame might be detached at this point. | 1746 // The frame might be detached at this point. |
1747 } | 1747 } |
1748 | 1748 |
1749 void FrameLoader::dispatchDidClearDocumentOfWindowObject() { | 1749 void FrameLoader::dispatchDidClearDocumentOfWindowObject() { |
1750 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) | 1750 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) |
1751 return; | 1751 return; |
1752 | 1752 |
1753 Settings* settings = m_frame->settings(); | 1753 Settings* settings = m_frame->settings(); |
1754 if (settings && settings->forceMainWorldInitialization()) | 1754 if (settings && settings->forceMainWorldInitialization()) { |
1755 m_frame->script().initializeMainWorld(); | 1755 // Forcibly instantiate WindowProxy. |
Yuki
2017/01/05 12:10:06
This is a good comment!
Why don't we have similar
| |
1756 m_frame->script().windowProxy(DOMWrapperWorld::mainWorld()); | |
1757 } | |
1756 InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame); | 1758 InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame); |
1757 | 1759 |
1758 if (m_dispatchingDidClearWindowObjectInMainWorld) | 1760 if (m_dispatchingDidClearWindowObjectInMainWorld) |
1759 return; | 1761 return; |
1760 AutoReset<bool> inDidClearWindowObject( | 1762 AutoReset<bool> inDidClearWindowObject( |
1761 &m_dispatchingDidClearWindowObjectInMainWorld, true); | 1763 &m_dispatchingDidClearWindowObjectInMainWorld, true); |
1762 // We just cleared the document, not the entire window object, but for the | 1764 // We just cleared the document, not the entire window object, but for the |
1763 // embedder that's close enough. | 1765 // embedder that's close enough. |
1764 client()->dispatchDidClearWindowObjectInMainWorld(); | 1766 client()->dispatchDidClearWindowObjectInMainWorld(); |
1765 } | 1767 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1892 m_documentLoader ? m_documentLoader->url() : String()); | 1894 m_documentLoader ? m_documentLoader->url() : String()); |
1893 return tracedValue; | 1895 return tracedValue; |
1894 } | 1896 } |
1895 | 1897 |
1896 inline void FrameLoader::takeObjectSnapshot() const { | 1898 inline void FrameLoader::takeObjectSnapshot() const { |
1897 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, | 1899 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, |
1898 toTracedValue()); | 1900 toTracedValue()); |
1899 } | 1901 } |
1900 | 1902 |
1901 } // namespace blink | 1903 } // namespace blink |
OLD | NEW |