Commit 2ba8a239 authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[DevTools] simplify script with source map blackboxing

Current logic produces one Debugger.setBlackboxedRanges call on each
scriptParsed event. It makes our frontend too much chatty.
This CL simplify blackbox manager. With new logic blackbox manager
sends Debugger.setBlackboxedRanges iff script has sourceMap and at
least one sourceURL from sourceMap is blackboxed.
When blackbox pattern changed frontend will send setBlackboxedRanges
iff ranges are affected by change.

R=lushnikov@chromium.org

Change-Id: I8b9511f9feba50127de4add98c8d191877103145
Reviewed-on: https://chromium-review.googlesource.com/1162308
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: default avatarAndrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580742}
parent d090b403
......@@ -244,16 +244,6 @@ Bindings.CompilerScriptMapping = class {
return this._sourceMapManager.sourceMapForClient(script);
}
/**
* @param {!SDK.Script} script
*/
maybeLoadSourceMap(script) {
const sourceMap = this._sourceMapManager.sourceMapForClient(script);
if (!sourceMap)
return;
this._populateSourceMapSources(script, sourceMap);
}
/**
* @param {?SDK.SourceMap} sourceMap
*/
......
......@@ -254,10 +254,7 @@ SDK.Script = class {
async setBlackboxedRanges(positions) {
const response = await this.debuggerModel.target().debuggerAgent().invoke_setBlackboxedRanges(
{scriptId: this.scriptId, positions});
const error = response[Protocol.Error];
if (error)
console.error(error);
return !error;
return !response[Protocol.Error];
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment