OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 11 matching lines...) Expand all Loading... |
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
23 * THE POSSIBILITY OF SUCH DAMAGE. | 23 * THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef DOMStringMap_h | 26 #ifndef DOMStringMap_h |
27 #define DOMStringMap_h | 27 #define DOMStringMap_h |
28 | 28 |
29 #include "bindings/v8/ExceptionState.h" | 29 #include "bindings/v8/ExceptionState.h" |
30 #include "bindings/v8/ScriptWrappable.h" | 30 #include "bindings/v8/ScriptWrappable.h" |
31 #include "bindings/v8/V8Binding.h" | 31 #include "bindings/v8/V8Binding.h" |
| 32 #include "platform/heap/Handle.h" |
32 #include "wtf/Noncopyable.h" | 33 #include "wtf/Noncopyable.h" |
33 #include "wtf/Vector.h" | 34 #include "wtf/Vector.h" |
34 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
35 | 36 |
36 namespace WebCore { | 37 namespace WebCore { |
37 | 38 |
38 class Element; | 39 class Element; |
39 | 40 |
40 class DOMStringMap : public ScriptWrappable { | 41 class DOMStringMap : public NoBaseWillBeGarbageCollectedFinalized<DOMStringMap>,
public ScriptWrappable { |
41 WTF_MAKE_NONCOPYABLE(DOMStringMap); WTF_MAKE_FAST_ALLOCATED; | 42 WTF_MAKE_NONCOPYABLE(DOMStringMap); |
| 43 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
42 public: | 44 public: |
43 virtual ~DOMStringMap(); | 45 virtual ~DOMStringMap(); |
44 | 46 |
| 47 #if !ENABLE(OILPAN) |
45 virtual void ref() = 0; | 48 virtual void ref() = 0; |
46 virtual void deref() = 0; | 49 virtual void deref() = 0; |
| 50 #endif |
47 | 51 |
48 virtual void getNames(Vector<String>&) = 0; | 52 virtual void getNames(Vector<String>&) = 0; |
49 virtual String item(const String& name) = 0; | 53 virtual String item(const String& name) = 0; |
50 virtual bool contains(const String& name) = 0; | 54 virtual bool contains(const String& name) = 0; |
51 virtual void setItem(const String& name, const String& value, ExceptionState
&) = 0; | 55 virtual void setItem(const String& name, const String& value, ExceptionState
&) = 0; |
52 virtual bool deleteItem(const String& name) = 0; | 56 virtual bool deleteItem(const String& name) = 0; |
53 bool anonymousNamedSetter(const String& name, const String& value, Exception
State& exceptionState) | 57 bool anonymousNamedSetter(const String& name, const String& value, Exception
State& exceptionState) |
54 { | 58 { |
55 setItem(name, value, exceptionState); | 59 setItem(name, value, exceptionState); |
56 return true; | 60 return true; |
(...skipping 17 matching lines...) Expand all Loading... |
74 { | 78 { |
75 return anonymousNamedSetter(String::number(index), value, exceptionState
); | 79 return anonymousNamedSetter(String::number(index), value, exceptionState
); |
76 } | 80 } |
77 DeleteResult anonymousIndexedDeleter(uint32_t index) | 81 DeleteResult anonymousIndexedDeleter(uint32_t index) |
78 { | 82 { |
79 return anonymousNamedDeleter(AtomicString::number(index)); | 83 return anonymousNamedDeleter(AtomicString::number(index)); |
80 } | 84 } |
81 | 85 |
82 virtual Element* element() = 0; | 86 virtual Element* element() = 0; |
83 | 87 |
| 88 virtual void trace(Visitor*) { } |
| 89 |
84 protected: | 90 protected: |
85 DOMStringMap() | 91 DOMStringMap() |
86 { | 92 { |
87 ScriptWrappable::init(this); | 93 ScriptWrappable::init(this); |
88 } | 94 } |
89 }; | 95 }; |
90 | 96 |
91 } // namespace WebCore | 97 } // namespace WebCore |
92 | 98 |
93 #endif // DOMStringMap_h | 99 #endif // DOMStringMap_h |
OLD | NEW |