Web Inspector: NMI: extract MemoryObjectType constants from MemoryInstrumentation.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Sep 2012 15:11:06 +0000 (15:11 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Sep 2012 15:11:06 +0000 (15:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=95850

Reviewed by Yury Semikhatsky.

I'd like to extract MemoryObjectTypes into separate classes.
After that we will be able to move core NMI instrumentation code to WTF.

Source/WebCore:

* bindings/js/ScriptWrappable.h:
(WebCore::ScriptWrappable::reportMemoryUsage):
* bindings/v8/DOMDataStore.cpp:
(WebCore::DOMDataStore::reportMemoryUsage):
* bindings/v8/IntrusiveDOMWrapperMap.h:
(WebCore::ChunkedTable::reportMemoryUsage):
* bindings/v8/ScriptWrappable.h:
(WebCore::ScriptWrappable::reportMemoryUsage):
* bindings/v8/V8Binding.cpp:
(WebCore::StringCache::reportMemoryUsage):
* bindings/v8/V8DOMMap.h:
* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::reportMemoryUsage):
* css/CSSAspectRatioValue.cpp:
(WebCore::CSSAspectRatioValue::reportDescendantMemoryUsage):
* css/CSSBorderImageSliceValue.cpp:
(WebCore::CSSBorderImageSliceValue::reportDescendantMemoryUsage):
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcValue::reportDescendantMemoryUsage):
* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::reportDescendantMemoryUsage):
* css/CSSCharsetRule.cpp:
(WebCore::CSSCharsetRule::reportDescendantMemoryUsage):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::reportMemoryUsage):
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::reportDescendantMemoryUsage):
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::reportDescendantMemoryUsage):
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::reportDescendantMemoryUsage):
* css/CSSFunctionValue.cpp:
(WebCore::CSSFunctionValue::reportDescendantMemoryUsage):
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientColorStop::reportMemoryUsage):
(WebCore::CSSGradientValue::reportBaseClassMemoryUsage):
(WebCore::CSSLinearGradientValue::reportDescendantMemoryUsage):
(WebCore::CSSRadialGradientValue::reportDescendantMemoryUsage):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::reportDescendantMemoryUsage):
(WebCore::CSSImageSetValue::ImageWithScale::reportMemoryUsage):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::reportDescendantMemoryUsage):
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::reportDescendantMemoryUsage):
* css/CSSInheritedValue.cpp:
(WebCore::CSSInheritedValue::reportDescendantMemoryUsage):
* css/CSSInitialValue.cpp:
(WebCore::CSSInitialValue::reportDescendantMemoryUsage):
* css/CSSLineBoxContainValue.cpp:
(WebCore::CSSLineBoxContainValue::reportDescendantMemoryUsage):
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::reportDescendantMemoryUsage):
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::reportDescendantMemoryUsage):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::reportMemoryUsage):
* css/CSSReflectValue.cpp:
(WebCore::CSSReflectValue::reportDescendantMemoryUsage):
* css/CSSRule.cpp:
(WebCore::CSSRule::reportBaseClassMemoryUsage):
* css/CSSRuleList.cpp:
(WebCore::StaticCSSRuleList::reportMemoryUsage):
* css/CSSRuleList.h:
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::reportMemoryUsage):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::reportDescendantMemoryUsage):
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::reportMemoryUsage):
* css/CSSTimingFunctionValue.cpp:
(WebCore::CSSLinearTimingFunctionValue::reportDescendantMemoryUsage):
(WebCore::CSSCubicBezierTimingFunctionValue::reportDescendantMemoryUsage):
(WebCore::CSSStepsTimingFunctionValue::reportDescendantMemoryUsage):
* css/CSSUnicodeRangeValue.cpp:
(WebCore::CSSUnicodeRangeValue::reportDescendantMemoryUsage):
* css/CSSUnknownRule.h:
(WebCore::CSSUnknownRule::reportDescendantMemoryUsage):
* css/CSSValue.cpp:
(WebCore::TextCloneCSSValue::reportDescendantMemoryUsage):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::reportDescendantMemoryUsage):
* css/CSSVariableValue.h:
(WebCore::CSSVariableValue::reportDescendantMemoryUsage):
* css/FontFeatureValue.cpp:
(WebCore::FontFeatureValue::reportDescendantMemoryUsage):
* css/FontValue.cpp:
(WebCore::FontValue::reportDescendantMemoryUsage):
* css/MediaList.cpp:
(WebCore::MediaQuerySet::reportMemoryUsage):
(WebCore::MediaList::reportMemoryUsage):
* css/MediaQuery.cpp:
(WebCore::MediaQuery::reportMemoryUsage):
* css/MediaQueryExp.cpp:
(WebCore::MediaQueryExp::reportMemoryUsage):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage):
(WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage):
(WebCore::InlineCSSStyleDeclaration::reportMemoryUsage):
* css/ShadowValue.cpp:
(WebCore::ShadowValue::reportDescendantMemoryUsage):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::reportMemoryUsage):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::Features::reportMemoryUsage):
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::reportMemoryUsage):
(WebCore::StyleRule::reportDescendantMemoryUsage):
(WebCore::StyleRulePage::reportDescendantMemoryUsage):
(WebCore::StyleRuleFontFace::reportDescendantMemoryUsage):
(WebCore::StyleRuleBlock::reportDescendantMemoryUsage):
(WebCore::StyleRuleMedia::reportDescendantMemoryUsage):
(WebCore::StyleRuleRegion::reportDescendantMemoryUsage):
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::reportDescendantMemoryUsage):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::reportMemoryUsage):
* css/WebKitCSSFilterValue.cpp:
(WebCore::WebKitCSSFilterValue::reportDescendantMemoryUsage):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::reportMemoryUsage):
(WebCore::WebKitCSSKeyframeRule::reportDescendantMemoryUsage):
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
(WebCore::WebKitCSSKeyframesRule::reportDescendantMemoryUsage):
* css/WebKitCSSMixFunctionValue.cpp:
(WebCore::WebKitCSSMixFunctionValue::reportDescendantMemoryUsage):
* css/WebKitCSSRegionRule.cpp:
(WebCore::WebKitCSSRegionRule::reportDescendantMemoryUsage):
* css/WebKitCSSSVGDocumentValue.cpp:
(WebCore::WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage):
* css/WebKitCSSShaderValue.cpp:
(WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage):
* css/WebKitCSSTransformValue.cpp:
(WebCore::WebKitCSSTransformValue::reportDescendantMemoryUsage):
* dom/Attribute.h:
(WebCore::Attribute::reportMemoryUsage):
* dom/CharacterData.cpp:
(WebCore::CharacterData::reportMemoryUsage):
* dom/ContainerNode.h:
(WebCore::ContainerNode::reportMemoryUsage):
* dom/Document.cpp:
(WebCore::Document::reportMemoryUsage):
* dom/DocumentEventQueue.cpp:
(WebCore::DocumentEventQueue::reportMemoryUsage):
* dom/Element.h:
(WebCore::Element::reportMemoryUsage):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::reportMemoryUsage):
* dom/Event.cpp:
(WebCore::Event::reportMemoryUsage):
* dom/MemoryInstrumentation.cpp:
(WebCore):
* dom/MemoryInstrumentation.h:
(WebCore):
(GenericMemoryTypes):
(WebCore::MemoryInstrumentation::addRootObject):
(WebCore::MemoryObjectInfo::reportObjectInfo):
(WebCoreMemoryTypes):
* dom/Node.cpp:
(WebCore::Node::reportMemoryUsage):
* dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
(WebCore::QualifiedName::reportMemoryUsage):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::reportMemoryUsage):
* inspector/InspectorMemoryAgent.cpp:
(WebCore):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::reportMemoryUsage):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::reportMemoryUsage):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::reportMemoryUsage):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::reportMemoryUsage):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::reportMemoryUsage):
* loader/SubstituteData.cpp:
(WebCore::SubstituteData::reportMemoryUsage):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::reportMemoryUsage):
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::reportMemoryUsage):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::reportMemoryUsage):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::reportMemoryUsage):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::reportMemoryUsage):
* loader/cache/CachedResourceHandle.cpp:
(WebCore::CachedResourceHandleBase::reportMemoryUsage):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::reportMemoryUsage):
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::reportMemoryUsage):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::reportMemoryUsage):
* loader/cache/CachedShader.cpp:
(WebCore::CachedShader::reportMemoryUsage):
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::reportMemoryUsage):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::reportMemoryUsage):
* page/Frame.cpp:
(WebCore::Frame::reportMemoryUsage):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::reportMemoryUsage):
* platform/TreeShared.h:
(WebCore::TreeShared::reportMemoryUsage):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::reportMemoryUsage):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::reportMemoryUsage):
* platform/graphics/GeneratedImage.cpp:
(WebCore::GeneratedImage::reportMemoryUsage):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::reportMemoryUsage):
* platform/graphics/Image.cpp:
(WebCore::Image::reportMemoryUsage):
* platform/network/FormData.cpp:
(WebCore::FormData::reportMemoryUsage):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::reportMemoryUsage):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::reportMemoryUsage):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::reportMemoryUsage):
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::reportMemoryUsage):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::reportMemoryUsage):
* svg/SVGColor.cpp:
(WebCore::SVGColor::reportDescendantMemoryUsage):
* svg/SVGPaint.cpp:
(WebCore::SVGPaint::reportDescendantMemoryUsage):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::reportMemoryUsage):

Source/WebKit/chromium:

* tests/MemoryInstrumentationTest.cpp:
(WebCore::Instrumented::reportMemoryUsage):
(WebCore::InstrumentedRefPtr::reportMemoryUsage):
(WebCore::InstrumentedWithOwnPtr::reportMemoryUsage):
(WebCore::InstrumentedOther::reportMemoryUsage):
(WebCore::InstrumentedDOM::reportMemoryUsage):
(WebCore::TEST):
(WebCore::NonVirtualInstrumented::reportMemoryUsage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127593 268f45cc-cd09-0410-ab3c-d52691b4dbfc

115 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/ScriptWrappable.h
Source/WebCore/bindings/v8/DOMDataStore.cpp
Source/WebCore/bindings/v8/IntrusiveDOMWrapperMap.h
Source/WebCore/bindings/v8/ScriptWrappable.h
Source/WebCore/bindings/v8/V8Binding.cpp
Source/WebCore/bindings/v8/V8DOMMap.h
Source/WebCore/bindings/v8/V8PerIsolateData.cpp
Source/WebCore/css/CSSAspectRatioValue.cpp
Source/WebCore/css/CSSBorderImageSliceValue.cpp
Source/WebCore/css/CSSCalculationValue.cpp
Source/WebCore/css/CSSCanvasValue.cpp
Source/WebCore/css/CSSCharsetRule.cpp
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSCrossfadeValue.cpp
Source/WebCore/css/CSSCursorImageValue.cpp
Source/WebCore/css/CSSFontFaceRule.cpp
Source/WebCore/css/CSSFontFaceSrcValue.cpp
Source/WebCore/css/CSSFunctionValue.cpp
Source/WebCore/css/CSSGradientValue.cpp
Source/WebCore/css/CSSImageGeneratorValue.cpp
Source/WebCore/css/CSSImageSetValue.cpp
Source/WebCore/css/CSSImageValue.cpp
Source/WebCore/css/CSSImportRule.cpp
Source/WebCore/css/CSSInheritedValue.cpp
Source/WebCore/css/CSSInitialValue.cpp
Source/WebCore/css/CSSLineBoxContainValue.cpp
Source/WebCore/css/CSSMediaRule.cpp
Source/WebCore/css/CSSPageRule.cpp
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSReflectValue.cpp
Source/WebCore/css/CSSRule.cpp
Source/WebCore/css/CSSRuleList.cpp
Source/WebCore/css/CSSRuleList.h
Source/WebCore/css/CSSSelectorList.cpp
Source/WebCore/css/CSSStyleRule.cpp
Source/WebCore/css/CSSStyleSheet.cpp
Source/WebCore/css/CSSTimingFunctionValue.cpp
Source/WebCore/css/CSSUnicodeRangeValue.cpp
Source/WebCore/css/CSSUnknownRule.h
Source/WebCore/css/CSSValue.cpp
Source/WebCore/css/CSSValueList.cpp
Source/WebCore/css/CSSVariableValue.h
Source/WebCore/css/FontFeatureValue.cpp
Source/WebCore/css/FontValue.cpp
Source/WebCore/css/MediaList.cpp
Source/WebCore/css/MediaQuery.cpp
Source/WebCore/css/MediaQueryExp.cpp
Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
Source/WebCore/css/ShadowValue.cpp
Source/WebCore/css/StylePropertySet.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleRule.cpp
Source/WebCore/css/StyleRuleImport.cpp
Source/WebCore/css/StyleSheetContents.cpp
Source/WebCore/css/WebKitCSSFilterValue.cpp
Source/WebCore/css/WebKitCSSKeyframeRule.cpp
Source/WebCore/css/WebKitCSSKeyframesRule.cpp
Source/WebCore/css/WebKitCSSMixFunctionValue.cpp
Source/WebCore/css/WebKitCSSRegionRule.cpp
Source/WebCore/css/WebKitCSSSVGDocumentValue.cpp
Source/WebCore/css/WebKitCSSShaderValue.cpp
Source/WebCore/css/WebKitCSSTransformValue.cpp
Source/WebCore/dom/Attribute.h
Source/WebCore/dom/CharacterData.cpp
Source/WebCore/dom/ContainerNode.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/DocumentEventQueue.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/ElementAttributeData.cpp
Source/WebCore/dom/Event.cpp
Source/WebCore/dom/MemoryInstrumentation.cpp
Source/WebCore/dom/MemoryInstrumentation.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/QualifiedName.h
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/inspector/InspectorMemoryAgent.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/MainResourceLoader.cpp
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/SubresourceLoader.cpp
Source/WebCore/loader/SubstituteData.cpp
Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp
Source/WebCore/loader/cache/CachedFont.cpp
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/loader/cache/CachedRawResource.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResourceHandle.cpp
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/cache/CachedSVGDocument.cpp
Source/WebCore/loader/cache/CachedScript.cpp
Source/WebCore/loader/cache/CachedShader.cpp
Source/WebCore/loader/cache/CachedXSLStyleSheet.cpp
Source/WebCore/loader/cache/MemoryCache.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/platform/SharedBuffer.cpp
Source/WebCore/platform/TreeShared.h
Source/WebCore/platform/graphics/BitmapImage.cpp
Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
Source/WebCore/platform/graphics/GeneratedImage.cpp
Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp
Source/WebCore/platform/graphics/Image.cpp
Source/WebCore/platform/network/FormData.cpp
Source/WebCore/platform/network/ResourceRequestBase.cpp
Source/WebCore/platform/network/ResourceResponseBase.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebCore/svg/SVGColor.cpp
Source/WebCore/svg/SVGPaint.cpp
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/MemoryInstrumentationTest.cpp

index b31e4f7..beeb779 100644 (file)
@@ -1,5 +1,261 @@
 2012-09-05  Ilya Tikhonovsky  <loislo@chromium.org>
 
+        Web Inspector: NMI: extract MemoryObjectType constants from MemoryInstrumentation.
+        https://bugs.webkit.org/show_bug.cgi?id=95850
+
+        Reviewed by Yury Semikhatsky.
+
+        I'd like to extract MemoryObjectTypes into separate classes.
+        After that we will be able to move core NMI instrumentation code to WTF.
+
+        * bindings/js/ScriptWrappable.h:
+        (WebCore::ScriptWrappable::reportMemoryUsage):
+        * bindings/v8/DOMDataStore.cpp:
+        (WebCore::DOMDataStore::reportMemoryUsage):
+        * bindings/v8/IntrusiveDOMWrapperMap.h:
+        (WebCore::ChunkedTable::reportMemoryUsage):
+        * bindings/v8/ScriptWrappable.h:
+        (WebCore::ScriptWrappable::reportMemoryUsage):
+        * bindings/v8/V8Binding.cpp:
+        (WebCore::StringCache::reportMemoryUsage):
+        * bindings/v8/V8DOMMap.h:
+        * bindings/v8/V8PerIsolateData.cpp:
+        (WebCore::V8PerIsolateData::reportMemoryUsage):
+        * css/CSSAspectRatioValue.cpp:
+        (WebCore::CSSAspectRatioValue::reportDescendantMemoryUsage):
+        * css/CSSBorderImageSliceValue.cpp:
+        (WebCore::CSSBorderImageSliceValue::reportDescendantMemoryUsage):
+        * css/CSSCalculationValue.cpp:
+        (WebCore::CSSCalcValue::reportDescendantMemoryUsage):
+        * css/CSSCanvasValue.cpp:
+        (WebCore::CSSCanvasValue::reportDescendantMemoryUsage):
+        * css/CSSCharsetRule.cpp:
+        (WebCore::CSSCharsetRule::reportDescendantMemoryUsage):
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::reportMemoryUsage):
+        * css/CSSCrossfadeValue.cpp:
+        (WebCore::CSSCrossfadeValue::reportDescendantMemoryUsage):
+        * css/CSSCursorImageValue.cpp:
+        (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
+        * css/CSSFontFaceRule.cpp:
+        (WebCore::CSSFontFaceRule::reportDescendantMemoryUsage):
+        * css/CSSFontFaceSrcValue.cpp:
+        (WebCore::CSSFontFaceSrcValue::reportDescendantMemoryUsage):
+        * css/CSSFunctionValue.cpp:
+        (WebCore::CSSFunctionValue::reportDescendantMemoryUsage):
+        * css/CSSGradientValue.cpp:
+        (WebCore::CSSGradientColorStop::reportMemoryUsage):
+        (WebCore::CSSGradientValue::reportBaseClassMemoryUsage):
+        (WebCore::CSSLinearGradientValue::reportDescendantMemoryUsage):
+        (WebCore::CSSRadialGradientValue::reportDescendantMemoryUsage):
+        * css/CSSImageGeneratorValue.cpp:
+        (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
+        * css/CSSImageSetValue.cpp:
+        (WebCore::CSSImageSetValue::reportDescendantMemoryUsage):
+        (WebCore::CSSImageSetValue::ImageWithScale::reportMemoryUsage):
+        * css/CSSImageValue.cpp:
+        (WebCore::CSSImageValue::reportDescendantMemoryUsage):
+        * css/CSSImportRule.cpp:
+        (WebCore::CSSImportRule::reportDescendantMemoryUsage):
+        * css/CSSInheritedValue.cpp:
+        (WebCore::CSSInheritedValue::reportDescendantMemoryUsage):
+        * css/CSSInitialValue.cpp:
+        (WebCore::CSSInitialValue::reportDescendantMemoryUsage):
+        * css/CSSLineBoxContainValue.cpp:
+        (WebCore::CSSLineBoxContainValue::reportDescendantMemoryUsage):
+        * css/CSSMediaRule.cpp:
+        (WebCore::CSSMediaRule::reportDescendantMemoryUsage):
+        * css/CSSPageRule.cpp:
+        (WebCore::CSSPageRule::reportDescendantMemoryUsage):
+        * css/CSSPrimitiveValue.cpp:
+        (WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
+        * css/CSSProperty.cpp:
+        (WebCore::CSSProperty::reportMemoryUsage):
+        * css/CSSReflectValue.cpp:
+        (WebCore::CSSReflectValue::reportDescendantMemoryUsage):
+        * css/CSSRule.cpp:
+        (WebCore::CSSRule::reportBaseClassMemoryUsage):
+        * css/CSSRuleList.cpp:
+        (WebCore::StaticCSSRuleList::reportMemoryUsage):
+        * css/CSSRuleList.h:
+        * css/CSSSelectorList.cpp:
+        (WebCore::CSSSelectorList::reportMemoryUsage):
+        * css/CSSStyleRule.cpp:
+        (WebCore::CSSStyleRule::reportDescendantMemoryUsage):
+        * css/CSSStyleSheet.cpp:
+        (WebCore::CSSStyleSheet::reportMemoryUsage):
+        * css/CSSTimingFunctionValue.cpp:
+        (WebCore::CSSLinearTimingFunctionValue::reportDescendantMemoryUsage):
+        (WebCore::CSSCubicBezierTimingFunctionValue::reportDescendantMemoryUsage):
+        (WebCore::CSSStepsTimingFunctionValue::reportDescendantMemoryUsage):
+        * css/CSSUnicodeRangeValue.cpp:
+        (WebCore::CSSUnicodeRangeValue::reportDescendantMemoryUsage):
+        * css/CSSUnknownRule.h:
+        (WebCore::CSSUnknownRule::reportDescendantMemoryUsage):
+        * css/CSSValue.cpp:
+        (WebCore::TextCloneCSSValue::reportDescendantMemoryUsage):
+        * css/CSSValueList.cpp:
+        (WebCore::CSSValueList::reportDescendantMemoryUsage):
+        * css/CSSVariableValue.h:
+        (WebCore::CSSVariableValue::reportDescendantMemoryUsage):
+        * css/FontFeatureValue.cpp:
+        (WebCore::FontFeatureValue::reportDescendantMemoryUsage):
+        * css/FontValue.cpp:
+        (WebCore::FontValue::reportDescendantMemoryUsage):
+        * css/MediaList.cpp:
+        (WebCore::MediaQuerySet::reportMemoryUsage):
+        (WebCore::MediaList::reportMemoryUsage):
+        * css/MediaQuery.cpp:
+        (WebCore::MediaQuery::reportMemoryUsage):
+        * css/MediaQueryExp.cpp:
+        (WebCore::MediaQueryExp::reportMemoryUsage):
+        * css/PropertySetCSSStyleDeclaration.cpp:
+        (WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage):
+        (WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage):
+        (WebCore::InlineCSSStyleDeclaration::reportMemoryUsage):
+        * css/ShadowValue.cpp:
+        (WebCore::ShadowValue::reportDescendantMemoryUsage):
+        * css/StylePropertySet.cpp:
+        (WebCore::StylePropertySet::reportMemoryUsage):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::Features::reportMemoryUsage):
+        (WebCore::StyleResolver::collectMatchingRulesForList):
+        * css/StyleRule.cpp:
+        (WebCore::StyleRuleBase::reportMemoryUsage):
+        (WebCore::StyleRule::reportDescendantMemoryUsage):
+        (WebCore::StyleRulePage::reportDescendantMemoryUsage):
+        (WebCore::StyleRuleFontFace::reportDescendantMemoryUsage):
+        (WebCore::StyleRuleBlock::reportDescendantMemoryUsage):
+        (WebCore::StyleRuleMedia::reportDescendantMemoryUsage):
+        (WebCore::StyleRuleRegion::reportDescendantMemoryUsage):
+        * css/StyleRuleImport.cpp:
+        (WebCore::StyleRuleImport::reportDescendantMemoryUsage):
+        * css/StyleSheetContents.cpp:
+        (WebCore::StyleSheetContents::reportMemoryUsage):
+        * css/WebKitCSSFilterValue.cpp:
+        (WebCore::WebKitCSSFilterValue::reportDescendantMemoryUsage):
+        * css/WebKitCSSKeyframeRule.cpp:
+        (WebCore::StyleKeyframe::reportMemoryUsage):
+        (WebCore::WebKitCSSKeyframeRule::reportDescendantMemoryUsage):
+        * css/WebKitCSSKeyframesRule.cpp:
+        (WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
+        (WebCore::WebKitCSSKeyframesRule::reportDescendantMemoryUsage):
+        * css/WebKitCSSMixFunctionValue.cpp:
+        (WebCore::WebKitCSSMixFunctionValue::reportDescendantMemoryUsage):
+        * css/WebKitCSSRegionRule.cpp:
+        (WebCore::WebKitCSSRegionRule::reportDescendantMemoryUsage):
+        * css/WebKitCSSSVGDocumentValue.cpp:
+        (WebCore::WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage):
+        * css/WebKitCSSShaderValue.cpp:
+        (WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage):
+        * css/WebKitCSSTransformValue.cpp:
+        (WebCore::WebKitCSSTransformValue::reportDescendantMemoryUsage):
+        * dom/Attribute.h:
+        (WebCore::Attribute::reportMemoryUsage):
+        * dom/CharacterData.cpp:
+        (WebCore::CharacterData::reportMemoryUsage):
+        * dom/ContainerNode.h:
+        (WebCore::ContainerNode::reportMemoryUsage):
+        * dom/Document.cpp:
+        (WebCore::Document::reportMemoryUsage):
+        * dom/DocumentEventQueue.cpp:
+        (WebCore::DocumentEventQueue::reportMemoryUsage):
+        * dom/Element.h:
+        (WebCore::Element::reportMemoryUsage):
+        * dom/ElementAttributeData.cpp:
+        (WebCore::ElementAttributeData::reportMemoryUsage):
+        * dom/Event.cpp:
+        (WebCore::Event::reportMemoryUsage):
+        * dom/MemoryInstrumentation.cpp:
+        (WebCore):
+        * dom/MemoryInstrumentation.h:
+        (WebCore):
+        (GenericMemoryTypes):
+        (WebCore::MemoryInstrumentation::addRootObject):
+        (WebCore::MemoryObjectInfo::reportObjectInfo):
+        (WebCoreMemoryTypes):
+        * dom/Node.cpp:
+        (WebCore::Node::reportMemoryUsage):
+        * dom/QualifiedName.h:
+        (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
+        (WebCore::QualifiedName::reportMemoryUsage):
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::reportMemoryUsage):
+        * inspector/InspectorMemoryAgent.cpp:
+        (WebCore):
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::reportMemoryUsage):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::reportMemoryUsage):
+        * loader/MainResourceLoader.cpp:
+        (WebCore::MainResourceLoader::reportMemoryUsage):
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::reportMemoryUsage):
+        * loader/SubresourceLoader.cpp:
+        (WebCore::SubresourceLoader::reportMemoryUsage):
+        * loader/SubstituteData.cpp:
+        (WebCore::SubstituteData::reportMemoryUsage):
+        * loader/cache/CachedCSSStyleSheet.cpp:
+        (WebCore::CachedCSSStyleSheet::reportMemoryUsage):
+        * loader/cache/CachedFont.cpp:
+        (WebCore::CachedFont::reportMemoryUsage):
+        * loader/cache/CachedImage.cpp:
+        (WebCore::CachedImage::reportMemoryUsage):
+        * loader/cache/CachedRawResource.cpp:
+        (WebCore::CachedRawResource::reportMemoryUsage):
+        * loader/cache/CachedResource.cpp:
+        (WebCore::CachedResource::reportMemoryUsage):
+        * loader/cache/CachedResourceHandle.cpp:
+        (WebCore::CachedResourceHandleBase::reportMemoryUsage):
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::reportMemoryUsage):
+        * loader/cache/CachedSVGDocument.cpp:
+        (WebCore::CachedSVGDocument::reportMemoryUsage):
+        * loader/cache/CachedScript.cpp:
+        (WebCore::CachedScript::reportMemoryUsage):
+        * loader/cache/CachedShader.cpp:
+        (WebCore::CachedShader::reportMemoryUsage):
+        * loader/cache/CachedXSLStyleSheet.cpp:
+        (WebCore::CachedXSLStyleSheet::reportMemoryUsage):
+        * loader/cache/MemoryCache.cpp:
+        (WebCore::MemoryCache::reportMemoryUsage):
+        * page/Frame.cpp:
+        (WebCore::Frame::reportMemoryUsage):
+        * platform/SharedBuffer.cpp:
+        (WebCore::SharedBuffer::reportMemoryUsage):
+        * platform/TreeShared.h:
+        (WebCore::TreeShared::reportMemoryUsage):
+        * platform/graphics/BitmapImage.cpp:
+        (WebCore::BitmapImage::reportMemoryUsage):
+        * platform/graphics/CrossfadeGeneratedImage.cpp:
+        (WebCore::CrossfadeGeneratedImage::reportMemoryUsage):
+        * platform/graphics/GeneratedImage.cpp:
+        (WebCore::GeneratedImage::reportMemoryUsage):
+        * platform/graphics/GeneratorGeneratedImage.cpp:
+        (WebCore::GeneratorGeneratedImage::reportMemoryUsage):
+        * platform/graphics/Image.cpp:
+        (WebCore::Image::reportMemoryUsage):
+        * platform/network/FormData.cpp:
+        (WebCore::FormData::reportMemoryUsage):
+        * platform/network/ResourceRequestBase.cpp:
+        (WebCore::ResourceRequestBase::reportMemoryUsage):
+        * platform/network/ResourceResponseBase.cpp:
+        (WebCore::ResourceResponseBase::reportMemoryUsage):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::reportMemoryUsage):
+        * rendering/style/StyleRareInheritedData.cpp:
+        (WebCore::StyleRareInheritedData::reportMemoryUsage):
+        * rendering/style/StyleRareNonInheritedData.cpp:
+        (WebCore::StyleRareNonInheritedData::reportMemoryUsage):
+        * svg/SVGColor.cpp:
+        (WebCore::SVGColor::reportDescendantMemoryUsage):
+        * svg/SVGPaint.cpp:
+        (WebCore::SVGPaint::reportDescendantMemoryUsage):
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::reportMemoryUsage):
+
+2012-09-05  Ilya Tikhonovsky  <loislo@chromium.org>
+
         Web Inspector: NMI: extract overloaded instrumentation members for WebCore classes from core NMI code.
         https://bugs.webkit.org/show_bug.cgi?id=95834
 
