Index: Source/core/dom/StyleEngine.cpp |
diff --git a/Source/core/dom/StyleEngine.cpp b/Source/core/dom/StyleEngine.cpp |
index 2de67f7ad04984c5061f54ba1091979247803928..f59a38e203d880478af6b41ac56e4eeaad749b46 100644 |
--- a/Source/core/dom/StyleEngine.cpp |
+++ b/Source/core/dom/StyleEngine.cpp |
@@ -54,28 +54,18 @@ |
using namespace HTMLNames; |
-static WillBeHeapHashMap<AtomicString, RawPtrWillBeWeakMember<StyleSheetContents> >& textToSheetCache() |
-{ |
- typedef WillBeHeapHashMap<AtomicString, RawPtrWillBeWeakMember<StyleSheetContents> > TextToSheetCache; |
-#if ENABLE(OILPAN) |
- DEFINE_STATIC_LOCAL(Persistent<TextToSheetCache>, cache, (new TextToSheetCache)); |
- return *cache; |
-#else |
+static HashMap<AtomicString, StyleSheetContents*>& textToSheetCache() |
+{ |
+ typedef HashMap<AtomicString, StyleSheetContents*> TextToSheetCache; |
DEFINE_STATIC_LOCAL(TextToSheetCache, cache, ()); |
return cache; |
-#endif |
-} |
- |
-static WillBeHeapHashMap<RawPtrWillBeWeakMember<StyleSheetContents>, AtomicString>& sheetToTextCache() |
-{ |
- typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<StyleSheetContents>, AtomicString> SheetToTextCache; |
-#if ENABLE(OILPAN) |
- DEFINE_STATIC_LOCAL(Persistent<SheetToTextCache>, cache, (new SheetToTextCache)); |
- return *cache; |
-#else |
+} |
+ |
+static HashMap<StyleSheetContents*, AtomicString>& sheetToTextCache() |
+{ |
+ typedef HashMap<StyleSheetContents*, AtomicString> SheetToTextCache; |
DEFINE_STATIC_LOCAL(SheetToTextCache, cache, ()); |
return cache; |
-#endif |
} |
StyleEngine::StyleEngine(Document& document) |
@@ -589,7 +579,7 @@ |
if (!e->document().inQuirksMode()) { |
AtomicString textContent(text); |
- WillBeHeapHashMap<AtomicString, RawPtrWillBeWeakMember<StyleSheetContents> >::AddResult result = textToSheetCache().add(textContent, RawPtrWillBeWeakMember<StyleSheetContents>(nullptr)); |
+ HashMap<AtomicString, StyleSheetContents*>::AddResult result = textToSheetCache().add(textContent, 0); |
if (result.isNewEntry || !result.storedValue->value) { |
styleSheet = StyleEngine::parseSheet(e, text, startPosition, createdByParser); |
if (result.isNewEntry && styleSheet->contents()->maybeCacheable()) { |
@@ -620,7 +610,7 @@ |
void StyleEngine::removeSheet(StyleSheetContents* contents) |
{ |
- WillBeHeapHashMap<RawPtrWillBeWeakMember<StyleSheetContents>, AtomicString>::iterator it = sheetToTextCache().find(contents); |
+ HashMap<StyleSheetContents*, AtomicString>::iterator it = sheetToTextCache().find(contents); |
if (it == sheetToTextCache().end()) |
return; |