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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void Storage::NamedPropertyEnumerator(Vector<String>& names, | 75 void Storage::NamedPropertyEnumerator(Vector<String>& names, |
76 ExceptionState& exception_state) { | 76 ExceptionState& exception_state) { |
77 unsigned length = this->length(exception_state); | 77 unsigned length = this->length(exception_state); |
78 if (exception_state.HadException()) | 78 if (exception_state.HadException()) |
79 return; | 79 return; |
80 names.Resize(length); | 80 names.Resize(length); |
81 for (unsigned i = 0; i < length; ++i) { | 81 for (unsigned i = 0; i < length; ++i) { |
82 String key = this->key(i, exception_state); | 82 String key = this->key(i, exception_state); |
83 if (exception_state.HadException()) | 83 if (exception_state.HadException()) |
84 return; | 84 return; |
85 ASSERT(!key.IsNull()); | 85 DCHECK(!key.IsNull()); |
86 String val = getItem(key, exception_state); | 86 String val = getItem(key, exception_state); |
87 if (exception_state.HadException()) | 87 if (exception_state.HadException()) |
88 return; | 88 return; |
89 names[i] = key; | 89 names[i] = key; |
90 } | 90 } |
91 } | 91 } |
92 | 92 |
93 bool Storage::NamedPropertyQuery(const AtomicString& name, | 93 bool Storage::NamedPropertyQuery(const AtomicString& name, |
94 ExceptionState& exception_state) { | 94 ExceptionState& exception_state) { |
95 if (name == "length") | 95 if (name == "length") |
96 return false; | 96 return false; |
97 bool found = Contains(name, exception_state); | 97 bool found = Contains(name, exception_state); |
98 if (exception_state.HadException() || !found) | 98 if (exception_state.HadException() || !found) |
99 return false; | 99 return false; |
100 return true; | 100 return true; |
101 } | 101 } |
102 | 102 |
103 DEFINE_TRACE(Storage) { | 103 DEFINE_TRACE(Storage) { |
104 visitor->Trace(storage_area_); | 104 visitor->Trace(storage_area_); |
105 ContextClient::Trace(visitor); | 105 ContextClient::Trace(visitor); |
106 } | 106 } |
107 | 107 |
108 } // namespace blink | 108 } // namespace blink |
OLD | NEW |