PopStateEvent type received by window.onPopState is incorrect after dart2js conversion #16963
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
closed-obsolete
Closed as the reported issue is no longer relevant
library-html
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
This issue was originally filed by ses...@gmail.com
Scenario
Results
When Run in Dartium, I retrieved these logs:
PopStateEvent
PopStateEvent
PopStateEvent not null
PopStateEvent {x: 2}
PopStateEvent _LinkedHashMap
PopStateEvent (x)
PopStateEvent
PopStateEvent not null
PopStateEvent {x: 1}
PopStateEvent _LinkedHashMap
PopStateEvent (x)
PopStateEvent
When Run as JavaScript, I retrieved these logs:
PopStateEvent js_primitives.dart:25
PopStateEvent js_primitives.dart:25
PopStateEvent not null js_primitives.dart:25
PopStateEvent {_collection$_length: 1, _strings: {x: {_key: x, _collection$_value: 2, _next: null, _previous: null}}, _nums: null, _rest: null, _first: {_key: x, _collection$_value: 2, _next: null, _previous: null}, _last: {_key: x, _collection$_value: 2, _next: null, _previous: null}, _modifications: 1, $builtinTypeInfo: [null, null]} js_primitives.dart:25
PopStateEvent _LinkedHashMap js_primitives.dart:25
PopStateEvent (_collection$_length, _strings, _nums, ..., _modifications, $builtinTypeInfo) js_primitives.dart:25
PopStateEvent js_primitives.dart:25
PopStateEvent not null js_primitives.dart:25
PopStateEvent {_collection$_length: 1, _strings: {x: {_key: x, _collection$_value: 1, _next: null, _previous: null}}, _nums: null, _rest: null, _first: {_key: x, _collection$_value: 1, _next: null, _previous: null}, _last: {_key: x, _collection$_value: 1, _next: null, _previous: null}, _modifications: 1, $builtinTypeInfo: [null, null]} js_primitives.dart:25
PopStateEvent _LinkedHashMap js_primitives.dart:25
PopStateEvent (_collection$_length, _strings, _nums, ..., _modifications, $builtinTypeInfo) js_primitives.dart:25
Expected Results
Same behaviors in JS and Dart. For instance, I can't call 'event.state["x"]' in JS.
Environment
Dart VM version: 1.1.3 (Thu Feb 6 00:05:37 2014) on "macos_x64"
Attachment:
pop.dart (552 Bytes)
The text was updated successfully, but these errors were encountered: