-
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
Corrupt exception object #470
Comments
I just hit this again. The bug makes it difficult to generate succinct test cases for other problems. |
Added Area-Frog label. |
This comment was originally written by [email protected] Moving this to high priority to reflect Stephen's comment that this is blocking other work. I propose that we start using these priorities in this way when filing bugs as well to help identify those that need to be addressed sooner. Removed Priority-Medium label. |
Added Started label. |
Added Fixed label. |
Not sure if this entirely handles #470, but it does fix the breaking example. [email protected] Review URL: https://codereview.chromium.org/1754773002 .
I expect the attached program to run without assertion with --enable_type_checks
Something throws an exception, but the exception's toString method throws a secondary exception. It appears that code is missing from the NoSuchMethodException constructor - there is no _arguments property.
function $toDartException(e) {
...
} else {
// TODO(jmesserly): can this ever happen?
res = new NoSuchMethodException('', e.arguments[0], []);
...
}
// ********** Code for NoSuchMethodException **************
function NoSuchMethodException() {}
NoSuchMethodException.prototype.toString = function() {
var sb = new StringBufferImpl("");
for (var i = 0;
i < this._arguments.length; i++) {
if (i > 0) {
sb.add(", ");
}
sb.add(this._arguments.$index(i));
}
sb.add("]");
return ("NoSuchMethodException - receiver: '" + this._receiver + "' ") + ("function name: '" + this._functionName + "' arguments: [" + sb + "]");
}
Attachment:
check1c.dart (545 Bytes)
The text was updated successfully, but these errors were encountered: