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

Log current state and element with error report during broken layout flow #29088

Merged
merged 1 commit into from
Jun 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/service/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,9 +897,12 @@ export class Resource {

if (this.state_ != ResourceState.LAYOUT_SCHEDULED) {
const err = dev().createError(
'startLayout called but not LAYOUT_SCHEDULED'
'startLayout called but not LAYOUT_SCHEDULED',
'currently: ',
this.state_
);
reportError(err, this.element);
err.associatedElement = this.element;
reportError(err);
return Promise.reject(err);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you confident keeping this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The worse case is that the element is deferred to a second pass. But as soon as it goes through the flow correctly, it will do layout.

}

Expand Down