OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3349 | 3349 |
3350 // Only imports on master documents can trigger rendering. | 3350 // Only imports on master documents can trigger rendering. |
3351 if (HTMLImportLoader* import = importLoader()) | 3351 if (HTMLImportLoader* import = importLoader()) |
3352 import->didRemoveAllPendingStylesheet(); | 3352 import->didRemoveAllPendingStylesheet(); |
3353 if (!haveImportsLoaded()) | 3353 if (!haveImportsLoaded()) |
3354 return; | 3354 return; |
3355 didLoadAllScriptBlockingResources(); | 3355 didLoadAllScriptBlockingResources(); |
3356 } | 3356 } |
3357 | 3357 |
3358 void Document::didLoadAllScriptBlockingResources() { | 3358 void Document::didLoadAllScriptBlockingResources() { |
3359 if (m_executeScriptsWaitingForResourcesTaskHandle.isActive()) | |
3360 return; | |
3361 | |
3362 // Use wrapWeakPersistent because the task should not keep this Document alive | 3359 // Use wrapWeakPersistent because the task should not keep this Document alive |
3363 // just for executing scripts. | 3360 // just for executing scripts. |
3364 m_executeScriptsWaitingForResourcesTaskHandle = | 3361 m_executeScriptsWaitingForResourcesTaskHandle = |
3365 TaskRunnerHelper::get(TaskType::Networking, this) | 3362 TaskRunnerHelper::get(TaskType::Networking, this) |
3366 ->postCancellableTask( | 3363 ->postCancellableTask( |
3367 BLINK_FROM_HERE, | 3364 BLINK_FROM_HERE, |
3368 WTF::bind(&Document::executeScriptsWaitingForResources, | 3365 WTF::bind(&Document::executeScriptsWaitingForResources, |
3369 wrapWeakPersistent(this))); | 3366 wrapWeakPersistent(this))); |
3370 | 3367 |
3371 if (isHTMLDocument() && body()) { | 3368 if (isHTMLDocument() && body()) { |
(...skipping 3212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6584 } | 6581 } |
6585 | 6582 |
6586 void showLiveDocumentInstances() { | 6583 void showLiveDocumentInstances() { |
6587 WeakDocumentSet& set = liveDocumentSet(); | 6584 WeakDocumentSet& set = liveDocumentSet(); |
6588 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6585 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6589 for (Document* document : set) | 6586 for (Document* document : set) |
6590 fprintf(stderr, "- Document %p URL: %s\n", document, | 6587 fprintf(stderr, "- Document %p URL: %s\n", document, |
6591 document->url().getString().utf8().data()); | 6588 document->url().getString().utf8().data()); |
6592 } | 6589 } |
6593 #endif | 6590 #endif |
OLD | NEW |