Bug 1396071 - check if SourceMapURLService has been destroyed after async call;r=tromey

MozReview-Commit-ID: KsKtgvC9LXt

--HG--
extra : rebase_source : 343f25d553fccb077952db835ddf8fbc25a3c91a
This commit is contained in:
Julian Descottes 2017-09-02 00:59:46 +02:00
Родитель 46edacd44f
Коммит 95fd656ac8
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -73,6 +73,11 @@ SourceMapURLService.prototype.destroy = function () {
* A helper function that is called when a new source is available.
*/
SourceMapURLService.prototype._onSourceUpdated = function (_, sourceEvent) {
// Maybe we were shut down while waiting.
if (!this._urls) {
return;
}
let { source } = sourceEvent;
let { generatedUrl, url, actor: id, sourceMapURL } = source;