Skip to content

Commit

Permalink
Merge r182068 - Make some more objects use FastMalloc
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=143122

Reviewed by Csaba Osztrogonác.

Source/JavaScriptCore:

* API/JSCallbackObject.h:
* heap/IncrementalSweeper.h:
* jit/JITThunks.h:
* runtime/JSGlobalObjectDebuggable.h:
* runtime/RegExpCache.h:

Source/WebCore:

* Modules/geolocation/GeolocationController.h:
* Modules/geolocation/NavigatorGeolocation.h:
* Modules/indexeddb/DOMWindowIndexedDatabase.h:
* Modules/notifications/NotificationController.h:
* Modules/webdatabase/DatabaseServer.h:
* css/CSSFontFaceSource.h:
* html/HTMLMediaSession.h:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorReplayAgent.h:
* page/CaptionUserPreferencesMediaAF.h:
* page/PageConsoleClient.h:
* page/PageDebuggable.h:
* page/animation/CSSPropertyAnimation.cpp:
* page/mac/ServicesOverlayController.h:
* platform/RemoteCommandListener.h:
* platform/Timer.h:
* platform/audio/MediaSessionManager.h:
* platform/mac/SystemSleepListenerMac.h:
* platform/mac/ThemeMac.h:
* rendering/svg/RenderSVGResourceSolidColor.h:
* replay/ReplayController.h:
  • Loading branch information