index cd0873a..da108ed 100644 (file)
@@ -57,7 +57,7 @@ public:
 
     void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
         info.addMember(m_wrapper);
     }
 
index 227619e..6373943 100644 (file)
@@ -121,7 +121,7 @@ void* DOMDataStore::getDOMWrapperMap(DOMWrapperMapType type)
 
 void DOMDataStore::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
     info.addInstrumentedMember(m_domNodeMap);
     info.addInstrumentedMember(m_activeDomNodeMap);
     info.addInstrumentedMember(m_domObjectMap);
index ebcf767..e1c1a4b 100644 (file)
@@ -104,7 +104,7 @@ class ChunkedTable {
 
     void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
         for (Chunk* chunk = m_chunks; chunk; chunk = chunk->m_previous)
             info.addMember(chunk);
     }
@@ -186,7 +186,7 @@ public:
 
     virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
         info.addInstrumentedMember(m_table);
     }
 
index d32b9b8..6356f00 100644 (file)
@@ -55,7 +55,7 @@ public:
 
     void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
         info.addMember(m_wrapper);
     }
 
index acd043a..e869204 100644 (file)
@@ -219,7 +219,7 @@ v8::Persistent<v8::FunctionTemplate> createRawTemplate()
 
 void StringCache::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
     info.addHashMap(m_stringCache);
 }
     
index cc76ffa..d0bcb29 100644 (file)
@@ -136,7 +136,7 @@ namespace WebCore {
 
         virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
         {
-            MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
+            MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
             info.addHashMap(m_map);
         }
 
index 183c312..34539f7 100644 (file)
@@ -75,7 +75,7 @@ void V8PerIsolateData::dispose(v8::Isolate* isolate)
 
 void V8PerIsolateData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
     info.addHashMap(m_rawTemplates);
     info.addHashMap(m_templates);
     info.addInstrumentedMember(m_stringCache);
index 5897f51..246dbf7 100644 (file)
@@ -45,7 +45,7 @@ String CSSAspectRatioValue::customCssText() const
 
 void CSSAspectRatioValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 }
 
 }
index 394cc28..2c26cd8 100644 (file)
@@ -52,7 +52,7 @@ String CSSBorderImageSliceValue::customCssText() const
 
 void CSSBorderImageSliceValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_slices);
 }
 
index 8202535..5fcc7ea 100755 (executable)
@@ -109,7 +109,7 @@ bool CSSCalcValue::hasVariableReference() const
 
 void CSSCalcValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 }
     
 double CSSCalcValue::clampToPermittedRange(double value) const
@@ -224,7 +224,7 @@ public:
 
     virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
         info.addInstrumentedMember(m_value);
     }
     
@@ -322,7 +322,7 @@ public:
 
     virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
         info.addInstrumentedMember(m_leftSide);
         info.addInstrumentedMember(m_rightSide);
     }
index c4c465c..5324164 100644 (file)
@@ -98,7 +98,7 @@ PassRefPtr<Image> CSSCanvasValue::image(RenderObject* renderer, const IntSize& /
 
 void CSSCanvasValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSImageGeneratorValue::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_name);
     info.addInstrumentedMember(m_element);
index a3c3e1b..63ee178 100644 (file)
@@ -38,7 +38,7 @@ String CSSCharsetRule::cssText() const
 
 void CSSCharsetRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_encoding);
 }
index 0c4772d..eff27cf 100644 (file)
@@ -2731,7 +2731,7 @@ PassRefPtr<StylePropertySet> CSSComputedStyleDeclaration::copyPropertiesInSet(co
 
 void CSSComputedStyleDeclaration::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_node);
 }
 
index 6ccc8b7..3bee433 100644 (file)
@@ -141,7 +141,7 @@ void CSSCrossfadeValue::loadSubimages(CachedResourceLoader* cachedResourceLoader
 
 void CSSCrossfadeValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSImageGeneratorValue::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_fromValue);
     info.addInstrumentedMember(m_toValue);
index 35038fc..2e87d50 100644 (file)
@@ -135,7 +135,7 @@ void CSSCursorImageValue::removeReferencedElement(SVGElement* element)
 
 void CSSCursorImageValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSImageValue::reportDescendantMemoryUsage(memoryObjectInfo);
 #if ENABLE(SVG)
     info.addInstrumentedHashSet(m_referencedElements);
index 09529e4..8820c2d 100644 (file)
@@ -70,7 +70,7 @@ void CSSFontFaceRule::reattach(StyleRuleFontFace* rule)
 
 void CSSFontFaceRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_fontFaceRule);
     info.addInstrumentedMember(m_propertiesCSSOMWrapper);
index 8ca2c1d..42fb74c 100644 (file)
@@ -103,7 +103,7 @@ CachedFont* CSSFontFaceSrcValue::cachedFont(Document* document)
 
 void CSSFontFaceSrcValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_resource);
     info.addInstrumentedMember(m_format);
     // FIXME: add m_cachedFont when MemoryCache is instrumented.
index 204cf4a..ac8dd41 100644 (file)
@@ -54,7 +54,7 @@ String CSSFunctionValue::customCssText() const
 
 void CSSFunctionValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_name);
     info.addInstrumentedMember(m_args);
 }
index 85514f5..eb8ca14 100644 (file)
@@ -46,7 +46,7 @@ namespace WebCore {
 
 void CSSGradientColorStop::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_position);
     info.addInstrumentedMember(m_color);
 }
@@ -463,7 +463,7 @@ bool CSSGradientValue::isCacheable() const
 
 void CSSGradientValue::reportBaseClassMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSImageGeneratorValue::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_firstX);
     info.addInstrumentedMember(m_firstY);
@@ -636,7 +636,7 @@ PassRefPtr<Gradient> CSSLinearGradientValue::createGradient(RenderObject* render
 
 void CSSLinearGradientValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSGradientValue::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_angle);
 }
@@ -961,7 +961,7 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(RenderObject* render
 
 void CSSRadialGradientValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSGradientValue::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_firstRadius);
     info.addInstrumentedMember(m_secondRadius);
index 63040f3..c9632b7 100644 (file)
@@ -111,7 +111,7 @@ void CSSImageGeneratorValue::putImage(const IntSize& size, PassRefPtr<Image> ima
 
 void CSSImageGeneratorValue::reportBaseClassMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addHashCountedSet(m_sizes);
     info.addHashMap(m_clients);
     info.addHashMap(m_images); // FIXME: instrument Image
index 28451a2..4a374ea 100644 (file)
@@ -166,14 +166,14 @@ PassRefPtr<CSSImageSetValue> CSSImageSetValue::cloneForCSSOM() const
 
 void CSSImageSetValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSValueList::reportDescendantMemoryUsage(memoryObjectInfo);
     info.addInstrumentedVector(m_imagesInSet);
 }
 
 void CSSImageSetValue::ImageWithScale::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(imageURL);
 }
 
index b7f4d73..74b28a7 100644 (file)
@@ -128,7 +128,7 @@ PassRefPtr<CSSValue> CSSImageValue::cloneForCSSOM() const
 
 void CSSImageValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_url);
     // No need to report m_image as it is counted as part of RenderArena.
 }
index 35569de..27278e6 100644 (file)
@@ -79,7 +79,7 @@ String CSSImportRule::cssText() const
 
 void CSSImportRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_importRule);
     info.addInstrumentedMember(m_mediaCSSOMWrapper);
index f7a426d..091a2fa 100644 (file)
@@ -33,7 +33,7 @@ String CSSInheritedValue::customCssText() const
 
 void CSSInheritedValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 }
 
 } // namespace WebCore
index 775fe0f..fd9c87b 100644 (file)
@@ -33,7 +33,7 @@ String CSSInitialValue::customCssText() const
 
 void CSSInitialValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 }
 
 } // namespace WebCore
index f9e3db5..4f27538 100644 (file)
@@ -76,7 +76,7 @@ String CSSLineBoxContainValue::customCssText() const
 
 void CSSLineBoxContainValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 }
 
 }
index 278670f..7123161 100644 (file)
@@ -177,7 +177,7 @@ void CSSMediaRule::reattach(StyleRuleMedia* rule)
 
 void CSSMediaRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_mediaCSSOMWrapper);
     info.addInstrumentedVector(m_childRuleCSSOMWrappers);
index 6f0da80..839bc20 100644 (file)
@@ -104,7 +104,7 @@ void CSSPageRule::reattach(StyleRulePage* rule)
 
 void CSSPageRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_pageRule);
     info.addInstrumentedMember(m_propertiesCSSOMWrapper);
index c3850f7..569d4dc 100644 (file)
@@ -1249,7 +1249,7 @@ PassRefPtr<CSSPrimitiveValue> CSSPrimitiveValue::cloneForCSSOM() const
 
 void CSSPrimitiveValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     switch (m_primitiveUnitType) {
     case CSS_ATTR:
     case CSS_COUNTER_NAME:
index 444887c..25f64e5 100644 (file)
@@ -714,7 +714,7 @@ bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID)
 
 void CSSProperty::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_value);
 }
 
index 10ec8c0..782caa0 100644 (file)
@@ -70,7 +70,7 @@ void CSSReflectValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const Sty
 
 void CSSReflectValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_offset);
     info.addInstrumentedMember(m_mask);
 }
index 2915a6e..fa7ecf1 100644 (file)
@@ -212,7 +212,7 @@ const CSSParserContext& CSSRule::parserContext() const
 
 void CSSRule::reportBaseClassMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     if (m_parentIsRule)
         info.addInstrumentedMember(m_parentRule);
     else
