Bug 1523943 - Cache SourceActor.url. r=jlast

Depends on D18244

Differential Revision: https://phabricator.services.mozilla.com/D18245

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexandre Poirot 2019-01-31 18:30:17 +00:00
Родитель b44981a1ea
Коммит a1caccaabe
2 изменённых файлов: 8 добавлений и 7 удалений

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

@ -148,9 +148,7 @@ GeneratedLocation.prototype = {
},
get generatedUrl() {
const actor = this.generatedSourceActor;
const source = actor.source;
return source ? source.url : actor._originalUrl;
return this.generatedSourceActor.url;
},
get generatedLine() {

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

@ -107,7 +107,7 @@ const SourceActor = ActorClassWithSpec(sourceSpec, {
initialize: function({ source, thread, originalUrl,
isInlineSource, contentType }) {
this._threadActor = thread;
this._originalUrl = originalUrl;
this._url = originalUrl;
this._source = source;
this._contentType = contentType;
this._isInlineSource = isInlineSource;
@ -138,10 +138,13 @@ const SourceActor = ActorClassWithSpec(sourceSpec, {
return this.threadActor.breakpointActorMap;
},
get url() {
if (this.source) {
return getSourceURL(this.source, this.threadActor._parent.window);
if (this._url) {
return this._url;
}
return this._originalUrl;
if (this.source) {
this._url = getSourceURL(this.source, this.threadActor._parent.window);
}
return this._url;
},
get isCacheEnabled() {