| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 { | 1535 { |
| 1536 client()->runScriptsAtDocumentElementAvailable(); | 1536 client()->runScriptsAtDocumentElementAvailable(); |
| 1537 // The frame might be detached at this point. | 1537 // The frame might be detached at this point. |
| 1538 } | 1538 } |
| 1539 | 1539 |
| 1540 void FrameLoader::dispatchDidClearDocumentOfWindowObject() | 1540 void FrameLoader::dispatchDidClearDocumentOfWindowObject() |
| 1541 { | 1541 { |
| 1542 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) | 1542 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) |
| 1543 return; | 1543 return; |
| 1544 | 1544 |
| 1545 Settings* settings = m_frame->settings(); |
| 1546 if (settings && settings->forceMainWorldInitialization()) |
| 1547 m_frame->script().initializeMainWorld(); |
| 1545 InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame); | 1548 InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame); |
| 1546 | 1549 |
| 1547 if (m_dispatchingDidClearWindowObjectInMainWorld) | 1550 if (m_dispatchingDidClearWindowObjectInMainWorld) |
| 1548 return; | 1551 return; |
| 1549 TemporaryChange<bool> | 1552 TemporaryChange<bool> |
| 1550 inDidClearWindowObject(m_dispatchingDidClearWindowObjectInMainWorld, tru
e); | 1553 inDidClearWindowObject(m_dispatchingDidClearWindowObjectInMainWorld, tru
e); |
| 1551 // We just cleared the document, not the entire window object, but for the | 1554 // We just cleared the document, not the entire window object, but for the |
| 1552 // embedder that's close enough. | 1555 // embedder that's close enough. |
| 1553 client()->dispatchDidClearWindowObjectInMainWorld(); | 1556 client()->dispatchDidClearWindowObjectInMainWorld(); |
| 1554 } | 1557 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1613 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); | 1616 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); |
| 1614 return tracedValue; | 1617 return tracedValue; |
| 1615 } | 1618 } |
| 1616 | 1619 |
| 1617 inline void FrameLoader::takeObjectSnapshot() const | 1620 inline void FrameLoader::takeObjectSnapshot() const |
| 1618 { | 1621 { |
| 1619 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); | 1622 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); |
| 1620 } | 1623 } |
| 1621 | 1624 |
| 1622 } // namespace blink | 1625 } // namespace blink |
| OLD | NEW |