OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 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 28 matching lines...) Expand all Loading... |
39 } | 39 } |
40 | 40 |
41 Storage::Storage(LocalFrame* frame, PassOwnPtrWillBeRawPtr<StorageArea> storageA
rea) | 41 Storage::Storage(LocalFrame* frame, PassOwnPtrWillBeRawPtr<StorageArea> storageA
rea) |
42 : DOMWindowProperty(frame) | 42 : DOMWindowProperty(frame) |
43 , m_storageArea(storageArea) | 43 , m_storageArea(storageArea) |
44 { | 44 { |
45 ASSERT(m_frame); | 45 ASSERT(m_frame); |
46 ASSERT(m_storageArea); | 46 ASSERT(m_storageArea); |
47 } | 47 } |
48 | 48 |
49 Storage::~Storage() | 49 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(Storage); |
50 { | |
51 } | |
52 | 50 |
53 String Storage::anonymousIndexedGetter(unsigned index, ExceptionState& exception
State) | 51 String Storage::anonymousIndexedGetter(unsigned index, ExceptionState& exception
State) |
54 { | 52 { |
55 return anonymousNamedGetter(AtomicString::number(index), exceptionState); | 53 return anonymousNamedGetter(AtomicString::number(index), exceptionState); |
56 } | 54 } |
57 | 55 |
58 String Storage::anonymousNamedGetter(const AtomicString& name, ExceptionState& e
xceptionState) | 56 String Storage::anonymousNamedGetter(const AtomicString& name, ExceptionState& e
xceptionState) |
59 { | 57 { |
60 bool found = contains(name, exceptionState); | 58 bool found = contains(name, exceptionState); |
61 if (exceptionState.hadException() || !found) | 59 if (exceptionState.hadException() || !found) |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 return false; | 118 return false; |
121 bool found = contains(name, exceptionState); | 119 bool found = contains(name, exceptionState); |
122 if (exceptionState.hadException() || !found) | 120 if (exceptionState.hadException() || !found) |
123 return false; | 121 return false; |
124 return true; | 122 return true; |
125 } | 123 } |
126 | 124 |
127 void Storage::trace(Visitor* visitor) | 125 void Storage::trace(Visitor* visitor) |
128 { | 126 { |
129 visitor->trace(m_storageArea); | 127 visitor->trace(m_storageArea); |
| 128 DOMWindowProperty::trace(visitor); |
130 } | 129 } |
131 | 130 |
132 } | 131 } |
OLD | NEW |