Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PopStateEvent type received by window.onPopState is incorrect after dart2js conversion #16963

Closed
DartBot opened this issue Feb 20, 2014 · 3 comments
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)

Comments

@DartBot
Copy link

DartBot commented Feb 20, 2014

This issue was originally filed by ses...@gmail.com


Scenario

  1. Create a Web application with Dart Editor with 'pop' as name
  2. Load attached file pop.dart
  3. Run in Dartium, click 2 times on back button
  4. Run as Javascript, click 2 times on back button

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)

@lrhn
Copy link
Member

lrhn commented Feb 20, 2014

Added Area-HTML, Triaged labels.

@kevmoo
Copy link
Member

kevmoo commented Apr 7, 2014

Removed Area-HTML label.
Added Area-Library, Library-Html labels.

@alan-knight
Copy link
Contributor

Yes, looks like the internal map representation is getting saved and then coming out getting converted to Dart. Still happens in 1.8.


Removed Priority-Unassigned label.
Added Priority-Medium label.

@DartBot DartBot added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html labels Jan 16, 2015
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed triaged labels Mar 1, 2016
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
None yet
Development

No branches or pull requests

5 participants