зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
b44981a1ea
Коммит
a1caccaabe
|
@ -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() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче