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

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

Issue 1663723002: [DevTools] Add sourceMap support for blackboxing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@call-set-blackboxed-ranges-on-script-parsed
Patch Set: Created 4 years, 10 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/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

Powered by Google App Engine
This is Rietveld 408576698