-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Constructor being called twice - only when the code is tested dartium. The generated javascript code behaves correctly #15844
Comments
Can you please point us to a full repro? (ie, the changed sources for the Searchable List project) Added NeedsInfo label. |
This comment was originally written by garrick.black...@gmail.com I'm having this happen consistently. It's making a mess because sometimes one of the constructors will fail. |
I can reproduce this with the searchable_list sample and Dart Editor 1.2.0.dev_03_02 by just adding the two log-statements to demo_app.dart and searchable_list.dart as described in the original report. When running in Dartium, the constructor of SearchableList is invoked twice. Running the dart2js version only invokes it once. Added Area-Dartium, Triaged labels. |
I'm unsure if the belongs to Polymer or Dartium. Here are the stack traces I get from Dartium: It seems ine time the element is cloned and therefore the constructor is invoked twice. Not sure if that's supposed to happen. #0 SearchableList.SearchableList.created (http://127.0.0.1:3030/searchable_list/web/elements/searchable_list.dart:19:7) SearchableList.created() Here is the stack trace I get from the dart2js unminified code: Error The way the element's constructor is invoked is different: As a call-back from the event loop. In Dartium it is invoked via main(). |
Issue #20197 has been merged into this issue. |
Issue #20197 also has a simple example reproducing this problem. |
cc @blois. |
I cannot repro this, but can repro issue #20197. Resolving this as cannot repro. Added CannotReproduce label. |
This comment was originally written by alois.p...@student.uclouvain.be Hi, I also encounter this problem in dartium (the constructor and ready function are actually called three times) but not in firefox when using the dart2js version. |
This comment was originally written by @zoechi Can you provide a complete example that allows to reproduce the problem? |
This issue was originally filed by gvpint...@gmail.com
What steps will reproduce the problem?
SearchableList.created() : super.created() {
window.console.debug('SearchableList.created()');
}
DemoApp.created() : super.created() {
window.console.debug('DemoApp.created()');
}
What is the expected output? What do you see instead?
I see the SearchableList.created called twice
SearchableList.created()
SearchableList.created()
DemoApp.created()
instead of
SearchableList.created()
DemoApp.created()
What version of the product are you using? On what operating system?
Dart Editor version 1.0.0_r30798 (STABLE)
Dart SDK version 1.0.0.10_r30798
Mac OSX 10.9.1
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: