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..ca5b8738ccb0e2ef58ce8cd36a59ea98047e8f77 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<undefined>} |
| */ |
| 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) |
| + reject(error); |
|
dgozman
2016/02/09 23:44:51
console.error(error)
kozy
2016/02/10 01:19:42
Done.
|
| + fulfill(error); |
|
dgozman
2016/02/09 23:44:51
fullfill();
kozy
2016/02/10 01:19:41
Done.
|
| + } |
| + } |
| }, |
| __proto__: WebInspector.SDKObject.prototype |