Chromium Code Reviews| 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 bool forceMainWorldInitialization = settings && settings->forceMainWorldInit ialization(); | |
| 1547 if (forceMainWorldInitialization) | |
|
dgozman
2016/07/13 18:40:59
Please inline it:
if (settings && settings->force
kozy
2016/07/13 18:57:26
Done.
| |
| 1548 m_frame->script().initializeMainWorld(); | |
| 1545 InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame); | 1549 InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame); |
| 1546 | 1550 |
| 1547 if (m_dispatchingDidClearWindowObjectInMainWorld) | 1551 if (m_dispatchingDidClearWindowObjectInMainWorld) |
| 1548 return; | 1552 return; |
| 1549 TemporaryChange<bool> | 1553 TemporaryChange<bool> |
| 1550 inDidClearWindowObject(m_dispatchingDidClearWindowObjectInMainWorld, tru e); | 1554 inDidClearWindowObject(m_dispatchingDidClearWindowObjectInMainWorld, tru e); |
| 1551 // We just cleared the document, not the entire window object, but for the | 1555 // We just cleared the document, not the entire window object, but for the |
| 1552 // embedder that's close enough. | 1556 // embedder that's close enough. |
| 1553 client()->dispatchDidClearWindowObjectInMainWorld(); | 1557 client()->dispatchDidClearWindowObjectInMainWorld(); |
| 1554 } | 1558 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1613 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); | 1617 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); |
| 1614 return tracedValue; | 1618 return tracedValue; |
| 1615 } | 1619 } |
| 1616 | 1620 |
| 1617 inline void FrameLoader::takeObjectSnapshot() const | 1621 inline void FrameLoader::takeObjectSnapshot() const |
| 1618 { | 1622 { |
| 1619 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); | 1623 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); |
| 1620 } | 1624 } |
| 1621 | 1625 |
| 1622 } // namespace blink | 1626 } // namespace blink |
| OLD | NEW |