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

Unified Diff: pkg/browser/lib/interop.js

Issue 23291005: add JsArray and JsObject.asJsMap() Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rename asJsMap -> asDartMap + change JS type to var Created 7 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 | sdk/lib/js/dart2js/js_dart2js.dart » ('j') | sdk/lib/js/dart2js/js_dart2js.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/browser/lib/interop.js
diff --git a/pkg/browser/lib/interop.js b/pkg/browser/lib/interop.js
index 40e1700ad76d53fe7d69ec4819c10387678d1789..2a675bae1238ba094ee630e1cd77d3fd179a57fe 100644
--- a/pkg/browser/lib/interop.js
+++ b/pkg/browser/lib/interop.js
@@ -336,6 +336,7 @@ function DartProxy(o) {
// - sendport -> sendport
// - Function -> [ 'funcref', function-id, sendport ]
// - Object -> [ 'objref', object-id, sendport ]
+ // - Array -> [ 'arrayref', object-id, sendport ]
function serialize(message) {
if (message == null) {
return null; // Convert undefined to null.
@@ -364,7 +365,7 @@ function DartProxy(o) {
return [ 'objref', message.id, message.port ];
} else {
// Local object proxy.
- return [ 'objref',
+ return [ message instanceof Array ? 'arrayref' : 'objref',
proxiedObjectTable.add(message),
proxiedObjectTable.sendPort ];
}
« no previous file with comments | « no previous file | sdk/lib/js/dart2js/js_dart2js.dart » ('j') | sdk/lib/js/dart2js/js_dart2js.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698