Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: Source/bindings/v8/ScriptObjectTraits.h

Issue 177773002: Support Promises instrumentation on backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: V8PromiseCustom::setState -> (anonymous namespace)::setStateForPromise + REBASE Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/bindings.gypi ('k') | Source/bindings/v8/custom/V8PromiseCustom.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptObjectTraits.h
diff --git a/Source/core/svg/SVGAnimatedPath.h b/Source/bindings/v8/ScriptObjectTraits.h
similarity index 64%
copy from Source/core/svg/SVGAnimatedPath.h
copy to Source/bindings/v8/ScriptObjectTraits.h
index 6e03c58a50a17edb497524a00c9e3ab9626fec68..1bdb203c0933def4512604517a1cf471e0b6ae56 100644
--- a/Source/core/svg/SVGAnimatedPath.h
+++ b/Source/bindings/v8/ScriptObjectTraits.h
@@ -28,29 +28,28 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SVGAnimatedPath_h
-#define SVGAnimatedPath_h
+#ifndef ScriptObjectTraits_h
+#define ScriptObjectTraits_h
-#include "core/svg/SVGPathSegListTearOff.h"
-#include "core/svg/properties/NewSVGAnimatedProperty.h"
+#include "bindings/v8/ScriptObject.h"
+#include "bindings/v8/ScriptState.h"
+#include "wtf/HashTraits.h"
namespace WebCore {
-class SVGPathElement;
-
-class SVGAnimatedPath : public NewSVGAnimatedProperty<SVGPathSegList> {
-public:
- virtual ~SVGAnimatedPath();
-
- static PassRefPtr<SVGAnimatedPath> create(SVGPathElement* contextElement, const QualifiedName& attributeName)
- {
- return adoptRef(new SVGAnimatedPath(contextElement, attributeName));
- }
+struct ScriptObjectHash {
+ static unsigned hash(const ScriptObject& object) { return object.v8Object()->GetIdentityHash(); }
+ static bool equal(const ScriptObject& a, const ScriptObject& b) { return a == b; }
+ static const bool safeToCompareToEmptyOrDeleted = true;
+};
-protected:
- SVGAnimatedPath(SVGPathElement*, const QualifiedName&);
+struct ScriptObjectHashTraits : WTF::GenericHashTraits<ScriptObject> {
+ static const bool emptyValueIsZero = false;
+ static ScriptObject emptyValue() { return ScriptObject(ScriptState::current(), ScriptValue::createNull()); }
+ static void constructDeletedValue(ScriptObject& slot) { slot = ScriptObject(); }
+ static bool isDeletedValue(ScriptObject value) { return value.hasNoValue(); }
};
} // namespace WebCore
-#endif // SVGAnimatedPath_h
+#endif // !defined(ScriptObjectTraits_h)
« no previous file with comments | « Source/bindings/bindings.gypi ('k') | Source/bindings/v8/custom/V8PromiseCustom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698