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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 | 197 |
| 198 void FrameLoader::init() | 198 void FrameLoader::init() |
| 199 { | 199 { |
| 200 ResourceRequest initialRequest(KURL(ParsedURLString, emptyString())); | 200 ResourceRequest initialRequest(KURL(ParsedURLString, emptyString())); |
| 201 initialRequest.setRequestContext(WebURLRequest::RequestContextInternal); | 201 initialRequest.setRequestContext(WebURLRequest::RequestContextInternal); |
| 202 initialRequest.setFrameType(m_frame->isMainFrame() ? WebURLRequest::FrameTyp eTopLevel : WebURLRequest::FrameTypeNested); | 202 initialRequest.setFrameType(m_frame->isMainFrame() ? WebURLRequest::FrameTyp eTopLevel : WebURLRequest::FrameTypeNested); |
| 203 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, initia lRequest, SubstituteData()); | 203 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, initia lRequest, SubstituteData()); |
| 204 m_provisionalDocumentLoader->startLoadingMainResource(); | 204 m_provisionalDocumentLoader->startLoadingMainResource(); |
| 205 m_frame->document()->cancelParsing(); | 205 m_frame->document()->cancelParsing(); |
| 206 m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocu ment); | 206 m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocu ment); |
| 207 // Self-suspend if created in an already deferred Page. Note that both | |
| 208 // startLoadingMainResource() and cancelParsing() may have already detached | |
| 209 // the frame, since they both fire JS events. | |
| 210 if (m_frame->page() && m_frame->page()->defersLoading()) | |
|
Nate Chapin
2016/07/27 17:30:47
This makes me saddest of all :(
dcheng
2016/07/28 01:23:28
Yes... I would have to completely agree =(
| |
| 211 setDefersLoading(true); | |
| 207 takeObjectSnapshot(); | 212 takeObjectSnapshot(); |
| 208 } | 213 } |
| 209 | 214 |
| 210 FrameLoaderClient* FrameLoader::client() const | 215 FrameLoaderClient* FrameLoader::client() const |
| 211 { | 216 { |
| 212 return static_cast<FrameLoaderClient*>(m_frame->client()); | 217 return static_cast<FrameLoaderClient*>(m_frame->client()); |
| 213 } | 218 } |
| 214 | 219 |
| 215 void FrameLoader::setDefersLoading(bool defers) | 220 void FrameLoader::setDefersLoading(bool defers) |
| 216 { | 221 { |
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1610 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); | 1615 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); |
| 1611 return tracedValue; | 1616 return tracedValue; |
| 1612 } | 1617 } |
| 1613 | 1618 |
| 1614 inline void FrameLoader::takeObjectSnapshot() const | 1619 inline void FrameLoader::takeObjectSnapshot() const |
| 1615 { | 1620 { |
| 1616 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); | 1621 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); |
| 1617 } | 1622 } |
| 1618 | 1623 |
| 1619 } // namespace blink | 1624 } // namespace blink |
| OLD | NEW |