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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 | 538 |
539 InspectorCounters::incrementCounter(InspectorCounters::DocumentCounter); | 539 InspectorCounters::incrementCounter(InspectorCounters::DocumentCounter); |
540 | 540 |
541 m_lifecycle.advanceTo(DocumentLifecycle::Inactive); | 541 m_lifecycle.advanceTo(DocumentLifecycle::Inactive); |
542 | 542 |
543 // Since CSSFontSelector requires Document::m_fetcher and StyleEngine owns | 543 // Since CSSFontSelector requires Document::m_fetcher and StyleEngine owns |
544 // CSSFontSelector, need to initialize m_styleEngine after initializing | 544 // CSSFontSelector, need to initialize m_styleEngine after initializing |
545 // m_fetcher. | 545 // m_fetcher. |
546 m_styleEngine = StyleEngine::create(*this); | 546 m_styleEngine = StyleEngine::create(*this); |
547 | 547 |
| 548 // The parent's parser should be suspended together with all the other objec
ts, |
| 549 // else this new Document would have a new ExecutionContext which suspended
state |
| 550 // would not match the one from the parent, and could start loading resource
s |
| 551 // ignoring the defersLoading flag. |
| 552 ASSERT(!parentDocument() || !parentDocument()->activeDOMObjectsAreSuspended(
)); |
| 553 |
548 #ifndef NDEBUG | 554 #ifndef NDEBUG |
549 liveDocumentSet().add(this); | 555 liveDocumentSet().add(this); |
550 #endif | 556 #endif |
551 } | 557 } |
552 | 558 |
553 Document::~Document() | 559 Document::~Document() |
554 { | 560 { |
555 ASSERT(!renderView()); | 561 ASSERT(!renderView()); |
556 ASSERT(!parentTreeScope()); | 562 ASSERT(!parentTreeScope()); |
557 #if !ENABLE(OILPAN) | 563 #if !ENABLE(OILPAN) |
(...skipping 5259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5817 #ifndef NDEBUG | 5823 #ifndef NDEBUG |
5818 using namespace blink; | 5824 using namespace blink; |
5819 void showLiveDocumentInstances() | 5825 void showLiveDocumentInstances() |
5820 { | 5826 { |
5821 WeakDocumentSet& set = liveDocumentSet(); | 5827 WeakDocumentSet& set = liveDocumentSet(); |
5822 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5828 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5823 for (Document* document : set) | 5829 for (Document* document : set) |
5824 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5830 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5825 } | 5831 } |
5826 #endif | 5832 #endif |
OLD | NEW |