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

Side by Side Diff: lib/html/templates/html/dart2js/impl_IDBDatabase.darttemplate

Issue 10989013: Change IllegalArgumentException to ArgumentError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated co19 test expectations. Created 8 years, 2 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 5 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
6 6
7 _IDBTransactionImpl transaction(storeName_OR_storeNames, String mode) { 7 _IDBTransactionImpl transaction(storeName_OR_storeNames, String mode) {
8 if (mode != 'readonly' && mode != 'readwrite') { 8 if (mode != 'readonly' && mode != 'readwrite') {
9 throw new IllegalArgumentException(mode); 9 throw new ArgumentError(mode);
10 } 10 }
11 11
12 // TODO(sra): Ensure storeName_OR_storeNames is a string, List<String> or 12 // TODO(sra): Ensure storeName_OR_storeNames is a string, List<String> or
13 // DOMStringList, and copy to JavaScript array if necessary. 13 // DOMStringList, and copy to JavaScript array if necessary.
14 14
15 if (_transaction_fn != null) { 15 if (_transaction_fn != null) {
16 return _transaction_fn(this, storeName_OR_storeNames, mode); 16 return _transaction_fn(this, storeName_OR_storeNames, mode);
17 } 17 }
18 18
19 // Try and create a transaction with a string mode. Browsers that expect a 19 // Try and create a transaction with a string mode. Browsers that expect a
(...skipping 22 matching lines...) Expand all
42 42
43 _IDBTransactionImpl _transaction(stores, mode) native 'transaction'; 43 _IDBTransactionImpl _transaction(stores, mode) native 'transaction';
44 44
45 static bool _hasNumericMode(txn) native 'return typeof(txn.mode) === "number"' ; 45 static bool _hasNumericMode(txn) native 'return typeof(txn.mode) === "number"' ;
46 46
47 $!MEMBERS} 47 $!MEMBERS}
48 48
49 // TODO(sra): This should be a static member of _IDBTransactionImpl but dart2js 49 // TODO(sra): This should be a static member of _IDBTransactionImpl but dart2js
50 // can't handle that. Move it back after dart2js is completely done. 50 // can't handle that. Move it back after dart2js is completely done.
51 var _transaction_fn; // Assigned one of the static methods. 51 var _transaction_fn; // Assigned one of the static methods.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698