geoffreygaren authored and carlosgcampos committed Apr 13, 2015
1 parent 2a016fe commit 98fad83
Show file tree
Hide file tree
Showing 28 changed files with 96 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Source/JavaScriptCore/API/JSCallbackObject.h
Expand Up @@ -34,6 +34,8 @@
namespace JSC {

struct JSCallbackObjectData : WeakHandleOwner {
WTF_MAKE_FAST_ALLOCATED;
public:
JSCallbackObjectData(void* privateData, JSClassRef jsClass)
: privateData(privateData)
, jsClass(jsClass)
Expand Down
13 changes: 13 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
2015-03-26 Geoffrey Garen <ggaren@apple.com>

Make some more objects use FastMalloc
https://bugs.webkit.org/show_bug.cgi?id=143122

Reviewed by Csaba Osztrogonác.

* API/JSCallbackObject.h:
* heap/IncrementalSweeper.h:
* jit/JITThunks.h:
* runtime/JSGlobalObjectDebuggable.h:
* runtime/RegExpCache.h:

2015-03-27 Michael Saboff <msaboff@apple.com>

Objects with numeric properties intermittently get a phantom 'length' property
Expand Down
1 change: 1 addition & 0 deletions Source/JavaScriptCore/heap/IncrementalSweeper.h
Expand Up @@ -35,6 +35,7 @@ class Heap;
class MarkedBlock;

class IncrementalSweeper : public HeapTimer {
WTF_MAKE_FAST_ALLOCATED;
public:
#if USE(CF)
JS_EXPORT_PRIVATE IncrementalSweeper(Heap*, CFRunLoopRef);
Expand Down
1 change: 1 addition & 0 deletions Source/JavaScriptCore/jit/JITThunks.h
Expand Up @@ -45,6 +45,7 @@ class VM;
class NativeExecutable;

class JITThunks {
WTF_MAKE_FAST_ALLOCATED;
public:
JITThunks();
~JITThunks();
Expand Down
1 change: 1 addition & 0 deletions Source/JavaScriptCore/runtime/JSGlobalObjectDebuggable.h
Expand Up @@ -42,6 +42,7 @@ namespace JSC {
class JSGlobalObject;

class JSGlobalObjectDebuggable final : public Inspector::RemoteInspectorDebuggable {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(JSGlobalObjectDebuggable);
public:
JSGlobalObjectDebuggable(JSGlobalObject&);
Expand Down
6 changes: 4 additions & 2 deletions Source/JavaScriptCore/runtime/RegExpCache.h
Expand Up @@ -39,8 +39,10 @@
namespace JSC {

class RegExpCache : private WeakHandleOwner {
friend class RegExp;
typedef HashMap<RegExpKey, Weak<RegExp>> RegExpCacheMap;
WTF_MAKE_FAST_ALLOCATED;

friend class RegExp;
typedef HashMap<RegExpKey, Weak<RegExp>> RegExpCacheMap;

public:
RegExpCache(VM* vm);
Expand Down
29 changes: 29 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,32 @@
2015-03-26 Geoffrey Garen <ggaren@apple.com>

Make some more objects use FastMalloc
https://bugs.webkit.org/show_bug.cgi?id=143122

Reviewed by Csaba Osztrogonác.

* Modules/geolocation/GeolocationController.h:
* Modules/geolocation/NavigatorGeolocation.h:
* Modules/indexeddb/DOMWindowIndexedDatabase.h:
* Modules/notifications/NotificationController.h:
* Modules/webdatabase/DatabaseServer.h:
* css/CSSFontFaceSource.h:
* html/HTMLMediaSession.h:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorReplayAgent.h:
* page/CaptionUserPreferencesMediaAF.h:
* page/PageConsoleClient.h:
* page/PageDebuggable.h:
* page/animation/CSSPropertyAnimation.cpp:
* page/mac/ServicesOverlayController.h:
* platform/RemoteCommandListener.h:
* platform/Timer.h:
* platform/audio/MediaSessionManager.h:
* platform/mac/SystemSleepListenerMac.h:
* platform/mac/ThemeMac.h:
* rendering/svg/RenderSVGResourceSolidColor.h:
* replay/ReplayController.h:

2015-03-27 Said Abou-Hallawa <sabouhallawa@apple.com>

FEMorphology::platformApplyGeneric() should bail out if the radius is less than or equal to zero.
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/Modules/geolocation/GeolocationController.h
Expand Up @@ -43,6 +43,7 @@ class GeolocationPosition;
class Page;

class GeolocationController : public Supplement<Page>, private ViewStateChangeObserver {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(GeolocationController);
public:
GeolocationController(Page&, GeolocationClient&);
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/Modules/geolocation/NavigatorGeolocation.h
Expand Up @@ -32,6 +32,7 @@ class Geolocation;
class Navigator;

class NavigatorGeolocation : public Supplement<Navigator>, public DOMWindowProperty {
WTF_MAKE_FAST_ALLOCATED;
public:
explicit NavigatorGeolocation(Frame*);
virtual ~NavigatorGeolocation();
Expand Down
Expand Up @@ -37,6 +37,7 @@ class IDBFactory;
class DOMWindow;

class DOMWindowIndexedDatabase : public DOMWindowProperty, public Supplement<DOMWindow> {
WTF_MAKE_FAST_ALLOCATED;
public:
explicit DOMWindowIndexedDatabase(DOMWindow*);
virtual ~DOMWindowIndexedDatabase();
Expand Down
Expand Up @@ -37,6 +37,7 @@ namespace WebCore {
class NotificationClient;

class NotificationController : public Supplement<Page> {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(NotificationController);
public:
explicit NotificationController(NotificationClient*);
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/Modules/webdatabase/DatabaseServer.h
Expand Up @@ -31,6 +31,7 @@
namespace WebCore {

class DatabaseServer: public AbstractDatabaseServer {
WTF_MAKE_FAST_ALLOCATED;
public:
DatabaseServer() { };
virtual ~DatabaseServer() { }
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/css/CSSFontFaceSource.h
Expand Up @@ -46,6 +46,7 @@ class Font;
class FontDescription;

class CSSFontFaceSource final : public CachedFontClient {
WTF_MAKE_FAST_ALLOCATED;
public:
CSSFontFaceSource(const String&, CachedFont* = nullptr);
virtual ~CSSFontFaceSource();
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/html/HTMLMediaSession.h
Expand Up @@ -37,6 +37,7 @@ class HTMLMediaElement;
class SourceBuffer;

class HTMLMediaSession final : public MediaSession {
WTF_MAKE_FAST_ALLOCATED;
public:
static std::unique_ptr<HTMLMediaSession> create(MediaSessionClient&);

Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/inspector/InspectorIndexedDBAgent.h
Expand Up @@ -48,6 +48,7 @@ class InspectorPageAgent;
typedef String ErrorString;

class InspectorIndexedDBAgent final : public InspectorAgentBase, public Inspector::IndexedDBBackendDispatcherHandler {
WTF_MAKE_FAST_ALLOCATED;
public:
InspectorIndexedDBAgent(InstrumentingAgents*, Inspector::InjectedScriptManager*, InspectorPageAgent*);
virtual ~InspectorIndexedDBAgent();
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/inspector/InspectorReplayAgent.h
Expand Up @@ -59,6 +59,7 @@ typedef int SegmentIdentifier;
class InspectorReplayAgent final
: public InspectorAgentBase
, public Inspector::ReplayBackendDispatcherHandler {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(InspectorReplayAgent);
public:
InspectorReplayAgent(InstrumentingAgents*, InspectorPageAgent*);
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/page/CaptionUserPreferencesMediaAF.h
Expand Up @@ -36,6 +36,7 @@
namespace WebCore {

class CaptionUserPreferencesMediaAF : public CaptionUserPreferences {
WTF_MAKE_FAST_ALLOCATED;
public:
CaptionUserPreferencesMediaAF(PageGroup&);
virtual ~CaptionUserPreferencesMediaAF();
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/page/PageConsoleClient.h
Expand Up @@ -46,6 +46,7 @@ class Page;
typedef Vector<RefPtr<JSC::Profile>> ProfilesArray;

class WEBCORE_EXPORT PageConsoleClient final : public JSC::ConsoleClient {
WTF_MAKE_FAST_ALLOCATED;
public:
explicit PageConsoleClient(Page&);
virtual ~PageConsoleClient();
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/page/PageDebuggable.h
Expand Up @@ -36,6 +36,7 @@ namespace WebCore {
class Page;

class PageDebuggable final : public Inspector::RemoteInspectorDebuggable {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(PageDebuggable);
public:
PageDebuggable(Page&);
Expand Down
25 changes: 25 additions & 0 deletions Source/WebCore/page/animation/CSSPropertyAnimation.cpp
Expand Up @@ -398,6 +398,7 @@ class AnimationPropertyWrapperBase {

template <typename T>
class PropertyWrapperGetter : public AnimationPropertyWrapperBase {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperGetter(CSSPropertyID prop, T (RenderStyle::*getter)() const)
: AnimationPropertyWrapperBase(prop)
Expand All @@ -422,6 +423,7 @@ class PropertyWrapperGetter : public AnimationPropertyWrapperBase {

template <typename T>
class PropertyWrapper : public PropertyWrapperGetter<T> {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapper(CSSPropertyID prop, T (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T))
: PropertyWrapperGetter<T>(prop, getter)
Expand All @@ -440,6 +442,7 @@ class PropertyWrapper : public PropertyWrapperGetter<T> {

template <typename T>
class RefCountedPropertyWrapper : public PropertyWrapperGetter<T*> {
WTF_MAKE_FAST_ALLOCATED;
public:
RefCountedPropertyWrapper(CSSPropertyID prop, T* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(PassRefPtr<T>))
: PropertyWrapperGetter<T*>(prop, getter)
Expand All @@ -458,6 +461,7 @@ class RefCountedPropertyWrapper : public PropertyWrapperGetter<T*> {

template <typename T>
class LengthPropertyWrapper : public PropertyWrapperGetter<const T&> {
WTF_MAKE_FAST_ALLOCATED;
public:
LengthPropertyWrapper(CSSPropertyID prop, const T& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T))
: PropertyWrapperGetter<const T&>(prop, getter)
Expand All @@ -475,6 +479,7 @@ class LengthPropertyWrapper : public PropertyWrapperGetter<const T&> {
};

class PropertyWrapperClipPath : public RefCountedPropertyWrapper<ClipPathOperation> {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperClipPath(CSSPropertyID prop, ClipPathOperation* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(PassRefPtr<ClipPathOperation>))
: RefCountedPropertyWrapper<ClipPathOperation>(prop, getter, setter)
Expand All @@ -484,6 +489,7 @@ class PropertyWrapperClipPath : public RefCountedPropertyWrapper<ClipPathOperati

#if ENABLE(CSS_SHAPES)
class PropertyWrapperShape : public RefCountedPropertyWrapper<ShapeValue> {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperShape(CSSPropertyID prop, ShapeValue* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(PassRefPtr<ShapeValue>))
: RefCountedPropertyWrapper<ShapeValue>(prop, getter, setter)
Expand All @@ -493,6 +499,7 @@ class PropertyWrapperShape : public RefCountedPropertyWrapper<ShapeValue> {
#endif

class StyleImagePropertyWrapper : public RefCountedPropertyWrapper<StyleImage> {
WTF_MAKE_FAST_ALLOCATED;
public:
StyleImagePropertyWrapper(CSSPropertyID prop, StyleImage* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(PassRefPtr<StyleImage>))
: RefCountedPropertyWrapper<StyleImage>(prop, getter, setter)
Expand All @@ -515,6 +522,7 @@ class StyleImagePropertyWrapper : public RefCountedPropertyWrapper<StyleImage> {
};

class MaskImagePropertyWrapper : public PropertyWrapper<const RefPtr<MaskImageOperation>> {
WTF_MAKE_FAST_ALLOCATED;
public:
MaskImagePropertyWrapper()
: PropertyWrapper<const RefPtr<MaskImageOperation>>(CSSPropertyWebkitMaskImage, &RenderStyle::maskImage, &RenderStyle::setMaskImage)
Expand All @@ -539,6 +547,7 @@ class MaskImagePropertyWrapper : public PropertyWrapper<const RefPtr<MaskImageOp
};

class PropertyWrapperColor : public PropertyWrapperGetter<Color> {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperColor(CSSPropertyID prop, Color (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&))
: PropertyWrapperGetter<Color>(prop, getter)
Expand All @@ -557,6 +566,7 @@ class PropertyWrapperColor : public PropertyWrapperGetter<Color> {


class PropertyWrapperAcceleratedOpacity : public PropertyWrapper<float> {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperAcceleratedOpacity()
: PropertyWrapper<float>(CSSPropertyOpacity, &RenderStyle::opacity, &RenderStyle::setOpacity)
Expand All @@ -575,6 +585,7 @@ class PropertyWrapperAcceleratedOpacity : public PropertyWrapper<float> {
};

class PropertyWrapperAcceleratedTransform : public PropertyWrapper<const TransformOperations&> {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperAcceleratedTransform()
: PropertyWrapper<const TransformOperations&>(CSSPropertyWebkitTransform, &RenderStyle::transform, &RenderStyle::setTransform)
Expand All @@ -590,6 +601,7 @@ class PropertyWrapperAcceleratedTransform : public PropertyWrapper<const Transfo
};

class PropertyWrapperAcceleratedFilter : public PropertyWrapper<const FilterOperations&> {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperAcceleratedFilter()
: PropertyWrapper<const FilterOperations&>(CSSPropertyWebkitFilter, &RenderStyle::filter, &RenderStyle::setFilter)
Expand Down Expand Up @@ -630,6 +642,7 @@ static inline const ShadowData* shadowForBlending(const ShadowData* srcShadow, c
}

class PropertyWrapperShadow : public AnimationPropertyWrapperBase {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperShadow(CSSPropertyID prop, const ShadowData* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(std::unique_ptr<ShadowData>, bool))
: AnimationPropertyWrapperBase(prop)
Expand Down Expand Up @@ -745,6 +758,7 @@ class PropertyWrapperShadow : public AnimationPropertyWrapperBase {
};

class PropertyWrapperMaybeInvalidColor : public AnimationPropertyWrapperBase {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperMaybeInvalidColor(CSSPropertyID prop, Color (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&))
: AnimationPropertyWrapperBase(prop)
Expand Down Expand Up @@ -792,6 +806,7 @@ class PropertyWrapperMaybeInvalidColor : public AnimationPropertyWrapperBase {

enum MaybeInvalidColorTag { MaybeInvalidColor };
class PropertyWrapperVisitedAffectedColor : public AnimationPropertyWrapperBase {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperVisitedAffectedColor(CSSPropertyID prop, Color (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&),
Color (RenderStyle::*visitedGetter)() const, void (RenderStyle::*visitedSetter)(const Color&))
Expand Down Expand Up @@ -824,6 +839,7 @@ class PropertyWrapperVisitedAffectedColor : public AnimationPropertyWrapperBase

// Wrapper base class for an animatable property in a FillLayer
class FillLayerAnimationPropertyWrapperBase {
WTF_MAKE_FAST_ALLOCATED;
public:
FillLayerAnimationPropertyWrapperBase()
{
Expand All @@ -837,6 +853,7 @@ class FillLayerAnimationPropertyWrapperBase {

template <typename T>
class FillLayerPropertyWrapperGetter : public FillLayerAnimationPropertyWrapperBase {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(FillLayerPropertyWrapperGetter);
public:
FillLayerPropertyWrapperGetter(T (FillLayer::*getter)() const)
Expand All @@ -861,6 +878,7 @@ class FillLayerPropertyWrapperGetter : public FillLayerAnimationPropertyWrapperB

template <typename T>
class FillLayerPropertyWrapper : public FillLayerPropertyWrapperGetter<const T&> {
WTF_MAKE_FAST_ALLOCATED;
public:
FillLayerPropertyWrapper(const T& (FillLayer::*getter)() const, void (FillLayer::*setter)(T))
: FillLayerPropertyWrapperGetter<const T&>(getter)
Expand All @@ -879,6 +897,7 @@ class FillLayerPropertyWrapper : public FillLayerPropertyWrapperGetter<const T&>

template <typename T>
class FillLayerRefCountedPropertyWrapper : public FillLayerPropertyWrapperGetter<T*> {
WTF_MAKE_FAST_ALLOCATED;
public:
FillLayerRefCountedPropertyWrapper(T* (FillLayer::*getter)() const, void (FillLayer::*setter)(PassRefPtr<T>))
: FillLayerPropertyWrapperGetter<T*>(getter)
Expand All @@ -896,6 +915,7 @@ class FillLayerRefCountedPropertyWrapper : public FillLayerPropertyWrapperGetter
};

class FillLayerStyleImagePropertyWrapper : public FillLayerRefCountedPropertyWrapper<StyleImage> {
WTF_MAKE_FAST_ALLOCATED;
public:
FillLayerStyleImagePropertyWrapper(StyleImage* (FillLayer::*getter)() const, void (FillLayer::*setter)(PassRefPtr<StyleImage>))
: FillLayerRefCountedPropertyWrapper<StyleImage>(getter, setter)
Expand All @@ -918,6 +938,7 @@ class FillLayerStyleImagePropertyWrapper : public FillLayerRefCountedPropertyWra
};

class FillLayersPropertyWrapper : public AnimationPropertyWrapperBase {
WTF_MAKE_FAST_ALLOCATED;
public:
typedef const FillLayer* (RenderStyle::*LayersGetter)() const;
typedef FillLayer& (RenderStyle::*LayersAccessor)();
Expand Down Expand Up @@ -987,6 +1008,7 @@ class FillLayersPropertyWrapper : public AnimationPropertyWrapperBase {
};

class ShorthandPropertyWrapper : public AnimationPropertyWrapperBase {
WTF_MAKE_FAST_ALLOCATED;
public:
ShorthandPropertyWrapper(CSSPropertyID property, Vector<AnimationPropertyWrapperBase*> longhandWrappers)
: AnimationPropertyWrapperBase(property)
Expand Down Expand Up @@ -1020,6 +1042,7 @@ class ShorthandPropertyWrapper : public AnimationPropertyWrapperBase {
};

class PropertyWrapperFlex : public AnimationPropertyWrapperBase {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperFlex()
: AnimationPropertyWrapperBase(CSSPropertyFlex)
Expand Down Expand Up @@ -1047,6 +1070,7 @@ class PropertyWrapperFlex : public AnimationPropertyWrapperBase {
};

class PropertyWrapperSVGPaint : public AnimationPropertyWrapperBase {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperSVGPaint(CSSPropertyID prop, const SVGPaint::SVGPaintType& (RenderStyle::*paintTypeGetter)() const, Color (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&))
: AnimationPropertyWrapperBase(prop)
Expand Down Expand Up @@ -1107,6 +1131,7 @@ class PropertyWrapperSVGPaint : public AnimationPropertyWrapperBase {
};

class CSSPropertyAnimationWrapperMap {
WTF_MAKE_FAST_ALLOCATED;
public:
static CSSPropertyAnimationWrapperMap& instance()
{
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/page/mac/ServicesOverlayController.h
Expand Up @@ -45,6 +45,7 @@ struct GapRects;
namespace WebCore {

class ServicesOverlayController : private PageOverlay::Client {
WTF_MAKE_FAST_ALLOCATED;
public:
explicit ServicesOverlayController(MainFrame&);
~ServicesOverlayController();
Expand Down

0 comments on commit 98fad83

Please sign in to comment.