| Index: third_party/WebKit/Source/devtools/front_end/sources/SourceFormatter.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourceFormatter.js b/third_party/WebKit/Source/devtools/front_end/sources/SourceFormatter.js
|
| index 7912234aa46a4d6416dfd8a701cca0f5b98c9f9d..0e90ae7c73ceb67ba3725123ff36805c4b4bc7e0 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/SourceFormatter.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/SourceFormatter.js
|
| @@ -151,6 +151,10 @@ Sources.SourceFormatter = class {
|
| * @implements {Bindings.DebuggerSourceMapping}
|
| */
|
| Sources.SourceFormatter.ScriptMapping = class {
|
| + constructor() {
|
| + Bindings.debuggerWorkspaceBinding.addSourceMapping(this);
|
| + }
|
| +
|
| /**
|
| * @override
|
| * @param {!SDK.DebuggerModel.Location} rawLocation
|
| @@ -185,24 +189,6 @@ Sources.SourceFormatter.ScriptMapping = class {
|
| return scripts[0].debuggerModel.createRawLocation(scripts[0], originalLocation[0], originalLocation[1]);
|
| }
|
|
|
| - /**
|
| - * @override
|
| - * @return {boolean}
|
| - */
|
| - isIdentity() {
|
| - return false;
|
| - }
|
| -
|
| - /**
|
| - * @override
|
| - * @param {!Workspace.UISourceCode} uiSourceCode
|
| - * @param {number} lineNumber
|
| - * @return {boolean}
|
| - */
|
| - uiLineHasMapping(uiSourceCode, lineNumber) {
|
| - return true;
|
| - }
|
| -
|
| /**
|
| * @param {!Sources.SourceFormatData} formatData
|
| * @param {boolean} enabled
|
| @@ -212,19 +198,14 @@ Sources.SourceFormatter.ScriptMapping = class {
|
| if (!scripts.length)
|
| return;
|
| if (enabled) {
|
| - for (var script of scripts) {
|
| + for (var script of scripts)
|
| script[Sources.SourceFormatData._formatDataSymbol] = formatData;
|
| - Bindings.debuggerWorkspaceBinding.pushSourceMapping(script, this);
|
| - }
|
| } else {
|
| - for (var script of scripts) {
|
| + for (var script of scripts)
|
| delete script[Sources.SourceFormatData._formatDataSymbol];
|
| - Bindings.debuggerWorkspaceBinding.popSourceMapping(script);
|
| - }
|
| }
|
| -
|
| - Bindings.debuggerWorkspaceBinding.setSourceMapping(
|
| - scripts[0].debuggerModel, formatData.formattedSourceCode, enabled ? this : null);
|
| + for (var script of scripts)
|
| + Bindings.debuggerWorkspaceBinding.updateLocations(script);
|
| }
|
|
|
| /**
|
|
|