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

Unified Diff: client/dart.js

Issue 10702113: Serialize/deserialize lists in JS ports (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dart.js
===================================================================
--- client/dart.js (revision 9437)
+++ client/dart.js (working copy)
@@ -53,6 +53,8 @@
typeof(message) == 'number' ||
typeof(message) == 'boolean') {
return message;
+ } else if (message instanceof Array) {
+ return [ 'list', message.length, message ];
vsm 2012/07/06 13:48:16 Hmm. The elements of message should be serialized
sammccall 2012/07/06 16:01:41 Done.
} else if (message instanceof LocalSendPortSync) {
return [ 'sendport', 'nativejs', message.receivePort.id ];
} else if (message instanceof DartSendPortSync) {
@@ -83,6 +85,7 @@
switch (x[0]) {
case 'map': return deserializeMap(x);
case 'sendport': return deserializeSendPort(x);
+ case 'list': return x[2];
vsm 2012/07/06 13:48:16 I think you need to deserialized the elements of t
sammccall 2012/07/06 16:01:41 Done.
default: throw 'unimplemented';
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698