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

Side by Side Diff: Source/bindings/v8/Dictionary.cpp

Issue 180323002: [webcrypto] Add parameter parsing for AES-GCM. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/modules/crypto/NormalizeAlgorithm.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 v8::Local<v8::Value> v8Value; 424 v8::Local<v8::Value> v8Value;
425 if (!getKey(key, v8Value)) 425 if (!getKey(key, v8Value))
426 return false; 426 return false;
427 427
428 value = V8Uint8Array::toNativeWithTypeCheck(m_isolate, v8Value); 428 value = V8Uint8Array::toNativeWithTypeCheck(m_isolate, v8Value);
429 return true; 429 return true;
430 } 430 }
431 431
432 bool Dictionary::get(const String& key, RefPtr<ArrayBufferView>& value) const 432 bool Dictionary::get(const String& key, RefPtr<ArrayBufferView>& value) const
433 { 433 {
434 bool unused;
435 return get(key, value, unused);
436 }
437
438 bool Dictionary::get(const String& key, RefPtr<ArrayBufferView>& value, bool& ha sValue) const
439 {
434 v8::Local<v8::Value> v8Value; 440 v8::Local<v8::Value> v8Value;
435 if (!getKey(key, v8Value)) 441 if (!getKey(key, v8Value)) {
442 hasValue = false;
sof 2014/02/25 22:01:45 Hmm, this extra reference argument seems to end up
eroman 2014/02/25 22:23:29 You are right, my mistake. Will remove
eroman 2014/02/25 22:31:00 Thanks sof! updated.
436 return false; 443 return false;
444 }
437 445
446 hasValue = true;
438 value = V8ArrayBufferView::toNativeWithTypeCheck(m_isolate, v8Value); 447 value = V8ArrayBufferView::toNativeWithTypeCheck(m_isolate, v8Value);
439 return true; 448 return true;
440 } 449 }
441 450
442 bool Dictionary::get(const String& key, RefPtr<MIDIPort>& value) const 451 bool Dictionary::get(const String& key, RefPtr<MIDIPort>& value) const
443 { 452 {
444 v8::Local<v8::Value> v8Value; 453 v8::Local<v8::Value> v8Value;
445 if (!getKey(key, v8Value)) 454 if (!getKey(key, v8Value))
446 return false; 455 return false;
447 456
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 { 761 {
753 if (forConstructor()) { 762 if (forConstructor()) {
754 exceptionState().throwTypeError(detail); 763 exceptionState().throwTypeError(detail);
755 } else { 764 } else {
756 ASSERT(!methodName().isEmpty()); 765 ASSERT(!methodName().isEmpty());
757 exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter faceName(), methodName(), detail)); 766 exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter faceName(), methodName(), detail));
758 } 767 }
759 } 768 }
760 769
761 } // namespace WebCore 770 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/modules/crypto/NormalizeAlgorithm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698