зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1570476 - Don't fetch the request stacktrace in StackTracePanel's componentWillReceiveProps if the request won't change. r=Honza.
This was causing an intermittent in console test because multiple requests were sent to the server, and sometimes, some of them after the connection being closed, which was making the test fail. With this patch, we only try to fetch a new stacktrace on componenetWillReceiveProps if the component will have to deal with a new request. Differential Revision: https://phabricator.services.mozilla.com/D45808 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
90cc5901b8
Коммит
2f8760ac4b
|
@ -48,6 +48,10 @@ class StackTracePanel extends Component {
|
|||
*/
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const { request, connector } = nextProps;
|
||||
// If we're not dealing with a new request, bail out.
|
||||
if (this.props.request && this.props.request.actor === request.actor) {
|
||||
return;
|
||||
}
|
||||
fetchNetworkUpdatePacket(connector.requestData, request, ["stackTrace"]);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче