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 d075140b18c9509eac3c3e2ab9cb9f17848e75a9..a4d8d8884f6fbc52c5bc45b74b239de1e48dc3a7 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/Script.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/Script.js |
| @@ -61,7 +61,7 @@ WebInspector.Script = function(debuggerModel, scriptId, sourceURL, startLine, st |
| WebInspector.Script.Events = { |
| ScriptEdited: "ScriptEdited", |
| - SourceMapURLAdded: "SourceMapURLAdded", |
| + SourceMapURLAdded: "SourceMapURLAdded" |
| } |
| WebInspector.Script.sourceURLRegex = /^[\040\t]*\/\/# sourceURL=\s*(\S*?)\s*$/m; |
| @@ -291,10 +291,30 @@ WebInspector.Script.prototype = { |
| /** |
| * @param {!Array<!DebuggerAgent.ScriptPosition>} positions |
| + * @return {!Promise<?Array<!DebuggerAgent.ScriptPosition>>} |
|
dgozman
2016/02/17 01:34:44
!Promise<boolean>
kozy
2016/02/17 03:40:43
Done.
|
| */ |
| setBlackboxedRanges: function(positions) |
| { |
| - this.target().debuggerAgent().setBlackboxedRanges(this.scriptId, positions); |
| + return new Promise(setBlackboxedRanges.bind(this)); |
| + |
| + /** |
| + * @param {function(?)} fulfill |
| + * @param {function(*)} reject |
| + * @this {WebInspector.Script} |
| + */ |
| + function setBlackboxedRanges(fulfill, reject) |
| + { |
| + this.target().debuggerAgent().setBlackboxedRanges(this.scriptId, positions, callback); |
| + /** |
| + * @param {?Protocol.Error} error |
| + */ |
| + function callback(error) |
| + { |
| + if (error) |
| + console.error(error); |
| + fulfill(error ? null : positions); |
| + } |
| + } |
| }, |
| __proto__: WebInspector.SDKObject.prototype |