-
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
dart2js errors have stack traces that don't remain identical over time. #15171
Comments
Nathan, Try this patch: diff --git a/dart/sdk/lib/_internal/lib/js_helper.dart b/dart/sdk/lib/_internal/lib/js_helper.dart --- a/dart/sdk/lib/_internal/lib/js_helper.dart
I'm at home without VPN right now, but I'll try to get this submitted tomorrow. Cheers, Set owner to @peter-ahe-google. |
That works great, thanks! |
I'd like to cast a vote in support of getting this CL in! |
What's the priority? |
I'd certainly like to see this patch land, but it's not blocking me personally since I don't do any debugging in the browser. |
The CL https://codereview.chromium.org/78343002 has met surprising resistance from the VM team. So I'm stuck. |
Peter, you mention on the code review that the language team would discuss to come to a decision. Do we know if they did? |
The objection to CL 78343002 seems to be that this isn't a guarantee we want to offer, but this guarantee is crucial to making stack chain tracking work. I contend that breaking stack chains is an unacceptable usability regression, so we should commit to guaranteeing identity equality of stack traces. |
I agree with Nathan. Emily: I not sure those meetings exist anymore. |
@peter, yes, but I'm curious if it was actually discussed back when they did. |
I don't think it was ever discussed. I don't recall seeing anything about it in Bob's minutes. |
Marked this as being blocked by #18394. |
I hope that we will agree on guaranteeing that the stacktraces are identical (I just pinged issue #18394 to follow up on that). Regardless of that discussion, I'd like to push forward the change Peter proposed earlier. Doing so will make it easier for people to debug async stack traces, and it will make the dart2js consistent with the current VM behavior. If and when we decide that we don't want those guarantees and the VM needs to change the behavior in the future, we can revisit this at that point. cc @peter-ahe-google. |
just sent out https://codereview.chromium.org/1152023004/ |
Looks like the new language in the spec actually now requires that rethrow gives you the same stack trace object (see discussion in issue #18394), so we should be good to go. |
Forgot to close this - this was fixed in 1763aa3 |
Now that dart-lang/sdk#15171 is fixed, this works! [email protected] Review URL: https://codereview.chromium.org//1218903003.
Consider the following code:
var st1;
try {
try {
throw 'bad';
} catch (e, st) {
st1 = st;
rethrow;
}
} catch (e, st2) {
print(st1 == st2);
print(identical(st1, st2));
}
On the VM, this prints "true" and "true", but on dart2js it prints "false" and "false". This makes it difficult to compare stack traces for equality and impossible to use them in expandos, which is blocking my work on issue #7040 on dart2js.
The text was updated successfully, but these errors were encountered: