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

Side by Side Diff: Source/modules/serviceworkers/Headers.cpp

Issue 715583008: Remove Dictionary::getOwnPropertyNames() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | « Source/modules/mediastream/RTCPeerConnection.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "config.h" 5 #include "config.h"
6 #include "modules/serviceworkers/Headers.h" 6 #include "modules/serviceworkers/Headers.h"
7 7
8 #include "bindings/core/v8/Dictionary.h" 8 #include "bindings/core/v8/Dictionary.h"
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "core/dom/Iterator.h" 10 #include "core/dom/Iterator.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 append(object[i][0], object[i][1], exceptionState); 299 append(object[i][0], object[i][1], exceptionState);
300 if (exceptionState.hadException()) 300 if (exceptionState.hadException())
301 return; 301 return;
302 } 302 }
303 } 303 }
304 304
305 void Headers::fillWith(const Dictionary& object, ExceptionState& exceptionState) 305 void Headers::fillWith(const Dictionary& object, ExceptionState& exceptionState)
306 { 306 {
307 ASSERT(!m_headerList->size()); 307 ASSERT(!m_headerList->size());
308 Vector<String> keys; 308 Vector<String> keys;
309 object.getOwnPropertyNames(keys); 309 object.getPropertyNames(keys);
310 if (!keys.size()) 310 if (!keys.size())
311 return; 311 return;
312 312
313 // "3. Otherwise, if |object| is an open-ended dictionary, then for each 313 // "3. Otherwise, if |object| is an open-ended dictionary, then for each
314 // |header| in object, run these substeps: 314 // |header| in object, run these substeps:
315 // 1. Set |header|'s key to |header|'s key, converted to ByteString. 315 // 1. Set |header|'s key to |header|'s key, converted to ByteString.
316 // Rethrow any exception. 316 // Rethrow any exception.
317 // 2. Append |header|'s key/|header|'s value to |headers|. Rethrow any 317 // 2. Append |header|'s key/|header|'s value to |headers|. Rethrow any
318 // exception." 318 // exception."
319 // FIXME: Support OpenEndedDictionary<ByteString>. 319 // FIXME: Support OpenEndedDictionary<ByteString>.
(...skipping 25 matching lines...) Expand all
345 { 345 {
346 return new HeadersIterator(m_headerList, HeadersIterator::KeyValue); 346 return new HeadersIterator(m_headerList, HeadersIterator::KeyValue);
347 } 347 }
348 348
349 void Headers::trace(Visitor* visitor) 349 void Headers::trace(Visitor* visitor)
350 { 350 {
351 visitor->trace(m_headerList); 351 visitor->trace(m_headerList);
352 } 352 }
353 353
354 } // namespace blink 354 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/mediastream/RTCPeerConnection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698