index aed1a7c..472b3dd 100644 (file)
@@ -53,7 +53,7 @@ void StaticCSSRuleList::deref()
 
 void StaticCSSRuleList::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedVector(m_rules);
 }
 
index 311ead5..ed3fddb 100644 (file)
@@ -88,7 +88,7 @@ public:
 
     virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
         info.addInstrumentedMember(m_rule);
     }
     
index 3cf020a..5adbaaf 100644 (file)
@@ -145,7 +145,7 @@ String CSSSelectorList::selectorsText() const
 
 void CSSSelectorList::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addRawBuffer(m_selectorArray, length() * sizeof(CSSSelector));
 }
 
index 29703b1..8cc610b 100644 (file)
@@ -131,7 +131,7 @@ void CSSStyleRule::reattach(StyleRule* rule)
 
 void CSSStyleRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_styleRule);
     info.addInstrumentedMember(m_propertiesCSSOMWrapper);
index 3851220..4535431 100644 (file)
@@ -58,7 +58,7 @@ private:
 
     virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
         info.addInstrumentedMember(m_styleSheet);
     }
     
@@ -184,7 +184,7 @@ void CSSStyleSheet::reattachCSSOMWrappers()
 
 void CSSStyleSheet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_contents);
     info.addInstrumentedMember(m_title);
     info.addInstrumentedMember(m_mediaQueries);
index 1c72093..264928d 100644 (file)
@@ -38,7 +38,7 @@ String CSSLinearTimingFunctionValue::customCssText() const
 
 void CSSLinearTimingFunctionValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 }
 
 String CSSCubicBezierTimingFunctionValue::customCssText() const
@@ -52,7 +52,7 @@ String CSSCubicBezierTimingFunctionValue::customCssText() const
 
 void CSSCubicBezierTimingFunctionValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 }
 
 String CSSStepsTimingFunctionValue::customCssText() const
@@ -62,7 +62,7 @@ String CSSStepsTimingFunctionValue::customCssText() const
 
 void CSSStepsTimingFunctionValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 }
 
 } // namespace WebCore
index abd806d..f424853 100644 (file)
@@ -40,7 +40,7 @@ String CSSUnicodeRangeValue::customCssText() const
 
 void CSSUnicodeRangeValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 }
 
 }
index ab68aef..5aa7464 100644 (file)
@@ -33,7 +33,7 @@ public:
 
     void reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
         CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
     }
 };
index ee0a18c..042e102 100644 (file)
@@ -81,7 +81,7 @@ public:
 
     void reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
         info.addInstrumentedMember(m_cssText);
     }
 
index b120fa2..e4c90fc 100644 (file)
@@ -189,7 +189,7 @@ PassRefPtr<CSSValueList> CSSValueList::cloneForCSSOM() const
 
 void CSSValueList::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedVector(m_values);
 }
 
index 3020e1e..f470b39 100644 (file)
@@ -50,7 +50,7 @@ public:
 
     void reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
         info.addInstrumentedMember(m_name);
         info.addInstrumentedMember(m_value);
     }
index 413eaa4..1206d94 100644 (file)
@@ -52,7 +52,7 @@ String FontFeatureValue::customCssText() const
 
 void FontFeatureValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_tag);
 }
 
index 4f8742c..6f083b1 100644 (file)
@@ -68,7 +68,7 @@ String FontValue::customCssText() const
 
 void FontValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(style);
     info.addInstrumentedMember(variant);
     info.addInstrumentedMember(weight);
index 67a6d5e..926b309 100644 (file)
@@ -214,7 +214,7 @@ String MediaQuerySet::mediaText() const
 
 void MediaQuerySet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedVector(m_queries);
 }
     
@@ -292,7 +292,7 @@ void MediaList::reattach(MediaQuerySet* mediaQueries)
 
 void MediaList::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_mediaQueries);
 }
 
index 44c32c1..ec40e43 100644 (file)
@@ -136,7 +136,7 @@ String MediaQuery::cssText() const
 
 void MediaQuery::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_mediaType);
     info.addInstrumentedVectorPtr(m_expressions);
     info.addInstrumentedMember(m_serializationCache);
index 4b91997..3aa6626 100644 (file)
@@ -111,7 +111,7 @@ String MediaQueryExp::serialize() const
 
 void MediaQueryExp::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_mediaFeature);
     info.addInstrumentedMember(m_serializationCache);
     info.addInstrumentedMember(m_value);
index 5fc2d38..3458091 100644 (file)
@@ -171,7 +171,7 @@ void PropertySetCSSStyleDeclaration::deref()
 
 void PropertySetCSSStyleDeclaration::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_propertySet);
     if (m_cssomCSSValueClones)
         info.addInstrumentedMapEntries(*m_cssomCSSValueClones);
@@ -430,14 +430,14 @@ void StyleRuleCSSStyleDeclaration::reattach(StylePropertySet* propertySet)
 
 void StyleRuleCSSStyleDeclaration::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     PropertySetCSSStyleDeclaration::reportMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_parentRule);
 }
 
 void InlineCSSStyleDeclaration::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     PropertySetCSSStyleDeclaration::reportMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_parentElement);
 }
index 311e9b1..3914504 100644 (file)
@@ -81,7 +81,7 @@ String ShadowValue::customCssText() const
 
 void ShadowValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(x);
     info.addInstrumentedMember(y);
     info.addInstrumentedMember(blur);
index b94950d..d446938 100644 (file)
@@ -1119,7 +1119,7 @@ unsigned StylePropertySet::averageSizeInBytes()
 void StylePropertySet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     size_t actualSize = m_isMutable ? sizeof(StylePropertySet) : immutableStylePropertySetSize(m_arraySize);
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS, actualSize);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS, actualSize);
     if (m_isMutable)
         info.addVectorPtr(m_mutablePropertyVector);
 
index 395e4d9..78ccffa 100644 (file)
@@ -741,7 +741,7 @@ void StyleResolver::Features::clear()
 
 void StyleResolver::Features::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addHashSet(idsInRules);
     info.addHashSet(attrsInRules);
     info.addVector(siblingRules);
@@ -2547,7 +2547,7 @@ RuleData::RuleData(StyleRule* rule, unsigned selectorIndex, unsigned position, b
 
 void RuleData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 }
 
 RuleSet::RuleSet()
@@ -2565,7 +2565,7 @@ static void reportAtomRuleMap(MemoryClassInfo* info, const RuleSet::AtomRuleMap&
 
 void RuleSet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     reportAtomRuleMap(&info, m_idRules);
     reportAtomRuleMap(&info, m_classRules);
     reportAtomRuleMap(&info, m_tagRules);
@@ -2579,7 +2579,7 @@ void RuleSet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 
 void RuleSet::RuleSetSelectorPair::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(ruleSet);
 }
 
@@ -5727,25 +5727,25 @@ void StyleResolver::loadPendingResources()
 
 void StyleResolver::MatchedProperties::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(properties);
 }
 
 void StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedVector(matchedProperties);
 }
 
 void MediaQueryResult::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_expression);
 }
 
 void StyleResolver::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addMember(m_style);
     info.addInstrumentedMember(m_authorStyle);
     info.addInstrumentedMember(m_userStyle);
index 03efc3a..da4f2f4 100644 (file)
@@ -81,7 +81,7 @@ void StyleRuleBase::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     case Unknown:
     case Charset:
     case Keyframe:
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
         return;
     }
     ASSERT_NOT_REACHED();
@@ -208,7 +208,7 @@ unsigned StyleRule::averageSizeInBytes()
 
 void StyleRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_properties);
     info.addInstrumentedMember(m_selectorList);
 }
@@ -271,7 +271,7 @@ void StyleRulePage::setProperties(PassRefPtr<StylePropertySet> properties)
 
 void StyleRulePage::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_properties);
     info.addInstrumentedMember(m_selectorList);
 }
@@ -305,7 +305,7 @@ void StyleRuleFontFace::setProperties(PassRefPtr<StylePropertySet> properties)
 
 void StyleRuleFontFace::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_properties);
 }
 
@@ -336,7 +336,7 @@ void StyleRuleBlock::wrapperRemoveRule(unsigned index)
 
 void StyleRuleBlock::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedVector(m_childRules);
 }
 
@@ -355,7 +355,7 @@ StyleRuleMedia::StyleRuleMedia(const StyleRuleMedia& o)
 
 void StyleRuleMedia::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_mediaQueries);
 }
 
@@ -373,7 +373,7 @@ StyleRuleRegion::StyleRuleRegion(const StyleRuleRegion& o)
 
 void StyleRuleRegion::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_selectorList);
 }
 
index aad8640..6e4501b 100644 (file)
@@ -143,7 +143,7 @@ void StyleRuleImport::reattachStyleSheetContents(StyleSheetContents* contents)
 
 void StyleRuleImport::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_strHref);
     info.addInstrumentedMember(m_mediaQueries);
     info.addInstrumentedMember(m_styleSheet);
index 86e4d2c..37f2770 100644 (file)
@@ -492,7 +492,7 @@ void StyleSheetContents::removedFromMemoryCache()
 
 void StyleSheetContents::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_originalURL);
     info.addInstrumentedMember(m_encodingFromCharsetRule);
     info.addVector(m_importRules);
index f70b267..c1ecf33 100644 (file)
@@ -113,7 +113,7 @@ PassRefPtr<WebKitCSSFilterValue> WebKitCSSFilterValue::cloneForCSSOM() const
 
 void WebKitCSSFilterValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSValueList::reportDescendantMemoryUsage(memoryObjectInfo);
 }
 
index 9257079..1acbb77 100644 (file)
@@ -91,7 +91,7 @@ String StyleKeyframe::cssText() const
 
 void StyleKeyframe::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_properties);
     info.addInstrumentedMember(m_key);
 }
@@ -118,7 +118,7 @@ CSSStyleDeclaration* WebKitCSSKeyframeRule::style() const
 
 void WebKitCSSKeyframeRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_keyframe);
     info.addInstrumentedMember(m_propertiesCSSOMWrapper);
