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

Unified Diff: lib/dom/scripts/generator.py

Issue 10868067: dart2js dart:html conversions for serialized script values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/generator.py
diff --git a/lib/dom/scripts/generator.py b/lib/dom/scripts/generator.py
index 7518b0134321f5beb8b17fa290bfce0199a70585..287f4427fea85fbd27641acd6ddfbc6d263480d5 100644
--- a/lib/dom/scripts/generator.py
+++ b/lib/dom/scripts/generator.py
@@ -504,6 +504,41 @@ dart2js_conversions = {
Conversion(
'_convertDartToNative_StringArray', 'List<String>', 'List'),
},
+
+ 'SerializedScriptValue': {
+ 'set IDBObjectStore.add':
+ Conversion('_convertDartToNative_SerializedScriptValue',
+ 'Dynamic', 'Dynamic'),
+ 'set IDBObjectStore.put':
+ Conversion('_convertDartToNative_SerializedScriptValue',
+ 'Dynamic', 'Dynamic'),
+ 'set IDBCursor.update':
+ Conversion('_convertDartToNative_SerializedScriptValue',
+ 'Dynamic', 'Dynamic'),
+ },
+
+
+ # IDBAny is problematic. Some uses are just a union of other IDB types,
+ # which need no conversion.. Others include data values which require
+ # serialized script value processing.
+ 'IDBAny': {
+ 'get IDBCursorWithValue.value':
+ Conversion('_convertNativeToDart_IDBAny', 'Dynamic', 'Dynamic'),
+
+ # This is problematic. The result property of IDBRequest is used for
+ # all requests. Read requests like IDBDataStore.getObject need
+ # conversion, but other requests like opening a database return
+ # something that does not need conversion.
+ 'get IDBRequest.result':
+ Conversion('_convertNativeToDart_IDBAny', 'Dynamic', 'Dynamic'),
+
+ # "source: On getting, returns the IDBObjectStore or IDBIndex that the
+ # cursor is iterating. ...". So we should not try to convert it.
+ 'get IDBCursor.source': None,
+
+ # Should be either a DOMString, an Array of DOMStrings or null.
+ 'get IDBObjectStore.keyPath': None
+ },
}
def FindConversion(idl_type, direction, interface, member):
« no previous file with comments | « no previous file | lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698