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

dart2js: missing toString() method in error/exception object in IE9 #3240

Closed
DartBot opened this issue May 25, 2012 · 19 comments
Closed

dart2js: missing toString() method in error/exception object in IE9 #3240

DartBot opened this issue May 25, 2012 · 19 comments
Assignees

Comments

@DartBot
Copy link

DartBot commented May 25, 2012

This issue was originally filed by @bp74


What steps will reproduce the problem?

import('dart:html');

void main() {
  AudioContext audioContext;
  
  try {
    audioContext = new AudioContext();
  }
  catch(final error) {
    print(error);
  }
}

What is the expected output? What do you see instead?

This issue came up after issue #3190 was fixed. Before the fix the catch-block wasn't called at all, after the bug was fixed the error object in the sample above leads to another problem.

The "print(error)" statement tries to convert the "error" variable to a String. In Firefox the result is "Instance of 'TypeError'" which is fine. In IE9 you get a JavaScript error:

SCRIPT5007: Unable to get value of the property 'charCodeAt$1': object is null or undefined

I have attached 3 pictures showing the call stack.

What version of the product are you using? On what operating system?

Dart Editor Build 7992 32 bit, Windows 7 64 bit.

@DartBot
Copy link
Author

DartBot commented May 25, 2012

This comment was originally written by @bp74


I need more sleep, here are the pictures ...


Attachments:
shot1.png (54.43 KB)
shot2.png (55.90 KB)
shot3.png (52.78 KB)

@peter-ahe-google
Copy link
Contributor

cc @kasperl.
Added Area-Dart2JS, Triaged labels.

@kasperl
Copy link

kasperl commented Jun 6, 2012

Set owner to @kasperl.
Added Accepted label.

@kasperl
Copy link

kasperl commented Jun 6, 2012

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

@kasperl
Copy link

kasperl commented Jun 6, 2012

Possible fix submitted in r8332. I'll keep this bug open until I've added a (passing) regression test case.

@kasperl
Copy link

kasperl commented Jun 8, 2012

I modified the kind of exception being thrown in r8417. On IE it now prints:

  Exception: Object doesn't support this action

and on Firefox it now prints:

  Exception: constructor is not a constructor

Still needs a regression test.


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

@kasperl
Copy link

kasperl commented Sep 3, 2012

Added this to the Later milestone.

@kasperl
Copy link

kasperl commented Oct 17, 2012

Removed this from the Later milestone.

@kasperl
Copy link

kasperl commented Oct 17, 2012

Added this to the M2 milestone.

@peter-ahe-google
Copy link
Contributor

Set owner to @johnniwinther.

@johnniwinther
Copy link
Member

Removed this from the M2 milestone.
Added this to the M3 milestone.

@kasperl
Copy link

kasperl commented Feb 4, 2013

Peter, does your work in https://codereview.chromium.org/11973018/ solve this issue?


Set owner to @peter-ahe-google.
Changed the title to: "dart2js: missing toString() method in error/exception object in IE9".

@peter-ahe-google
Copy link
Contributor

I don't know. I haven't tested on IE9 yet. I'll make a note to test this as well in CL 11973018.

@peter-ahe-google
Copy link
Contributor

Removed this from the M3 milestone.
Added this to the M4 milestone.

@kasperl
Copy link

kasperl commented Apr 22, 2013

Removed this from the M4 milestone.
Added this to the M5 milestone.

@kasperl
Copy link

kasperl commented May 23, 2013

Added TriageForM5 label.

@kasperl
Copy link

kasperl commented May 28, 2013

Bumping to Milestone-Later.


Removed this from the M5 milestone.
Added this to the Later milestone.
Removed TriageForM5 label.

@peter-ahe-google
Copy link
Contributor

The error that occurs is due to this JavaScript code:

    audioContext0 = new (window.AudioContext || window.webkitAudioContext)();

Which is equivalent to:

    var x = void 0;
    audioContext0 = new (x)();

This is covered by CL 11973018 which I have revived today.


Added Started label.

@peter-ahe-google
Copy link
Contributor

Fixed in r25262.


Added Fixed label.

