Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/SourceMapManager.js

Issue 2801943003: [DevTools] Remove SDK.SDKObject (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sdk/SourceMapManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/SourceMapManager.js b/third_party/WebKit/Source/devtools/front_end/sdk/SourceMapManager.js
index 5a29b7e15b752df189a19294a44cfba4587526f2..c41b50d2ca7e6273fb98beee75b13dc295292f45 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/SourceMapManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/SourceMapManager.js
@@ -5,13 +5,14 @@
/**
* @template T
*/
-SDK.SourceMapManager = class extends SDK.SDKObject {
+SDK.SourceMapManager = class extends Common.Object {
/**
* @param {!SDK.Target} target
*/
constructor(target) {
- super(target);
+ super();
+ this._target = target;
this._isEnabled = true;
/** @type {!Map<!T, string>} */
@@ -51,7 +52,7 @@ SDK.SourceMapManager = class extends SDK.SDKObject {
* @param {!Common.Event} event
*/
_inspectedURLChanged(event) {
- if (event.data !== this.target())
+ if (event.data !== this._target)
return;
var clients = Array.from(this._resolvedSourceMapURL.keys());
@@ -105,7 +106,7 @@ SDK.SourceMapManager = class extends SDK.SDKObject {
_resolveRelativeURLs(sourceURL, sourceMapURL) {
// |sourceURL| can be a random string, but is generally an absolute path.
// Complete it to inspected page url for relative links.
- var resolvedSourceURL = Common.ParsedURL.completeURL(this.target().inspectedURL(), sourceURL);
+ var resolvedSourceURL = Common.ParsedURL.completeURL(this._target.inspectedURL(), sourceURL);
var resolvedSourceMapURL = resolvedSourceURL ? Common.ParsedURL.completeURL(resolvedSourceURL, sourceMapURL) : null;
return {sourceURL: resolvedSourceURL, sourceMapURL: resolvedSourceMapURL};
}
@@ -157,7 +158,7 @@ SDK.SourceMapManager = class extends SDK.SDKObject {
if (!factoryExtension)
return Promise.resolve(/** @type {?SDK.SourceMap} */ (sourceMap));
return factoryExtension.instance()
- .then(factory => factory.editableSourceMap(this.target(), sourceMap))
+ .then(factory => factory.editableSourceMap(this._target, sourceMap))
.then(map => map || sourceMap)
.catchException(/** @type {?SDK.SourceMap} */ (null));
}

Powered by Google App Engine
This is Rietveld 408576698