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

Unified Diff: lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 10960062: Fix SendPortSync dispatch for FF (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix indentation 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 | « client/dart.js ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dart2js/html_dart2js.dart
diff --git a/lib/html/dart2js/html_dart2js.dart b/lib/html/dart2js/html_dart2js.dart
index 38502c327c3be27ca2c59878971d442825743e82..c9764e7bb157255a514fea9a8300bb6bf3e69eda 100644
--- a/lib/html/dart2js/html_dart2js.dart
+++ b/lib/html/dart2js/html_dart2js.dart
@@ -40533,8 +40533,8 @@ class _RemoteSendPortSync implements SendPortSync {
// TODO(vsm): Set this up set once, on the first call.
var source = '$target-result';
var result = null;
- var listener = (TextEvent e) {
- result = JSON.parse(e.data);
+ var listener = (Event e) {
+ result = JSON.parse(e.detail);
};
window.on[source].add(listener);
_dispatchEvent(target, [source, message]);
@@ -40605,8 +40605,8 @@ class ReceivePortSync {
void receive(callback(var message)) {
_callback = callback;
if (_listener === null) {
- _listener = (TextEvent e) {
- var data = JSON.parse(e.data);
+ _listener = (Event e) {
+ var data = JSON.parse(e.detail);
var replyTo = data[0];
var message = _deserialize(data[1]);
var result = _callback(message);
@@ -40637,8 +40637,8 @@ class ReceivePortSync {
get _isolateId => ReceivePortSync._isolateId;
void _dispatchEvent(String receiver, var message) {
- var event = document.$dom_createEvent('TextEvent');
- event.initTextEvent(receiver, false, false, window, JSON.stringify(message));
+ var event = document.$dom_createEvent('CustomEvent');
+ event.initCustomEvent(receiver, false, false, JSON.stringify(message));
window.$dom_dispatchEvent(event);
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
« no previous file with comments | « client/dart.js ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698