Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: Source/core/loader/FrameLoader.cpp

Issue 625583002: Properly suspend HTMLDocumentParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed wrong method called Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 void FrameLoader::setDefersLoading(bool defers) 158 void FrameLoader::setDefersLoading(bool defers)
159 { 159 {
160 if (m_documentLoader) 160 if (m_documentLoader)
161 m_documentLoader->setDefersLoading(defers); 161 m_documentLoader->setDefersLoading(defers);
162 if (m_provisionalDocumentLoader) 162 if (m_provisionalDocumentLoader)
163 m_provisionalDocumentLoader->setDefersLoading(defers); 163 m_provisionalDocumentLoader->setDefersLoading(defers);
164 if (m_policyDocumentLoader) 164 if (m_policyDocumentLoader)
165 m_policyDocumentLoader->setDefersLoading(defers); 165 m_policyDocumentLoader->setDefersLoading(defers);
166 166
167 if (Document* document = m_frame->document()) {
168 if (defers)
169 document->suspendScheduledTasks();
170 else
171 document->resumeScheduledTasks();
172 }
173
167 if (!defers) { 174 if (!defers) {
168 if (m_deferredHistoryLoad.isValid()) { 175 if (m_deferredHistoryLoad.isValid()) {
169 loadHistoryItem(m_deferredHistoryLoad.m_item.get(), m_deferredHistor yLoad.m_type, m_deferredHistoryLoad.m_cachePolicy); 176 loadHistoryItem(m_deferredHistoryLoad.m_item.get(), m_deferredHistor yLoad.m_type, m_deferredHistoryLoad.m_cachePolicy);
170 m_deferredHistoryLoad = DeferredHistoryLoad(); 177 m_deferredHistoryLoad = DeferredHistoryLoad();
171 } 178 }
172 m_frame->navigationScheduler().startTimer(); 179 m_frame->navigationScheduler().startTimer();
173 scheduleCheckCompleted(); 180 scheduleCheckCompleted();
174 } 181 }
175 } 182 }
176 183
(...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. 1483 // FIXME: We need a way to propagate sandbox flags to out-of-process frames.
1477 Frame* parentFrame = m_frame->tree().parent(); 1484 Frame* parentFrame = m_frame->tree().parent();
1478 if (parentFrame && parentFrame->isLocalFrame()) 1485 if (parentFrame && parentFrame->isLocalFrame())
1479 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); 1486 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags();
1480 if (FrameOwner* frameOwner = m_frame->owner()) 1487 if (FrameOwner* frameOwner = m_frame->owner())
1481 flags |= frameOwner->sandboxFlags(); 1488 flags |= frameOwner->sandboxFlags();
1482 return flags; 1489 return flags;
1483 } 1490 }
1484 1491
1485 } // namespace blink 1492 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698