| 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 | 535 |
| 536 // Since CSSFontSelector requires Document::m_fetcher and StyleEngine owns | 536 // Since CSSFontSelector requires Document::m_fetcher and StyleEngine owns |
| 537 // CSSFontSelector, need to initialize m_styleEngine after initializing | 537 // CSSFontSelector, need to initialize m_styleEngine after initializing |
| 538 // m_fetcher. | 538 // m_fetcher. |
| 539 m_styleEngine = StyleEngine::create(*this); | 539 m_styleEngine = StyleEngine::create(*this); |
| 540 | 540 |
| 541 // The parent's parser should be suspended together with all the other | 541 // The parent's parser should be suspended together with all the other |
| 542 // objects, else this new Document would have a new ExecutionContext which | 542 // objects, else this new Document would have a new ExecutionContext which |
| 543 // suspended state would not match the one from the parent, and could start | 543 // suspended state would not match the one from the parent, and could start |
| 544 // loading resources ignoring the defersLoading flag. | 544 // loading resources ignoring the defersLoading flag. |
| 545 DCHECK(!parentDocument() || | 545 DCHECK(!parentDocument() || !parentDocument()->isContextSuspended()); |
| 546 !parentDocument()->activeDOMObjectsAreSuspended()); | |
| 547 | 546 |
| 548 #ifndef NDEBUG | 547 #ifndef NDEBUG |
| 549 liveDocumentSet().add(this); | 548 liveDocumentSet().add(this); |
| 550 #endif | 549 #endif |
| 551 } | 550 } |
| 552 | 551 |
| 553 Document::~Document() { | 552 Document::~Document() { |
| 554 DCHECK(layoutViewItem().isNull()); | 553 DCHECK(layoutViewItem().isNull()); |
| 555 DCHECK(!parentTreeScope()); | 554 DCHECK(!parentTreeScope()); |
| 556 // If a top document with a cache, verify that it was comprehensively | 555 // If a top document with a cache, verify that it was comprehensively |
| (...skipping 6029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6586 } | 6585 } |
| 6587 | 6586 |
| 6588 void showLiveDocumentInstances() { | 6587 void showLiveDocumentInstances() { |
| 6589 WeakDocumentSet& set = liveDocumentSet(); | 6588 WeakDocumentSet& set = liveDocumentSet(); |
| 6590 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6589 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6591 for (Document* document : set) | 6590 for (Document* document : set) |
| 6592 fprintf(stderr, "- Document %p URL: %s\n", document, | 6591 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6593 document->url().getString().utf8().data()); | 6592 document->url().getString().utf8().data()); |
| 6594 } | 6593 } |
| 6595 #endif | 6594 #endif |
| OLD | NEW |