-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Posting a message to another frame breaks today in dart2js. The problem is here in the generated code:
Isolate.$defineClass("_DOMWindowCrossFrameImpl", "Object", ["dartObjectLocalStorage", "_lib_window?"], {
postMessage$3: function(message, targetOrigin, messagePorts) {
if ($.eqNullB(messagePorts)) {
this._lib_window.postMessage$2(message, targetOrigin);
} else {
this._lib_window.postMessage$3(message, targetOrigin, messagePorts);
}
},
The object "this._lib_window" is a Window object in a different frame - which means it is not affected by any patching we need. In particularly, it has no "postMessage$2" object.
This happens to work in Frog since the frog optimizer replaces postMessage$2 with postMessage at compile time.
Marking high as this is coming up in Dromaeo benchmarks.