diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h')
-rw-r--r-- | Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h b/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h index 37668c3b9..4c6bdecf4 100644 --- a/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h +++ b/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012, 2015 Apple Inc. All rights reserved. + * Copyright (C) 2012 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,53 +26,57 @@ #ifndef StructureStubClearingWatchpoint_h #define StructureStubClearingWatchpoint_h -#include "ObjectPropertyCondition.h" #include "Watchpoint.h" +#include <wtf/Platform.h> #if ENABLE(JIT) #include <wtf/FastMalloc.h> #include <wtf/Noncopyable.h> +#include <wtf/OwnPtr.h> +#include <wtf/PassOwnPtr.h> +#include <wtf/RefCounted.h> +#include <wtf/RefPtr.h> namespace JSC { class CodeBlock; -class StructureStubInfo; class WatchpointsOnStructureStubInfo; +struct StructureStubInfo; class StructureStubClearingWatchpoint : public Watchpoint { WTF_MAKE_NONCOPYABLE(StructureStubClearingWatchpoint); WTF_MAKE_FAST_ALLOCATED; public: StructureStubClearingWatchpoint( - const ObjectPropertyCondition& key, + WatchpointsOnStructureStubInfo& holder) + : m_holder(holder) + { + } + + StructureStubClearingWatchpoint( WatchpointsOnStructureStubInfo& holder, - std::unique_ptr<StructureStubClearingWatchpoint> next) - : m_key(key) - , m_holder(holder) - , m_next(WTFMove(next)) + PassOwnPtr<StructureStubClearingWatchpoint> next) + : m_holder(holder) + , m_next(next) { } virtual ~StructureStubClearingWatchpoint(); static StructureStubClearingWatchpoint* push( - const ObjectPropertyCondition& key, WatchpointsOnStructureStubInfo& holder, - std::unique_ptr<StructureStubClearingWatchpoint>& head); + OwnPtr<StructureStubClearingWatchpoint>& head); protected: - virtual void fireInternal(const FireDetail&) override; + virtual void fireInternal() override; private: - ObjectPropertyCondition m_key; WatchpointsOnStructureStubInfo& m_holder; - std::unique_ptr<StructureStubClearingWatchpoint> m_next; + OwnPtr<StructureStubClearingWatchpoint> m_next; }; -class WatchpointsOnStructureStubInfo { - WTF_MAKE_NONCOPYABLE(WatchpointsOnStructureStubInfo); - WTF_MAKE_FAST_ALLOCATED; +class WatchpointsOnStructureStubInfo : public RefCounted<WatchpointsOnStructureStubInfo> { public: WatchpointsOnStructureStubInfo(CodeBlock* codeBlock, StructureStubInfo* stubInfo) : m_codeBlock(codeBlock) @@ -82,11 +86,11 @@ public: ~WatchpointsOnStructureStubInfo(); - StructureStubClearingWatchpoint* addWatchpoint(const ObjectPropertyCondition& key); + StructureStubClearingWatchpoint* addWatchpoint(); static StructureStubClearingWatchpoint* ensureReferenceAndAddWatchpoint( - std::unique_ptr<WatchpointsOnStructureStubInfo>& holderRef, - CodeBlock*, StructureStubInfo*, const ObjectPropertyCondition& key); + RefPtr<WatchpointsOnStructureStubInfo>& holderRef, + CodeBlock*, StructureStubInfo*); CodeBlock* codeBlock() const { return m_codeBlock; } StructureStubInfo* stubInfo() const { return m_stubInfo; } @@ -94,7 +98,7 @@ public: private: CodeBlock* m_codeBlock; StructureStubInfo* m_stubInfo; - std::unique_ptr<StructureStubClearingWatchpoint> m_head; + OwnPtr<StructureStubClearingWatchpoint> m_head; }; } // namespace JSC |