| Index: third_party/WebKit/Source/devtools/front_end/sdk/Script.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/Script.js b/third_party/WebKit/Source/devtools/front_end/sdk/Script.js
|
| index 1a019d4efdebdb10264408ba2df824e8c6af1a1e..3a1033d565ea8849b5c91a8a58bf10371ea962e9 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/Script.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/Script.js
|
| @@ -30,6 +30,7 @@
|
| SDK.Script = class {
|
| /**
|
| * @param {!SDK.DebuggerModel} debuggerModel
|
| + * @param {!Protocol.DebuggerAgent} debuggerAgent
|
| * @param {string} scriptId
|
| * @param {string} sourceURL
|
| * @param {number} startLine
|
| @@ -45,9 +46,10 @@ SDK.Script = class {
|
| * @param {number} length
|
| */
|
| constructor(
|
| - debuggerModel, scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash,
|
| - isContentScript, isLiveEdit, sourceMapURL, hasSourceURL, length) {
|
| + debuggerModel, debuggerAgent, scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId,
|
| + hash, isContentScript, isLiveEdit, sourceMapURL, hasSourceURL, length) {
|
| this.debuggerModel = debuggerModel;
|
| + this._debuggerAgent = debuggerAgent;
|
| this.scriptId = scriptId;
|
| this.sourceURL = sourceURL;
|
| this.lineOffset = startLine;
|
| @@ -135,7 +137,7 @@ SDK.Script = class {
|
|
|
| var callback;
|
| var promise = new Promise(fulfill => callback = fulfill);
|
| - this.debuggerModel.target().debuggerAgent().getScriptSource(this.scriptId, didGetScriptSource.bind(this));
|
| + this._debuggerAgent.getScriptSource(this.scriptId, didGetScriptSource.bind(this));
|
| return promise;
|
|
|
| /**
|
| @@ -192,8 +194,7 @@ SDK.Script = class {
|
|
|
| if (this.scriptId) {
|
| // Script failed to parse.
|
| - this.debuggerModel.target().debuggerAgent().searchInContent(
|
| - this.scriptId, query, caseSensitive, isRegex, innerCallback);
|
| + this._debuggerAgent.searchInContent(this.scriptId, query, caseSensitive, isRegex, innerCallback);
|
| } else {
|
| callback([]);
|
| }
|
| @@ -235,8 +236,8 @@ SDK.Script = class {
|
|
|
| if (this.scriptId) {
|
| this.requestContent().then(
|
| - () => this.debuggerModel.target().debuggerAgent().setScriptSource(
|
| - this.scriptId, newSource, undefined, didEditScriptSource.bind(this)));
|
| + () =>
|
| + this._debuggerAgent.setScriptSource(this.scriptId, newSource, undefined, didEditScriptSource.bind(this)));
|
| } else {
|
| callback('Script failed to parse');
|
| }
|
| @@ -286,7 +287,7 @@ SDK.Script = class {
|
| * @this {SDK.Script}
|
| */
|
| function setBlackboxedRanges(fulfill, reject) {
|
| - this.debuggerModel.target().debuggerAgent().setBlackboxedRanges(this.scriptId, positions, callback);
|
| + this._debuggerAgent.setBlackboxedRanges(this.scriptId, positions, callback);
|
| /**
|
| * @param {?Protocol.Error} error
|
| */
|
|
|