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

dartlang.org editor download page works incorrectly in Opera and IE9 #2397

Closed
efortuna opened this issue Apr 3, 2012 · 14 comments
Closed

dartlang.org editor download page works incorrectly in Opera and IE9 #2397

efortuna opened this issue Apr 3, 2012 · 14 comments
Assignees
Labels
closed-duplicate Closed in favor of an existing report P1 A high priority bug; for example, a single project is unusable or has many test failures
Milestone

Comments

@efortuna
Copy link
Contributor

efortuna commented Apr 3, 2012

The download page shows up incorrectly - in particular, it shows downloads for mac/linux/windows like this:

In this step, you'll install Dart Editor and, if necessary, a Java runtime environment.

 Download the Dart Editor ZIP file that matches your system architecture:
32-bit Dart Editor
64-bit Dart Editor
 Download the Dart Editor ZIP file:
Dart Editor ZIP file
 Download the Dart Editor ZIP file that matches your system architecture:
32-bit Dart Editor
64-bit Dart Editor

Choosing the platform via the radio buttons at the top of the page doesn't do anything on either Opera or IE9.

@sethladd
Copy link
Contributor

sethladd commented Apr 3, 2012

Adding Kathy, who wrote the code for this functionality.


Set owner to @kwalrath.

@kwalrath
Copy link
Contributor

kwalrath commented Apr 3, 2012

Would it be possible for dart:html to fix this for me? Or are Opera and IE9 just not supported? (Either way, I can work around this issue.)

Here's the Dart code that apparently causes the problem:

void filterPlatformText() {
  // Get all the platform-specific elements.
  osList.forEach((os) {
    bool shouldShow = (os == osName);
    document.queryAll('.$os').forEach((el) {
      el.hidden = !shouldShow; // Show or hide each element.
    });
  });
}

It translates to this JavaScript:

$dynamic("set$hidden").Element = function(value) { return this.hidden = value; };
...
function filterPlatformText() {
  const$0006.forEach((function (os) {
    var shouldShow = ($eq$(os, $globals.osName));
    get$$document().queryAll(("." + os)).forEach((function (el) {
      el.set$hidden(!shouldShow);
    })
    );
  })
  );
}

@efortuna
Copy link
Contributor Author

efortuna commented Apr 3, 2012

IE9 and Opera 12 alpha are supported. I'll let Dan respond in more detail on this (he actually filed this bug when I was signed in).

@dgrove
Copy link
Contributor

dgrove commented Apr 4, 2012

assigning to Vijay - this should be fixed in dart:html


cc @kwalrath.
Set owner to @vsmenon.
Removed Area-Site label.
Added Area-UI label.

@sethladd
Copy link
Contributor

Bumping up to High. Hackathon attendee using IE9 was just bit by this, and downloaded the Linux version of Editor instead of Windows version.


Removed Priority-Medium label.
Added Priority-High label.

@vsmenon
Copy link
Member

vsmenon commented May 1, 2012

Removed Area-UI label.
Added Area-DOM label.

@vsmenon
Copy link
Member

vsmenon commented Jun 22, 2012

Has anyone tried this recently? Has the page been regenerated recently?

There have been a number of fixes for dart2js + dom recently.


Added this to the M1 milestone.

@vsmenon
Copy link
Member

vsmenon commented Jun 22, 2012

Kathy, can you re-generate and let me know if there is still a problem? Just looks at the page, we can't see any obvious compiler generated code. Is it going through a minifier?


Set owner to @kwalrath.
Added NeedsInfo label.

@kwalrath
Copy link
Contributor

I'll re-generate. I used Dart Editor's Compile-to-JavaScript to get the JS code... a long time ago.


Added Accepted label.

@kwalrath
Copy link
Contributor

Just regenerated (and downloaded Opera), and the results still look bad:

http://switcher.dart-lang.appspot.com/downloads.html

The code is in http://switcher.dart-lang.appspot.com/js/Switcher.dart and http://switcher.dart-lang.appspot.com/js/Switcher.dart.js.


Set owner to @vsmenon.

@vsmenon
Copy link
Member

vsmenon commented Jun 22, 2012

Adding Stephen and Kasper. I've tried running this page on Mac Opera and I can recreate the problem. I cannot run much of anything on Opera. Any non-trivial Dart-generated code hits a stack overflow error. The page is essentially showing the effect of no Dart running at all.

From the Opera console:

$.window().get$navigator

function() {return $.dynamicBind.$call$4(this, name$, methods, Array.prototype.slice.call(arguments));}

$.window().get$navigator()

Unhandled Error: Maximum recursion depth exceeded
message "Maximum recursion depth exceed…"
stack "<anonymous function: $.contains$1>([arguments not available])@http://switcher.dart-lang.appspot.com/js/Switcher.dart.js:1790 <anonymous function: $.getFunctionForTypeNameOf>([arguments not available])@http://switcher.dart-lang.appspot.com/js/Switcher.dart.js:2286 <anonymous function: $.getTypeNameOf>([arguments not available])@http://switcher.dart-lang.appspot.com/js/Switcher.dart.js:2507 <anonymous function: $.dynamicBind>([arguments not available])@http://switcher.dart-lang.appspot.com/js/Switcher.dart.js:2256 <anonymous function: $.dynamicFunction>([arguments not available])@http://switcher.dart-lang.appspot.com/js/Switcher.dart.js:2048 <anonymous function: $.regExpMakeNative>([arguments not available])@http://switcher.dart-lang.appspot.com/js/Switcher.dart.js:2128 <anonymous function: $.regExpGetNative>([arguments not available])@http://switcher.dart-lang.appspot.com/js/Switcher.dart.js:1669 <anonymous function: $.regExpTest>([arguments not available])@http://switcher.dart-lang.appspot.com/js/Switcher.dart.js:1896 <anonymous function: hasMatch$1>([arguments not available])@http://switcher.dart-lang.appspot.com/js/Switcher.dart.js:453 <anonymous function: $.stringContainsUnchecked>([arguments not available])@http://switcher.dart-lang.appspot.com/js/Switcher.dart.js:2056"
stacktrace "Error thrown at line 1790, col…"
Error
Error
Object


cc @kasperl.
cc @rakudrama.

@vsmenon
Copy link
Member

vsmenon commented Jul 16, 2012

Marked this as being blocked by #4111.

@vsmenon
Copy link
Member

vsmenon commented Jul 18, 2012

I tracked this down to the same issue as 3218. Florian has a fix in the works.


Added Duplicate label.
Marked as being merged into #3218.

@vsmenon
Copy link
Member

vsmenon commented Jul 18, 2012

Marked as being merged into #3812.

@efortuna efortuna added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures closed-duplicate Closed in favor of an existing report labels Jul 18, 2012
@efortuna efortuna added this to the M1 milestone Jul 18, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

5 participants