| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 // removes treescopes which are being destroyed from activeTreeScopes. | 420 // removes treescopes which are being destroyed from activeTreeScopes. |
| 421 // So we need to clearScopedStyleResolver for treescopes which have been | 421 // So we need to clearScopedStyleResolver for treescopes which have been |
| 422 // just removed from document. If document is destroyed before invoking | 422 // just removed from document. If document is destroyed before invoking |
| 423 // updateActiveStyleSheets, the treescope has a scopedStyleResolver which | 423 // updateActiveStyleSheets, the treescope has a scopedStyleResolver which |
| 424 // has destroyed StyleSheetContents. | 424 // has destroyed StyleSheetContents. |
| 425 for (TreeScope* treeScope : m_activeTreeScopes) | 425 for (TreeScope* treeScope : m_activeTreeScopes) |
| 426 treeScope->clearScopedStyleResolver(); | 426 treeScope->clearScopedStyleResolver(); |
| 427 | 427 |
| 428 if (m_resolver) { | 428 if (m_resolver) { |
| 429 TRACE_EVENT1("blink", "StyleEngine::clearResolver", "frame", document().
frame()); | 429 TRACE_EVENT1("blink", "StyleEngine::clearResolver", "frame", document().
frame()); |
| 430 #if ENABLE(OILPAN) |
| 431 // The StyleResolver is a heavy object having a number of collection obj
ects |
| 432 // attached. Attempt to promptly recycle their backing storage objects w
hich |
| 433 // are on the Oilpan collection heaps, so as to increase the chance of |
| 434 // heap storage reuse without having to involve the Oilpan GC. Helpful f
or |
| 435 // workloads that stresses (re)creation of StyleResolvers and/or have hi
gh |
| 436 // allocation rates. |
| 437 m_resolver->dispose(); |
| 438 #endif |
| 430 m_resolver.clear(); | 439 m_resolver.clear(); |
| 431 } | 440 } |
| 432 } | 441 } |
| 433 | 442 |
| 434 void StyleEngine::clearMasterResolver() | 443 void StyleEngine::clearMasterResolver() |
| 435 { | 444 { |
| 436 if (Document* master = this->master()) | 445 if (Document* master = this->master()) |
| 437 master->styleEngine().clearResolver(); | 446 master->styleEngine().clearResolver(); |
| 438 } | 447 } |
| 439 | 448 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 visitor->trace(m_dirtyTreeScopes); | 735 visitor->trace(m_dirtyTreeScopes); |
| 727 visitor->trace(m_activeTreeScopes); | 736 visitor->trace(m_activeTreeScopes); |
| 728 visitor->trace(m_fontSelector); | 737 visitor->trace(m_fontSelector); |
| 729 visitor->trace(m_textToSheetCache); | 738 visitor->trace(m_textToSheetCache); |
| 730 visitor->trace(m_sheetToTextCache); | 739 visitor->trace(m_sheetToTextCache); |
| 731 #endif | 740 #endif |
| 732 CSSFontSelectorClient::trace(visitor); | 741 CSSFontSelectorClient::trace(visitor); |
| 733 } | 742 } |
| 734 | 743 |
| 735 } | 744 } |
| OLD | NEW |