| Index: Source/core/dom/ProcessingInstruction.cpp
|
| diff --git a/Source/core/dom/ProcessingInstruction.cpp b/Source/core/dom/ProcessingInstruction.cpp
|
| index c3d42a1d562ad10facd600809d079c7df4bafa40..acde8a36885488ae3439f3911c6e80be6876463c 100644
|
| --- a/Source/core/dom/ProcessingInstruction.cpp
|
| +++ b/Source/core/dom/ProcessingInstruction.cpp
|
| @@ -289,21 +289,19 @@ void ProcessingInstruction::removedFrom(ContainerNode* insertionPoint)
|
| if (!insertionPoint->inDocument())
|
| return;
|
|
|
| + // No need to remove XSLStyleSheet from StyleEngine.
|
| if (!DocumentXSLT::processingInstructionRemovedFromDocument(document(), this))
|
| document().styleEngine()->removeStyleSheetCandidateNode(this);
|
|
|
| - // No need to remove XSLStyleSheet from StyleEngine.
|
| RefPtrWillBeRawPtr<StyleSheet> removedSheet = m_sheet;
|
| -
|
| if (m_sheet) {
|
| ASSERT(m_sheet->ownerNode() == this);
|
| clearSheet();
|
| - } else if (resource()) {
|
| - ASSERT(m_loading);
|
| - document().styleEngine()->removePendingSheet(this);
|
| - clearResource();
|
| }
|
|
|
| + // No need to remove pending sheets.
|
| + clearResource();
|
| +
|
| // If we're in document teardown, then we don't need to do any notification of our sheet's removal.
|
| if (document().isActive())
|
| document().removedStyleSheet(removedSheet.get());
|
|
|