Chromium Code Reviews| 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 540c494c407083530ffa7dbf845b27852de2dcaa..ad7e5d2ecff2bdcc3a6ba87581740e7d287b9c47 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/Script.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/Script.js |
| @@ -35,14 +35,14 @@ |
| * @param {number} endLine |
| * @param {number} endColumn |
| * @param {!RuntimeAgent.ExecutionContextId} executionContextId |
| - * @param {string} hash |
| * @param {boolean} isContentScript |
| * @param {boolean} isInternalScript |
| * @param {boolean} isLiveEdit |
| + * @param {string=} hash |
| * @param {string=} sourceMapURL |
| * @param {boolean=} hasSourceURL |
| */ |
| -WebInspector.Script = function(debuggerModel, scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash, isContentScript, isInternalScript, isLiveEdit, sourceMapURL, hasSourceURL) |
| +WebInspector.Script = function(debuggerModel, scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, isContentScript, isInternalScript, isLiveEdit, hash, sourceMapURL, hasSourceURL) |
| { |
| WebInspector.SDKObject.call(this, debuggerModel.target()); |
| this.debuggerModel = debuggerModel; |
| @@ -53,10 +53,10 @@ WebInspector.Script = function(debuggerModel, scriptId, sourceURL, startLine, st |
| this.endLine = endLine; |
| this.endColumn = endColumn; |
| this._executionContextId = executionContextId; |
| - this.hash = hash; |
| this._isContentScript = isContentScript; |
| this._isInternalScript = isInternalScript; |
| this._isLiveEdit = isLiveEdit; |
| + this._hash = hash; |
| this.sourceMapURL = sourceMapURL; |
| this.hasSourceURL = hasSourceURL; |
| } |
| @@ -298,18 +298,20 @@ WebInspector.Script.prototype = { |
| * @param {!Array<!DebuggerAgent.ScriptPosition>} positions |
| * @return {!Promise<boolean>} |
| */ |
| - setBlackboxedRanges: function(positions) |
| + addBlackboxPattern: function(positions) |
| { |
| - return new Promise(setBlackboxedRanges.bind(this)); |
| + return new Promise(addBlackboxPattern.bind(this)); |
| /** |
| * @param {function(?)} fulfill |
| * @param {function(*)} reject |
| * @this {WebInspector.Script} |
| */ |
| - function setBlackboxedRanges(fulfill, reject) |
| + function addBlackboxPattern(fulfill, reject) |
| { |
| - this.target().debuggerAgent().setBlackboxedRanges(this.scriptId, positions, callback); |
| + var pattern = this.hasSourceURL ? { url: this.sourceURL } : { hash: this._hash }; |
|
dgozman
2016/03/08 18:48:12
hasSourceURL is suspicious
|
| + pattern.positions = positions; |
| + this.target().debuggerAgent().addBlackboxPatterns([pattern], callback); |
| /** |
| * @param {?Protocol.Error} error |
| */ |