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

Unified Diff: lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 10991024: Regenerate dart:html files (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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:
Download patch
« no previous file with comments | « lib/html/dart2js/html_dart2js.dart ('k') | lib/html/src/Isolates.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dartium/html_dartium.dart
diff --git a/lib/html/dartium/html_dartium.dart b/lib/html/dartium/html_dartium.dart
index 3815a17c647950c68e141644335d8cb00e5f25d0..3f772054626aeb1fef2d0a6a3379e1d59f93911b 100644
--- a/lib/html/dartium/html_dartium.dart
+++ b/lib/html/dartium/html_dartium.dart
@@ -51,7 +51,7 @@ var _callPortLastResult = null;
_callPortSync(num id, var message) {
if (!_callPortInitialized) {
window.on['js-result'].add((event) {
- _callPortLastResult = JSON.parse(event.data);
+ _callPortLastResult = JSON.parse(_getPortSyncEventData(event));
}, false);
_callPortInitialized = true;
}
@@ -43569,7 +43569,7 @@ class _RemoteSendPortSync implements SendPortSync {
var source = '$target-result';
var result = null;
var listener = (Event e) {
- result = JSON.parse(e.detail);
+ result = JSON.parse(_getPortSyncEventData(e));
};
window.on[source].add(listener);
_dispatchEvent(target, [source, message]);
@@ -43641,7 +43641,7 @@ class ReceivePortSync {
_callback = callback;
if (_listener === null) {
_listener = (Event e) {
- var data = JSON.parse(e.detail);
+ var data = JSON.parse(_getPortSyncEventData(e));
var replyTo = data[0];
var message = _deserialize(data[1]);
var result = _callback(message);
@@ -43676,6 +43676,8 @@ void _dispatchEvent(String receiver, var message) {
event.initCustomEvent(receiver, false, false, JSON.stringify(message));
window.$dom_dispatchEvent(event);
}
+
+String _getPortSyncEventData(CustomEvent event) => event.detail;
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
« no previous file with comments | « lib/html/dart2js/html_dart2js.dart ('k') | lib/html/src/Isolates.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698