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 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 void FrameLoader::runScriptsAtDocumentElementAvailable() { | 1746 void FrameLoader::runScriptsAtDocumentElementAvailable() { |
1747 client()->runScriptsAtDocumentElementAvailable(); | 1747 client()->runScriptsAtDocumentElementAvailable(); |
1748 // The frame might be detached at this point. | 1748 // The frame might be detached at this point. |
1749 } | 1749 } |
1750 | 1750 |
1751 void FrameLoader::dispatchDidClearDocumentOfWindowObject() { | 1751 void FrameLoader::dispatchDidClearDocumentOfWindowObject() { |
1752 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) | 1752 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) |
1753 return; | 1753 return; |
1754 | 1754 |
1755 Settings* settings = m_frame->settings(); | 1755 Settings* settings = m_frame->settings(); |
1756 if (settings && settings->getForceMainWorldInitialization()) | 1756 if (settings && settings->getForceMainWorldInitialization()) { |
1757 m_frame->script().initializeMainWorld(); | 1757 // Forcibly instantiate WindowProxy. |
| 1758 m_frame->script().windowProxy(DOMWrapperWorld::mainWorld()); |
| 1759 } |
1758 InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame); | 1760 InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame); |
1759 | 1761 |
1760 if (m_dispatchingDidClearWindowObjectInMainWorld) | 1762 if (m_dispatchingDidClearWindowObjectInMainWorld) |
1761 return; | 1763 return; |
1762 AutoReset<bool> inDidClearWindowObject( | 1764 AutoReset<bool> inDidClearWindowObject( |
1763 &m_dispatchingDidClearWindowObjectInMainWorld, true); | 1765 &m_dispatchingDidClearWindowObjectInMainWorld, true); |
1764 // We just cleared the document, not the entire window object, but for the | 1766 // We just cleared the document, not the entire window object, but for the |
1765 // embedder that's close enough. | 1767 // embedder that's close enough. |
1766 client()->dispatchDidClearWindowObjectInMainWorld(); | 1768 client()->dispatchDidClearWindowObjectInMainWorld(); |
1767 } | 1769 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1894 m_documentLoader ? m_documentLoader->url() : String()); | 1896 m_documentLoader ? m_documentLoader->url() : String()); |
1895 return tracedValue; | 1897 return tracedValue; |
1896 } | 1898 } |
1897 | 1899 |
1898 inline void FrameLoader::takeObjectSnapshot() const { | 1900 inline void FrameLoader::takeObjectSnapshot() const { |
1899 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, | 1901 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, |
1900 toTracedValue()); | 1902 toTracedValue()); |
1901 } | 1903 } |
1902 | 1904 |
1903 } // namespace blink | 1905 } // namespace blink |
OLD | NEW |