| Index: Source/core/dom/ProcessingInstruction.cpp
|
| diff --git a/Source/core/dom/ProcessingInstruction.cpp b/Source/core/dom/ProcessingInstruction.cpp
|
| index 1459449179d1f40f08a7bb9da07274463f9812cd..3c32aa24fc1cab67a32f83e5908f98e6d87a1dec 100644
|
| --- a/Source/core/dom/ProcessingInstruction.cpp
|
| +++ b/Source/core/dom/ProcessingInstruction.cpp
|
| @@ -272,21 +272,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());
|
|
|