-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore: rework disposers into a frame task #1413
Conversation
73c57ba
to
e933204
Compare
@@ -897,7 +897,6 @@ module.exports.describe = function({testRunner, expect, playwright, MAC, WIN, FF | |||
await page.$eval('iframe', frame => frame.remove()); | |||
const error = await navigationPromise; | |||
expect(error.message).toContain('frame was detached'); | |||
expect(error.stack).toContain('Frame.goto') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was very important for debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at the stacks without it and it does look very straightforward. Could you give an example that was good and is now puzzling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not as bad as it once was, because the async stack traces help us at least get the client code that called this. But lacking the playwright method you called in the stack trace is not great.
this.done(); | ||
if (this._url) | ||
error.message = error.message + ` while navigating to ${this._url}`; | ||
throw error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never throw someone else's error to avoid hiding your stack trace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not avoiding, but I don't think stack matters much here. I don't want to instanceof TimeoutError and rewrite its message - that sounds lame...
|
||
if (!error) | ||
return result!; | ||
this.done(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling done() at the right time is a bit tricky. Returning error was easier in that regard.
Seems like a marginal improvement. If we were to somehow simplify |
No description provided.