Skip to content

Commit b887cc6

Browse files
szuendDevtools-frontend LUCI CQ
authored andcommitted
[sdk] Remove source map scopes encoding/decoding code
This CL removes the now unused scopes encoding/decoding for the initial encoding scheme of the "scopes" proposal. [email protected] Bug: 368222773 Change-Id: Icce82cf0885a1a4961317c74aded959651037cf7 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6797014 Reviewed-by: Philip Pfaffe <[email protected]> Commit-Queue: Simon Zünd <[email protected]>
1 parent 46a833b commit b887cc6

File tree

7 files changed

+6
-1157
lines changed

7 files changed

+6
-1157
lines changed

config/gni/devtools_grd_files.gni

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,6 @@ grd_files_unbundled_sources = [
949949
"front_end/core/sdk/SourceMapFunctionRanges.js",
950950
"front_end/core/sdk/SourceMapManager.js",
951951
"front_end/core/sdk/SourceMapScopeChainEntry.js",
952-
"front_end/core/sdk/SourceMapScopes.js",
953952
"front_end/core/sdk/SourceMapScopesInfo.js",
954953
"front_end/core/sdk/StorageBucketsModel.js",
955954
"front_end/core/sdk/StorageKeyManager.js",

front_end/core/sdk/BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ devtools_module("sdk") {
8282
"SourceMapFunctionRanges.ts",
8383
"SourceMapManager.ts",
8484
"SourceMapScopeChainEntry.ts",
85-
"SourceMapScopes.ts",
8685
"SourceMapScopesInfo.ts",
8786
"StorageBucketsModel.ts",
8887
"StorageKeyManager.ts",
@@ -177,7 +176,6 @@ ts_library("unittests") {
177176
"SourceMapFunctionRanges.test.ts",
178177
"SourceMapManager.test.ts",
179178
"SourceMapScopeChainEntry.test.ts",
180-
"SourceMapScopes.test.ts",
181179
"SourceMapScopesInfo.test.ts",
182180
"StorageBucketsModel.test.ts",
183181
"StorageKeyManager.test.ts",

front_end/core/sdk/SourceMapFunctionRanges.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import type * as ScopesCodec from '../../third_party/source-map-scopes-codec/source-map-scopes-codec.js';
66

77
import {TokenIterator} from './SourceMap.js';
8-
import {comparePositions} from './SourceMapScopes.js';
98

109
export interface NamedFunctionRange {
1110
start: ScopesCodec.Position;
@@ -150,3 +149,8 @@ export function decodePastaRanges(encodedRanges: string, names: string[]): Named
150149

151150
return result;
152151
}
152+
153+
/** @returns 0 if both positions are equal, a negative number if a < b and a positive number if a > b */
154+
function comparePositions(a: ScopesCodec.Position, b: ScopesCodec.Position): number {
155+
return a.line - b.line || a.column - b.column;
156+
}

0 commit comments

Comments
 (0)