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

Side by Side Diff: Source/core/dom/Iterable.h

Issue 848953003: Drop (empty) virtual destructor from Iterable<> class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/modules/fetch/Headers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Iterable_h 5 #ifndef Iterable_h
6 #define Iterable_h 6 #define Iterable_h
7 7
8 #include "bindings/core/v8/V8IteratorResultValue.h" 8 #include "bindings/core/v8/V8IteratorResultValue.h"
9 #include "core/dom/Iterator.h" 9 #include "core/dom/Iterator.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 // Typically, use one of ValueIterable<> and PairIterable<> (below) instead! 13 // Typically, use one of ValueIterable<> and PairIterable<> (below) instead!
14 template <typename KeyType, typename ValueType> 14 template <typename KeyType, typename ValueType>
15 class Iterable { 15 class Iterable {
16 public: 16 public:
17 virtual ~Iterable() { }
18
19 Iterator* keys(ScriptState* scriptState, ExceptionState& exceptionState) 17 Iterator* keys(ScriptState* scriptState, ExceptionState& exceptionState)
20 { 18 {
21 IterationSource* source = this->startIteration(scriptState, exceptionSta te); 19 IterationSource* source = this->startIteration(scriptState, exceptionSta te);
22 if (!source) 20 if (!source)
23 return nullptr; 21 return nullptr;
24 return new IterableIterator<KeySelector>(source); 22 return new IterableIterator<KeySelector>(source);
25 } 23 }
26 24
27 Iterator* values(ScriptState* scriptState, ExceptionState& exceptionState) 25 Iterator* values(ScriptState* scriptState, ExceptionState& exceptionState)
28 { 26 {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 public: 156 public:
159 Iterator* iterator(ScriptState* scriptState, ExceptionState& exceptionState) 157 Iterator* iterator(ScriptState* scriptState, ExceptionState& exceptionState)
160 { 158 {
161 return this->entries(scriptState, exceptionState); 159 return this->entries(scriptState, exceptionState);
162 } 160 }
163 }; 161 };
164 162
165 } // namespace blink 163 } // namespace blink
166 164
167 #endif // Iterable_h 165 #endif // Iterable_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/fetch/Headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698