@DartBot DartBot added this to the Later milestone Aug 31, 2013
copybara-service bot pushed a commit that referenced this issue Jan 27, 2022
Changes:
```
> git log --format="%C(auto) %h %s" dcb6aba..8f5ab7b
 https://dart.googlesource.com/pub.git/+/8f5ab7b1 Avoid raceconditions in `global activate`, `run` and `global run` (#3285)
 https://dart.googlesource.com/pub.git/+/6e03ec02 Support multiple packages in 'dart pub add' (#3283)
 https://dart.googlesource.com/pub.git/+/1a298f4d Fix --verbose doc, and accept verboseness setting from embedder (#3279)
 https://dart.googlesource.com/pub.git/+/5bda798c Avoid race condition for hosted source on package extraction (#3277)
 https://dart.googlesource.com/pub.git/+/17c5addb Error on acquireDependencies when the root pubspec has an unknown sdk in the environment. (#3271)
 https://dart.googlesource.com/pub.git/+/0a32ae4a folder/* should not ignore the folder itself, only the contents (#3267)
 https://dart.googlesource.com/pub.git/+/44b785aa Normalize file names for tar.gz (#3268)
 https://dart.googlesource.com/pub.git/+/2fd6b5f0 Fix repository specification: isRetracted -> retracted (#3249)
 https://dart.googlesource.com/pub.git/+/0fc71db4 Write log trace to $PUB_CACHE/log/pub_log.txt when crashing (#3240)

```

Diff: https://dart.googlesource.com/pub.git/+/dcb6abac2d7d43258c03b348be42bf4aab9529b1~..8f5ab7b1aba3b9f66b56246d77e167990339d317/
Change-Id: I54f1fde0f50ca19ca036bb1e6d9b166455031183
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229542
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
copybara-service bot pushed a commit that referenced this issue Nov 3, 2022
…t, test_process, webdev

Revisions updated by `dart tools/rev_sdk_deps.dart`.

browser_launcher (https://github.com/dart-lang/browser_launcher/compare/981ca88..5fa0bd6):
  5fa0bd6  2022-11-01  Kevin Moore  Update lints, require Dart 2.17, add dependabot (#34)

dartdoc (https://github.com/dart-lang/dartdoc/compare/3273437..179ada0):
  179ada02  2022-11-02  Sam Rawlins  Change _HashableChildLibraryElementVisitor to be a RecursiveElementVisitor (#3242)
  a6e7d908  2022-11-02  Sam Rawlins  Make Inheritable.isOverride late final non-nullable (#3235)
  c4f52cf9  2022-11-02  Sam Rawlins  Test records support in typedefs (#3239)
  f74e129f  2022-11-02  Sam Rawlins  Make Accessor.documentationComment late final non-nullable (#3240)
  ad50bfbc  2022-10-31  dependabot[bot]  Bump github/codeql-action from 2.1.28 to 2.1.29 (#3238)

http (https://github.com/dart-lang/http/compare/738a55b..6339026):
  6339026  2022-11-02  Brian Quinlan  Make timeout and cache controllable per-request. (#815)
  51dbca2  2022-10-31  Brian Quinlan  Add a streaming request example. (#813)

mime (https://github.com/dart-lang/mime/compare/bf041aa..d80f4d0):
  d80f4d0  2022-11-02  Liu YuanYuan  Add .avif to extension map (#70)
  3a6b14e  2022-11-01  dependabot[bot]  Bump actions/checkout from 3.0.2 to 3.1.0 (#72)

string_scanner (https://github.com/dart-lang/string_scanner/compare/10435a4..4a5cbc5):
  4a5cbc5  2022-10-31  Kevin Moore  Make code in readme consistent with example (#49)

test (https://github.com/dart-lang/test/compare/b82fc0b..173a36f):
  173a36f2  2022-11-01  Jacob MacDonald  prep packages to publish (#1780)
  fd8e2b68  2022-10-31  Devon Carew  fix an issue with the github reporter (#1779)

test_process (https://github.com/dart-lang/test_process/compare/068f9f8..1774aa7):
  1774aa7  2022-11-01  dependabot[bot]  Bump actions/checkout from 3.0.2 to 3.1.0 (#36)

webdev (https://github.com/dart-lang/webdev/compare/c350055..069b870):
  069b870  2022-11-01  Elliott Brooks (she/her)  Prepare webdev for release to v.2.7.12 (#1775)
  cb06447  2022-11-01  Elliott Brooks (she/her)  Prep DWDS for release (#1774)
  daa154d  2022-11-01  Elliott Brooks (she/her)  Reset MV3 extension to nice starting point (#1773)
  98a6142  2022-11-01  Jakub Vrána  Remove // ignore: unsafe_html. (#1759)
  939e285  2022-10-31  Elliott Brooks (she/her)  Update documentation for Webdev release process (#1771)
  0428ffb  2022-10-31  Elliott Brooks (she/her)  Update package:file to latest version (#1770)

Change-Id: I5020d718f6c009bca4f9b5e69232dc425b9d3409
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267761
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants