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

Side by Side Diff: Source/bindings/modules/v8/custom/V8SubtleCryptoCustom.cpp

Issue 460923002: Decouple arity errors creation from throwing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
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 "bindings/modules/v8/V8SubtleCrypto.h" 6 #include "bindings/modules/v8/V8SubtleCrypto.h"
7 7
8 #include "bindings/core/v8/Dictionary.h" 8 #include "bindings/core/v8/Dictionary.h"
9 #include "bindings/core/v8/custom/V8ArrayBufferCustom.h" 9 #include "bindings/core/v8/custom/V8ArrayBufferCustom.h"
10 #include "bindings/core/v8/custom/V8ArrayBufferViewCustom.h" 10 #include "bindings/core/v8/custom/V8ArrayBufferViewCustom.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return; 107 return;
108 } 108 }
109 // Promise verify(Dictionary algorithm, CryptoKey key, ArrayBufferView s ignature, ArrayBufferView data); 109 // Promise verify(Dictionary algorithm, CryptoKey key, ArrayBufferView s ignature, ArrayBufferView data);
110 if (V8ArrayBufferView::hasInstance(info[2], isolate) 110 if (V8ArrayBufferView::hasInstance(info[2], isolate)
111 && V8ArrayBufferView::hasInstance(info[3], isolate)) { 111 && V8ArrayBufferView::hasInstance(info[3], isolate)) {
112 verify4Method(info); 112 verify4Method(info);
113 return; 113 return;
114 } 114 }
115 break; 115 break;
116 default: 116 default:
117 throwArityTypeError(exceptionState, "[4]", info.Length()); 117 setArityTypeError(exceptionState, "[4]", info.Length());
118 exceptionState.throwIfNeeded();
118 return; 119 return;
119 break; 120 break;
120 } 121 }
121 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 122 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
122 exceptionState.throwIfNeeded(); 123 exceptionState.throwIfNeeded();
123 } 124 }
124 125
125 } // namespace blink 126 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698