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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 27311002: Introduce ExecutionContextClient (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix clang build error Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/ExecutionContext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 , m_scheduledTasksAreSuspended(false) 455 , m_scheduledTasksAreSuspended(false)
456 , m_sharedObjectPoolClearTimer(this, &Document::sharedObjectPoolClearTimerFi red) 456 , m_sharedObjectPoolClearTimer(this, &Document::sharedObjectPoolClearTimerFi red)
457 #ifndef NDEBUG 457 #ifndef NDEBUG
458 , m_didDispatchViewportPropertiesChanged(false) 458 , m_didDispatchViewportPropertiesChanged(false)
459 #endif 459 #endif
460 , m_timeline(DocumentTimeline::create(this)) 460 , m_timeline(DocumentTimeline::create(this))
461 , m_templateDocumentHost(0) 461 , m_templateDocumentHost(0)
462 , m_fonts(0) 462 , m_fonts(0)
463 , m_didAssociateFormControlsTimer(this, &Document::didAssociateFormControlsT imerFired) 463 , m_didAssociateFormControlsTimer(this, &Document::didAssociateFormControlsT imerFired)
464 { 464 {
465 setClient(this);
465 ScriptWrappable::init(this); 466 ScriptWrappable::init(this);
466 467
467 if (m_frame) { 468 if (m_frame) {
468 provideContextFeaturesToDocumentFrom(this, m_frame->page()); 469 provideContextFeaturesToDocumentFrom(this, m_frame->page());
469 470
470 m_fetcher = m_frame->loader()->activeDocumentLoader()->fetcher(); 471 m_fetcher = m_frame->loader()->activeDocumentLoader()->fetcher();
471 } 472 }
472 473
473 if (!m_fetcher) 474 if (!m_fetcher)
474 m_fetcher = ResourceFetcher::create(0); 475 m_fetcher = ResourceFetcher::create(0);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 // as well as Node. See a comment on TreeScope.h for the reason. 561 // as well as Node. See a comment on TreeScope.h for the reason.
561 if (hasRareData()) 562 if (hasRareData())
562 clearRareData(); 563 clearRareData();
563 564
564 ASSERT(!m_listsInvalidatedAtDocument.size()); 565 ASSERT(!m_listsInvalidatedAtDocument.size());
565 566
566 for (unsigned i = 0; i < WTF_ARRAY_LENGTH(m_nodeListCounts); i++) 567 for (unsigned i = 0; i < WTF_ARRAY_LENGTH(m_nodeListCounts); i++)
567 ASSERT(!m_nodeListCounts[i]); 568 ASSERT(!m_nodeListCounts[i]);
568 569
569 clearDocumentScope(); 570 clearDocumentScope();
571 setClient(0);
570 572
571 InspectorCounters::decrementCounter(InspectorCounters::DocumentCounter); 573 InspectorCounters::decrementCounter(InspectorCounters::DocumentCounter);
572 } 574 }
573 575
574 void Document::dispose() 576 void Document::dispose()
575 { 577 {
576 ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun); 578 ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun);
577 // We must make sure not to be retaining any of our children through 579 // We must make sure not to be retaining any of our children through
578 // these extra pointers or we will create a reference cycle. 580 // these extra pointers or we will create a reference cycle.
579 m_docType = 0; 581 m_docType = 0;
(...skipping 4694 matching lines...) Expand 10 before | Expand all | Expand 10 after
5274 { 5276 {
5275 return DocumentLifecycleNotifier::create(this); 5277 return DocumentLifecycleNotifier::create(this);
5276 } 5278 }
5277 5279
5278 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5280 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5279 { 5281 {
5280 return static_cast<DocumentLifecycleNotifier*>(ExecutionContext::lifecycleNo tifier()); 5282 return static_cast<DocumentLifecycleNotifier*>(ExecutionContext::lifecycleNo tifier());
5281 } 5283 }
5282 5284
5283 } // namespace WebCore 5285 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/ExecutionContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698