зеркало из 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() {
|
get generatedUrl() {
|
||||||
const actor = this.generatedSourceActor;
|
return this.generatedSourceActor.url;
|
||||||
const source = actor.source;
|
|
||||||
return source ? source.url : actor._originalUrl;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
get generatedLine() {
|
get generatedLine() {
|
||||||
|
|
|
@ -107,7 +107,7 @@ const SourceActor = ActorClassWithSpec(sourceSpec, {
|
||||||
initialize: function({ source, thread, originalUrl,
|
initialize: function({ source, thread, originalUrl,
|
||||||
isInlineSource, contentType }) {
|
isInlineSource, contentType }) {
|
||||||
this._threadActor = thread;
|
this._threadActor = thread;
|
||||||
this._originalUrl = originalUrl;
|
this._url = originalUrl;
|
||||||
this._source = source;
|
this._source = source;
|
||||||
this._contentType = contentType;
|
this._contentType = contentType;
|
||||||
this._isInlineSource = isInlineSource;
|
this._isInlineSource = isInlineSource;
|
||||||
|
@ -138,10 +138,13 @@ const SourceActor = ActorClassWithSpec(sourceSpec, {
|
||||||
return this.threadActor.breakpointActorMap;
|
return this.threadActor.breakpointActorMap;
|
||||||
},
|
},
|
||||||
get url() {
|
get url() {
|
||||||
if (this.source) {
|
if (this._url) {
|
||||||
return getSourceURL(this.source, this.threadActor._parent.window);
|
return this._url;
|
||||||
}
|
}
|
||||||
return this._originalUrl;
|
if (this.source) {
|
||||||
|
this._url = getSourceURL(this.source, this.threadActor._parent.window);
|
||||||
|
}
|
||||||
|
return this._url;
|
||||||
},
|
},
|
||||||
|
|
||||||
get isCacheEnabled() {
|
get isCacheEnabled() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче