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

Side by Side Diff: tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate

Issue 11770004: Rename Date to DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | 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 // DO NOT EDIT 5 // DO NOT EDIT
6 // Auto-generated dart:svg library. 6 // Auto-generated dart:svg library.
7 7
8 library indexed_db; 8 library indexed_db;
9 9
10 import 'dart:html'; 10 import 'dart:html';
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 containsDate(object) { 89 containsDate(object) {
90 if (isJavaScriptDate(object)) return true; 90 if (isJavaScriptDate(object)) return true;
91 if (object is List) { 91 if (object is List) {
92 for (int i = 0; i < object.length; i++) { 92 for (int i = 0; i < object.length; i++) {
93 if (containsDate(object[i])) return true; 93 if (containsDate(object[i])) return true;
94 } 94 }
95 } 95 }
96 return false; // number, string. 96 return false; // number, string.
97 } 97 }
98 if (containsDate(nativeKey)) { 98 if (containsDate(nativeKey)) {
99 throw new UnimplementedError('Key containing Date'); 99 throw new UnimplementedError('Key containing DateTime');
100 } 100 }
101 // TODO: Cache conversion somewhere? 101 // TODO: Cache conversion somewhere?
102 return nativeKey; 102 return nativeKey;
103 } 103 }
104 104
105 /** 105 /**
106 * Converts a Dart object into a valid IDBKey. 106 * Converts a Dart object into a valid IDBKey.
107 * 107 *
108 * May return the original input. Does not mutate input. 108 * May return the original input. Does not mutate input.
109 * 109 *
110 * If necessary, [dartKey] may be copied to ensure all lists are converted into 110 * If necessary, [dartKey] may be copied to ensure all lists are converted into
111 * JavaScript Arrays and Dart Dates into JavaScript Dates. 111 * JavaScript Arrays and Dart Dates into JavaScript Dates.
112 */ 112 */
113 _convertDartToNative_IDBKey(dartKey) { 113 _convertDartToNative_IDBKey(dartKey) {
114 // TODO: Implement. 114 // TODO: Implement.
115 return dartKey; 115 return dartKey;
116 } 116 }
117 117
118 118
119 119
120 /// May modify original. If so, action is idempotent. 120 /// May modify original. If so, action is idempotent.
121 _convertNativeToDart_IDBAny(object) { 121 _convertNativeToDart_IDBAny(object) {
122 return convertNativeToDart_AcceptStructuredClone(object, mustCopy: false); 122 return convertNativeToDart_AcceptStructuredClone(object, mustCopy: false);
123 } 123 }
124 124
125 125
126 const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add Date. 126 const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add DateTime.
127 const _annotation_Creates_IDBKey = const Creates(_idbKey); 127 const _annotation_Creates_IDBKey = const Creates(_idbKey);
128 const _annotation_Returns_IDBKey = const Returns(_idbKey); 128 const _annotation_Returns_IDBKey = const Returns(_idbKey);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698