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

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

Issue 1754483002: [DevTools] Added setBlackboxPatterns method to protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@provide-hash-for-anonymous-scripts
Patch Set: Created 4 years, 9 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 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
*/

Powered by Google App Engine
This is Rietveld 408576698