index ca47f79..a026021 100644 (file)
@@ -89,7 +89,7 @@ int StyleRuleKeyframes::findKeyframeIndex(const String& key) const
 
 void StyleRuleKeyframes::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedVector(m_keyframes);
     info.addInstrumentedMember(m_name);
 }
@@ -208,7 +208,7 @@ void WebKitCSSKeyframesRule::reattach(StyleRuleKeyframes* rule)
 
 void WebKitCSSKeyframesRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_keyframesRule);
     info.addInstrumentedVector(m_childRuleCSSOMWrappers);
index 7f8d27d..6de71dd 100644 (file)
@@ -58,7 +58,7 @@ PassRefPtr<WebKitCSSMixFunctionValue> WebKitCSSMixFunctionValue::cloneForCSSOM()
 
 void WebKitCSSMixFunctionValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSValueList::reportDescendantMemoryUsage(memoryObjectInfo);
 }
 
index 2db2059..e64832f 100644 (file)
@@ -110,7 +110,7 @@ void WebKitCSSRegionRule::reattach(StyleRuleRegion* rule)
 
 void WebKitCSSRegionRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_regionRule);
     info.addInstrumentedVector(m_childRuleCSSOMWrappers);
index d2fbdf1..93dbecf 100644 (file)
@@ -66,7 +66,7 @@ String WebKitCSSSVGDocumentValue::customCssText() const
 
 void WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_url);
     // FIXME: add m_document when cached resources are instrumented.
 }
index b89b183..c0ffb31 100644 (file)
@@ -82,7 +82,7 @@ String WebKitCSSShaderValue::customCssText() const
 
 void WebKitCSSShaderValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_url);
 }
     
index 8e196e5..5bd94bd 100644 (file)
@@ -107,7 +107,7 @@ PassRefPtr<WebKitCSSTransformValue> WebKitCSSTransformValue::cloneForCSSOM() con
 
 void WebKitCSSTransformValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     CSSValueList::reportDescendantMemoryUsage(memoryObjectInfo);
 }
 
index 81a0bbd..d182ff2 100644 (file)
@@ -69,7 +69,7 @@ public:
 
     void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
         info.addInstrumentedMember(m_name);
         info.addInstrumentedMember(m_value);
     }
index 8c930d8..be45a55 100644 (file)
@@ -96,7 +96,7 @@ unsigned CharacterData::parserAppendData(const UChar* data, unsigned dataLength,
 
 void CharacterData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
     Node::reportMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_data);
 }
index 8b92477..6312714 100644 (file)
@@ -103,7 +103,7 @@ public:
 
     virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
         Node::reportMemoryUsage(memoryObjectInfo);
         info.addInstrumentedMember(m_firstChild);
         info.addInstrumentedMember(m_lastChild);
index 4465751..1da1c81 100644 (file)
@@ -6123,7 +6123,7 @@ void Document::setContextFeatures(PassRefPtr<ContextFeatures> features)
 
 void Document::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
     info.addInstrumentedMember(m_styleResolver);
     ContainerNode::reportMemoryUsage(memoryObjectInfo);
     info.addVector(m_customFonts);
index f9a717e..2d42994 100644 (file)
@@ -110,7 +110,7 @@ void DocumentEventQueue::enqueueOrDispatchScrollEvent(PassRefPtr<Node> target, S
 
 void DocumentEventQueue::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
     info.addMember(m_pendingEventTimer);
     info.addInstrumentedHashSet(m_queuedEvents);
     info.addInstrumentedHashSet(m_nodesWithQueuedScrollEvents);
index 140bc0b..9025fb7 100644 (file)
@@ -436,7 +436,7 @@ public:
 
     virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
         ContainerNode::reportMemoryUsage(memoryObjectInfo);
         info.addInstrumentedMember(m_tagName);
         info.addInstrumentedMember(m_attributeData);
index d078fa4..95a024b 100644 (file)
@@ -298,7 +298,7 @@ void ElementAttributeData::detachAttrObjectsFromElement(Element* element) const
 void ElementAttributeData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     size_t actualSize = m_isMutable ? sizeof(ElementAttributeData) : immutableElementAttributeDataSize(m_arraySize);
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM, actualSize);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM, actualSize);
     info.addInstrumentedMember(m_inlineStyleDecl);
     info.addInstrumentedMember(m_attributeStyle);
     info.addMember(m_classNames);
index f19cbdd..30d3cea 100644 (file)
@@ -157,7 +157,7 @@ void Event::storeResult(const String&)
 
 void Event::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
     info.addInstrumentedMember(m_type);
     info.addMember(m_currentTarget);
     info.addMember(m_target);
index 9eb7ddf..87465dd 100644 (file)
 
 namespace WebCore {
 
-MemoryObjectType MemoryInstrumentation::Other = "Other";
-MemoryObjectType MemoryInstrumentation::DOM = "DOM";
-MemoryObjectType MemoryInstrumentation::CSS = "CSS";
-MemoryObjectType MemoryInstrumentation::Binding = "Binding";
-MemoryObjectType MemoryInstrumentation::Loader = "Loader";
-MemoryObjectType MemoryInstrumentation::MemoryCacheStructures = "MemoryCacheStructures";
-MemoryObjectType MemoryInstrumentation::CachedResource = "CachedResource";
-MemoryObjectType MemoryInstrumentation::CachedResourceCSS = "CachedResourceCSS";
-MemoryObjectType MemoryInstrumentation::CachedResourceFont = "CachedResourceFont";
-MemoryObjectType MemoryInstrumentation::CachedResourceImage = "CachedResourceImage";
-MemoryObjectType MemoryInstrumentation::CachedResourceScript = "CachedResourceScript";
-MemoryObjectType MemoryInstrumentation::CachedResourceSVG = "CachedResourceSVG";
-MemoryObjectType MemoryInstrumentation::CachedResourceShader = "CachedResourceShader";
-MemoryObjectType MemoryInstrumentation::CachedResourceXSLT = "CachedResourceXSLT";
+MemoryObjectType GenericMemoryTypes::Other = "Other";
+
+MemoryObjectType WebCoreMemoryTypes::DOM = "DOM";
+MemoryObjectType WebCoreMemoryTypes::CSS = "CSS";
+MemoryObjectType WebCoreMemoryTypes::Binding = "Binding";
+MemoryObjectType WebCoreMemoryTypes::Loader = "Loader";
+MemoryObjectType WebCoreMemoryTypes::MemoryCacheStructures = "MemoryCacheStructures";
+MemoryObjectType WebCoreMemoryTypes::CachedResource = "CachedResource";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceCSS = "CachedResourceCSS";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceFont = "CachedResourceFont";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceImage = "CachedResourceImage";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceScript = "CachedResourceScript";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceSVG = "CachedResourceSVG";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceShader = "CachedResourceShader";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceXSLT = "CachedResourceXSLT";
 
 template<> void MemoryInstrumentationTraits::addInstrumentedObject<String>(MemoryInstrumentation* instrumentation, const String* const& string, MemoryObjectType ownerObjectType, MemoryOwningType owningType)
 {
index 3e0082b..8021a09 100644 (file)
@@ -46,6 +46,12 @@ class MemoryObjectInfo;
 class MemoryInstrumentation;
 
 typedef const char* MemoryObjectType;
+
+class GenericMemoryTypes {
+public:
+    static MemoryObjectType Other;
+};
+
 enum MemoryOwningType {
     byPointer,
     byReference
@@ -61,24 +67,9 @@ class MemoryInstrumentation {
 public:
     virtual ~MemoryInstrumentation() { }
 
-    static MemoryObjectType Other;
-    static MemoryObjectType DOM;
-    static MemoryObjectType CSS;
-    static MemoryObjectType Binding;
-    static MemoryObjectType Loader;
-    static MemoryObjectType MemoryCacheStructures;
-    static MemoryObjectType CachedResource;
-    static MemoryObjectType CachedResourceCSS;
-    static MemoryObjectType CachedResourceFont;
-    static MemoryObjectType CachedResourceImage;
-    static MemoryObjectType CachedResourceScript;
-    static MemoryObjectType CachedResourceSVG;
-    static MemoryObjectType CachedResourceShader;
-    static MemoryObjectType CachedResourceXSLT;
-
-    template<typename T> void addRootObject(const T& t)
+    template <typename T> void addRootObject(const T& t)
     {
-        addInstrumentedObject(t, Other);
+        addInstrumentedObject(t, GenericMemoryTypes::Other);
         processDeferredInstrumentedPointers();
     }
 
@@ -197,7 +188,7 @@ private:
     {
         if (!m_objectSize) {
             m_objectSize = actualSize ? actualSize : sizeof(T);
-            if (objectType != MemoryInstrumentation::Other)
+            if (objectType != GenericMemoryTypes::Other)
                 m_objectType = objectType;
         }
     }
@@ -415,6 +406,23 @@ template<> void MemoryInstrumentationTraits::addObject<const StringImpl>(MemoryI
 template<> void MemoryInstrumentationTraits::addObject<AtomicString>(MemoryInstrumentation*, const AtomicString* const&, MemoryObjectType, MemoryOwningType);
 template<> void MemoryInstrumentationTraits::addObject<const AtomicString>(MemoryInstrumentation*, const AtomicString* const&, MemoryObjectType, MemoryOwningType);
 
+class WebCoreMemoryTypes {
+public:
+    static MemoryObjectType DOM;
+    static MemoryObjectType CSS;
+    static MemoryObjectType Binding;
+    static MemoryObjectType Loader;
+    static MemoryObjectType MemoryCacheStructures;
+    static MemoryObjectType CachedResource;
+    static MemoryObjectType CachedResourceCSS;
+    static MemoryObjectType CachedResourceFont;
+    static MemoryObjectType CachedResourceImage;
+    static MemoryObjectType CachedResourceScript;
+    static MemoryObjectType CachedResourceSVG;
+    static MemoryObjectType CachedResourceShader;
+    static MemoryObjectType CachedResourceXSLT;
+};
+
 } // namespace WebCore
 
 #endif // !defined(MemoryInstrumentation_h)
index 206e6be..7675b17 100644 (file)
@@ -2838,7 +2838,7 @@ void Node::removedLastRef()
 
 void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
     TreeShared<Node, ContainerNode>::reportMemoryUsage(memoryObjectInfo);
     ScriptWrappable::reportMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_document);
index d1f5269..4cd47ea 100644 (file)
@@ -52,7 +52,7 @@ public:
 
         void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
         {
-            MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+            MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
             info.addInstrumentedMember(m_prefix);
             info.addInstrumentedMember(m_localName);
             info.addInstrumentedMember(m_namespace);
@@ -103,7 +103,7 @@ public:
     
     void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
         info.addInstrumentedMember(m_impl);
     }
 private:
index 5d1cd07..2ca33bd 100644 (file)
@@ -423,7 +423,7 @@ inline ImageInnerElement* HTMLImageElement::innerElement() const
 
 void HTMLImageElement::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
     HTMLElement::reportMemoryUsage(memoryObjectInfo);
     info.addMember(m_imageLoader);
     info.addInstrumentedMember(m_form);
index 85186c7..810a80a 100644 (file)
@@ -486,15 +486,15 @@ public:
         size_t totalSize = 0;
 
         RefPtr<TypeBuilder::Array<InspectorMemoryBlock> > children = TypeBuilder::Array<InspectorMemoryBlock>::create();
-        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::MemoryCacheStructures), MemoryBlockName::memoryCacheStructures);
-        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::CachedResource), MemoryBlockName::cachedResource);
-        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::CachedResourceCSS), MemoryBlockName::cachedResourceCSS);
-        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::CachedResourceFont), MemoryBlockName::cachedResourceFont);
-        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::CachedResourceImage), MemoryBlockName::cachedResourceImage);
-        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::CachedResourceScript), MemoryBlockName::cachedResourceScript);
-        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::CachedResourceSVG), MemoryBlockName::cachedResourceSVG);
-        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::CachedResourceShader), MemoryBlockName::cachedResourceShader);
-        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::CachedResourceXSLT), MemoryBlockName::cachedResourceXSLT);
+        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::MemoryCacheStructures), MemoryBlockName::memoryCacheStructures);
+        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::CachedResource), MemoryBlockName::cachedResource);
+        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::CachedResourceCSS), MemoryBlockName::cachedResourceCSS);
+        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::CachedResourceFont), MemoryBlockName::cachedResourceFont);
+        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::CachedResourceImage), MemoryBlockName::cachedResourceImage);
+        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::CachedResourceScript), MemoryBlockName::cachedResourceScript);
+        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::CachedResourceSVG), MemoryBlockName::cachedResourceSVG);
+        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::CachedResourceShader), MemoryBlockName::cachedResourceShader);
+        totalSize += addMemoryBlockFor(children.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::CachedResourceXSLT), MemoryBlockName::cachedResourceXSLT);
 
         RefPtr<InspectorMemoryBlock> block = InspectorMemoryBlock::create().setName(MemoryBlockName::memoryCache);
         block->setSize(totalSize);
@@ -507,11 +507,11 @@ public:
         size_t totalSize = 0;
 
         RefPtr<TypeBuilder::Array<InspectorMemoryBlock> > domChildren = TypeBuilder::Array<InspectorMemoryBlock>::create();
-        totalSize += addMemoryBlockFor(domChildren.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::Other), MemoryBlockName::domTreeOther);
-        totalSize += addMemoryBlockFor(domChildren.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::DOM), MemoryBlockName::domTreeDOM);
-        totalSize += addMemoryBlockFor(domChildren.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::CSS), MemoryBlockName::domTreeCSS);
-        totalSize += addMemoryBlockFor(domChildren.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::Binding), MemoryBlockName::domTreeBinding);
-        totalSize += addMemoryBlockFor(domChildren.get(), m_memoryInstrumentation.totalSize(MemoryInstrumentation::Loader), MemoryBlockName::domTreeLoader);
+        totalSize += addMemoryBlockFor(domChildren.get(), m_memoryInstrumentation.totalSize(GenericMemoryTypes::Other), MemoryBlockName::domTreeOther);
+        totalSize += addMemoryBlockFor(domChildren.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::DOM), MemoryBlockName::domTreeDOM);
+        totalSize += addMemoryBlockFor(domChildren.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::CSS), MemoryBlockName::domTreeCSS);
+        totalSize += addMemoryBlockFor(domChildren.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::Binding), MemoryBlockName::domTreeBinding);
+        totalSize += addMemoryBlockFor(domChildren.get(), m_memoryInstrumentation.totalSize(WebCoreMemoryTypes::Loader), MemoryBlockName::domTreeLoader);
 
         RefPtr<InspectorMemoryBlock> dom = InspectorMemoryBlock::create().setName(MemoryBlockName::dom);
         dom->setSize(totalSize);
index ea69bf5..8818710 100644 (file)
@@ -357,7 +357,7 @@ void DocumentLoader::commitData(const char* bytes, size_t length)
 
 void DocumentLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Loader);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
     info.addInstrumentedMember(m_frame);
     info.addInstrumentedMember(m_mainResourceLoader);
     info.addInstrumentedHashSet(m_subresourceLoaders);
index ffa00ad..8e5742e 100644 (file)
@@ -3277,7 +3277,7 @@ NetworkingContext* FrameLoader::networkingContext() const
 
 void FrameLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Loader);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
     info.addInstrumentedMember(m_documentLoader);
     info.addInstrumentedMember(m_provisionalDocumentLoader);
     info.addInstrumentedMember(m_policyDocumentLoader);
index d6a6072..2d6e45b 100644 (file)
@@ -551,7 +551,7 @@ void MainResourceLoader::didFail(const ResourceError& error)
 
 void MainResourceLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Loader);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
     ResourceLoader::reportMemoryUsage(memoryObjectInfo);
     info.addMember(m_initialRequest);
     info.addInstrumentedMember(m_substituteData);
index 2307515..3315ad5 100644 (file)
@@ -535,7 +535,7 @@ AsyncFileStream* ResourceLoader::createAsyncFileStream(FileStreamClient* client)
 
 void ResourceLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Loader);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
     info.addMember(m_handle.get());
     info.addInstrumentedMember(m_frame);
     info.addInstrumentedMember(m_documentLoader);
index c61fa31..3f9a614 100644 (file)
@@ -137,7 +137,7 @@ void SubresourceLoader::cancelIfNotFinishing()
 
 void SubresourceLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Loader);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
     ResourceLoader::reportMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_resource);
     info.addInstrumentedMember(m_document);
index a269c34..2313ba5 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 
 void SubstituteData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Loader);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
     info.addInstrumentedMember(m_content);
     info.addInstrumentedMember(m_mimeType);
     info.addInstrumentedMember(m_textEncoding);
index 29da628..fbee0be 100644 (file)
@@ -205,7 +205,7 @@ void CachedCSSStyleSheet::saveParsedStyleSheet(PassRefPtr<StyleSheetContents> sh
 
 void CachedCSSStyleSheet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResourceCSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResourceCSS);
     CachedResource::reportMemoryUsage(memoryObjectInfo);
     info.addMember(m_decoder);
     info.addInstrumentedMember(m_parsedStyleSheetCache);
index 72c7ca7..4080eb7 100644 (file)
@@ -209,7 +209,7 @@ void CachedFont::error(CachedResource::Status status)
 
 void CachedFont::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResourceFont);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResourceFont);
     CachedResource::reportMemoryUsage(memoryObjectInfo);
 #if ENABLE(SVG_FONTS)
     info.addInstrumentedMember(m_externalSVGDocument);
index be4cea5..95c50bc 100644 (file)
@@ -476,7 +476,7 @@ void CachedImage::changedInRect(const Image* image, const IntRect& rect)
 
 void CachedImage::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResourceImage);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResourceImage);
     CachedResource::reportMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_image);
 #if ENABLE(SVG)
index 4e43131..f9d0fd3 100644 (file)
@@ -162,7 +162,7 @@ bool CachedRawResource::canReuse(const ResourceRequest& newRequest) const
 
 void CachedRawResource::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResource);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResource);
     CachedResource::reportMemoryUsage(memoryObjectInfo);
 }
 
index d7abcae..a1b2bda 100755 (executable)
@@ -803,7 +803,7 @@ void CachedResource::CachedResourceCallback::timerFired(Timer<CachedResourceCall
 
 void CachedResource::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResource);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResource);
     info.addMember(m_resourceRequest);
     info.addHashSet(m_clients);
     info.addInstrumentedMember(m_accept);
index ea16318..ad37fe4 100644 (file)
@@ -43,7 +43,7 @@ void CachedResourceHandleBase::setResource(CachedResource* resource)
 
 void CachedResourceHandleBase::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResource);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResource);
     info.addInstrumentedMember(m_resource);
 }
 
index b258c05..5fd7c50 100644 (file)
@@ -880,7 +880,7 @@ void CachedResourceLoader::printPreloadStats()
 
 void CachedResourceLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Loader);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
     info.addHashMap(m_documentResources);
     for (DocumentResourceMap::const_iterator i = m_documentResources.begin(); i != m_documentResources.end(); ++i) {
         info.addInstrumentedMember(i->first);
index 423008e..699b688 100644 (file)
@@ -73,7 +73,7 @@ void CachedSVGDocument::data(PassRefPtr<SharedBuffer> data, bool allDataReceived
 
 void CachedSVGDocument::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResourceSVG);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResourceSVG);
     CachedResource::reportMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_document);
     info.addMember(m_decoder);
index 72264fa..f0b1c2e 100644 (file)
@@ -129,7 +129,7 @@ void CachedScript::sourceProviderCacheSizeChanged(int delta)
 
 void CachedScript::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResourceScript);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResourceScript);
     CachedResource::reportMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_script);
     info.addMember(m_decoder);
index a31abd0..6124c5b 100644 (file)
@@ -70,7 +70,7 @@ void CachedShader::data(PassRefPtr<SharedBuffer> data, bool allDataReceived)
 
 void CachedShader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResourceShader);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResourceShader);
     CachedResource::reportMemoryUsage(memoryObjectInfo);
     info.addMember(m_decoder);
     info.addInstrumentedMember(m_shaderString);
index 77c51e8..c3b51cf 100644 (file)
@@ -99,7 +99,7 @@ void CachedXSLStyleSheet::error(CachedResource::Status status)
 
 void CachedXSLStyleSheet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResourceXSLT);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResourceXSLT);
     CachedResource::reportMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_sheet);
     info.addMember(m_decoder);
index 66111d7..7f16b55 100644 (file)
@@ -717,7 +717,7 @@ MemoryCache::Statistics MemoryCache::getStatistics()
 
 void MemoryCache::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::MemoryCacheStructures);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::MemoryCacheStructures);
     info.addHashMap(m_resources);
     CachedResourceMap::const_iterator e = m_resources.end();
     for (CachedResourceMap::const_iterator i = m_resources.begin(); i != e; ++i) {
index b3648f5..85c2a33 100644 (file)
@@ -674,7 +674,7 @@ void Frame::dispatchVisibilityStateChangeEvent()
 
 void Frame::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
     info.addInstrumentedMember(m_doc.get());
     info.addInstrumentedMember(m_loader);
 }
index 16c0bcd..c1e7330 100644 (file)
@@ -250,7 +250,7 @@ const Vector<char>& SharedBuffer::buffer() const
 
 void SharedBuffer::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Other);
+    MemoryClassInfo info(memoryObjectInfo, this, GenericMemoryTypes::Other);
     info.addVector(m_buffer);
     info.addVector(m_segments);
     for (unsigned i = 0; i < m_segments.size(); ++i)
index fbefeb1..6f652db 100644 (file)
@@ -113,7 +113,7 @@ public:
 
     void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
         info.addInstrumentedMember(m_parent);
     }
 
index 09e7be1..d82cca4 100644 (file)
@@ -574,7 +574,7 @@ Color BitmapImage::solidColor() const
 
 void BitmapImage::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResourceImage);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResourceImage);
     Image::reportMemoryUsage(memoryObjectInfo);
     info.addMember(m_source);
     info.addMember(m_frameTimer);
index e675001..6b51947 100644 (file)
@@ -110,7 +110,7 @@ void CrossfadeGeneratedImage::drawPattern(GraphicsContext* context, const FloatR
 
 void CrossfadeGeneratedImage::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
     GeneratedImage::reportMemoryUsage(memoryObjectInfo);
     info.addInstrumentedMember(m_fromImage);
     info.addInstrumentedMember(m_toImage);
index 194039f..7dd4c15 100644 (file)
@@ -45,7 +45,7 @@ void GeneratedImage::computeIntrinsicDimensions(Length& intrinsicWidth, Length&
 
 void GeneratedImage::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResourceImage);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResourceImage);
     Image::reportMemoryUsage(memoryObjectInfo);
 }
 
index 2a9a92b..0431cb9 100644 (file)
@@ -87,7 +87,7 @@ void GeneratorGeneratedImage::invalidateCacheTimerFired(DeferrableOneShotTimer<G
 
 void GeneratorGeneratedImage::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
     GeneratedImage::reportMemoryUsage(memoryObjectInfo);
     info.addMember(m_generator);
     info.addMember(m_cachedImageBuffer);
index 0255603..c596208 100644 (file)
@@ -200,7 +200,7 @@ void Image::computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsic
 
 void Image::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResourceImage);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResourceImage);
     info.addInstrumentedMember(m_data);
     info.addMember(m_imageObserver);
 }
index 9c3c8c3..e079a0f 100644 (file)
@@ -359,7 +359,7 @@ void FormData::removeGeneratedFilesIfNeeded()
 
 void FormData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Loader);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
     info.addVector(m_boundary);
 }
 
index 26cb80c..3c791ad 100644 (file)
@@ -446,7 +446,7 @@ bool ResourceRequestBase::isConditional() const
 
 void ResourceRequestBase::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Loader);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
     info.addInstrumentedMember(m_url);
     info.addInstrumentedMember(m_firstPartyForCookies);
     info.addInstrumentedMember(m_httpMethod);
index e8d7ca4..9329df4 100644 (file)
@@ -570,7 +570,7 @@ void ResourceResponseBase::lazyInit(InitLevel initLevel) const
 
 void ResourceResponseBase::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Loader);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
     info.addInstrumentedMember(m_url);
     info.addInstrumentedMember(m_mimeType);
     info.addInstrumentedMember(m_textEncodingName);
index 7f0302a..ec0f7bf 100644 (file)
@@ -1597,7 +1597,7 @@ LayoutBoxExtent RenderStyle::imageOutsets(const NinePieceImage& image) const
 
 void RenderStyle::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addMember(m_box);
     info.addMember(visual);
     // FIXME: m_background contains RefPtr<StyleImage> that might need to be instrumented.
index 62fe5b8..99a7995 100644 (file)
@@ -264,7 +264,7 @@ bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData&
 
 void StyleRareInheritedData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addMember(textShadow);
     info.addInstrumentedMember(highlight);
     info.addMember(cursorData);
index e38d795..336c2eb 100644 (file)
@@ -304,7 +304,7 @@ bool StyleRareNonInheritedData::transitionDataEquivalent(const StyleRareNonInher
 
 void StyleRareNonInheritedData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 #if ENABLE(DASHBOARD_SUPPORT)
     info.addVector(m_dashboardRegions);
 #endif
index 25192e1..3cff43d 100644 (file)
@@ -107,7 +107,7 @@ PassRefPtr<SVGColor> SVGColor::cloneForCSSOM() const
 
 void SVGColor::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
 }
 
 }
index ba74435..d4590d6 100644 (file)
@@ -114,7 +114,7 @@ PassRefPtr<SVGPaint> SVGPaint::cloneForCSSOM() const
 
 void SVGPaint::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     info.addInstrumentedMember(m_uri);
 }
 
index f36f9a8..07f6725 100644 (file)
@@ -357,7 +357,7 @@ String SVGImage::filenameExtension() const
 
 void SVGImage::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
-    MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CachedResourceImage);
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResourceImage);
     Image::reportMemoryUsage(memoryObjectInfo);
     info.addMember(m_chromeClient);
     info.addMember(m_page);
index f78aacf..55ee641 100644 (file)
@@ -1,3 +1,22 @@
+2012-09-05  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: NMI: extract MemoryObjectType constants from MemoryInstrumentation.
+        https://bugs.webkit.org/show_bug.cgi?id=95850
+
+        Reviewed by Yury Semikhatsky.
+
+        I'd like to extract MemoryObjectTypes into separate classes.
+        After that we will be able to move core NMI instrumentation code to WTF.
+
+        * tests/MemoryInstrumentationTest.cpp:
+        (WebCore::Instrumented::reportMemoryUsage):
+        (WebCore::InstrumentedRefPtr::reportMemoryUsage):
+        (WebCore::InstrumentedWithOwnPtr::reportMemoryUsage):
+        (WebCore::InstrumentedOther::reportMemoryUsage):
+        (WebCore::InstrumentedDOM::reportMemoryUsage):
+        (WebCore::TEST):
+        (WebCore::NonVirtualInstrumented::reportMemoryUsage):
+
 2012-09-05  Peter Beverloo  <peter@chromium.org>
 
         Unreviewed, rolling out r127590.
index 0ab5567..8e6d819 100644 (file)
@@ -58,7 +58,7 @@ public:
 
     virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
         info.addMember(m_notInstrumented);
     }
     NotInstrumented* m_notInstrumented;
@@ -122,7 +122,7 @@ public:
 
     virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
         info.addMember(m_notInstrumented);
     }
     NotInstrumented* m_notInstrumented;
@@ -155,7 +155,7 @@ public:
 
     virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
         Instrumented::reportMemoryUsage(memoryObjectInfo);
         info.addMember(m_notInstrumentedOwnPtr);
     }
@@ -178,7 +178,7 @@ public:
 
     void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Other);
+        MemoryClassInfo info(memoryObjectInfo, this, GenericMemoryTypes::Other);
     }
     int m_data;
 };
@@ -189,7 +189,7 @@ public:
 
     void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
         info.addInstrumentedMember(m_instrumentedOther);
     }
     OwnPtr<InstrumentedOther> m_instrumentedOther;
@@ -202,7 +202,7 @@ TEST(MemoryInstrumentationTest, ownerTypePropagation)
     OwnPtr<InstrumentedDOM> instrumentedDOM(adoptPtr(new InstrumentedDOM));
     impl.addRootObject(instrumentedDOM);
     EXPECT_EQ(sizeof(InstrumentedDOM) + sizeof(InstrumentedOther), impl.reportedSizeForAllTypes());
-    EXPECT_EQ(sizeof(InstrumentedDOM) + sizeof(InstrumentedOther), impl.totalSize(MemoryInstrumentation::DOM));
+    EXPECT_EQ(sizeof(InstrumentedDOM) + sizeof(InstrumentedOther), impl.totalSize(WebCoreMemoryTypes::DOM));
     EXPECT_EQ(2, visitedObjects.size());
 }
 
@@ -210,7 +210,7 @@ class NonVirtualInstrumented {
 public:
     void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
-        MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
+        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
         info.addInstrumentedMember(m_instrumented);
     }