devtools-tracing 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +14 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +28854 -0
- package/package.json +10 -8
- package/generate.ts +0 -649
- package/index.ts +0 -17
- package/lib/extension-api/ExtensionAPI.d.ts +0 -357
- package/lib/front_end/core/common/App.ts +0 -7
- package/lib/front_end/core/common/AppProvider.ts +0 -32
- package/lib/front_end/core/common/Base64.ts +0 -47
- package/lib/front_end/core/common/CharacterIdMap.ts +0 -30
- package/lib/front_end/core/common/Color.ts +0 -2506
- package/lib/front_end/core/common/ColorConverter.ts +0 -402
- package/lib/front_end/core/common/ColorUtils.ts +0 -252
- package/lib/front_end/core/common/Console.ts +0 -114
- package/lib/front_end/core/common/Debouncer.ts +0 -15
- package/lib/front_end/core/common/EventTarget.ts +0 -52
- package/lib/front_end/core/common/Gzip.ts +0 -74
- package/lib/front_end/core/common/JavaScriptMetaData.ts +0 -29
- package/lib/front_end/core/common/Lazy.ts +0 -31
- package/lib/front_end/core/common/Linkifier.ts +0 -55
- package/lib/front_end/core/common/MapWithDefault.ts +0 -26
- package/lib/front_end/core/common/Mutex.ts +0 -55
- package/lib/front_end/core/common/Object.ts +0 -145
- package/lib/front_end/core/common/ParsedURL.ts +0 -554
- package/lib/front_end/core/common/Progress.ts +0 -180
- package/lib/front_end/core/common/QueryParamHandler.ts +0 -7
- package/lib/front_end/core/common/ResolverBase.ts +0 -85
- package/lib/front_end/core/common/ResourceType.ts +0 -588
- package/lib/front_end/core/common/ReturnToPanel.ts +0 -17
- package/lib/front_end/core/common/Revealer.ts +0 -192
- package/lib/front_end/core/common/Runnable.ts +0 -41
- package/lib/front_end/core/common/SegmentedRange.ts +0 -87
- package/lib/front_end/core/common/SettingRegistration.ts +0 -339
- package/lib/front_end/core/common/Settings.ts +0 -1497
- package/lib/front_end/core/common/SimpleHistoryManager.ts +0 -124
- package/lib/front_end/core/common/StringOutputStream.ts +0 -26
- package/lib/front_end/core/common/TextDictionary.ts +0 -48
- package/lib/front_end/core/common/Throttler.ts +0 -99
- package/lib/front_end/core/common/Trie.ts +0 -152
- package/lib/front_end/core/common/Worker.ts +0 -60
- package/lib/front_end/core/common/common.ts +0 -81
- package/lib/front_end/core/host/AidaClient.ts +0 -733
- package/lib/front_end/core/host/GdpClient.ts +0 -316
- package/lib/front_end/core/host/InspectorFrontendHost.ts +0 -648
- package/lib/front_end/core/host/InspectorFrontendHostAPI.ts +0 -551
- package/lib/front_end/core/host/Platform.ts +0 -76
- package/lib/front_end/core/host/ResourceLoader.ts +0 -282
- package/lib/front_end/core/host/UserMetrics.ts +0 -1230
- package/lib/front_end/core/host/host.ts +0 -23
- package/lib/front_end/core/i18n/ByteUtilities.ts +0 -82
- package/lib/front_end/core/i18n/DevToolsLocale.ts +0 -87
- package/lib/front_end/core/i18n/NumberFormatter.ts +0 -82
- package/lib/front_end/core/i18n/i18n.ts +0 -17
- package/lib/front_end/core/i18n/i18nImpl.ts +0 -204
- package/lib/front_end/core/i18n/i18nTypes.ts +0 -10
- package/lib/front_end/core/i18n/locales.js +0 -14
- package/lib/front_end/core/i18n/time-utilities.ts +0 -174
- package/lib/front_end/core/platform/ArrayUtilities.ts +0 -271
- package/lib/front_end/core/platform/Brand.ts +0 -23
- package/lib/front_end/core/platform/Constructor.ts +0 -10
- package/lib/front_end/core/platform/DOMUtilities.ts +0 -138
- package/lib/front_end/core/platform/DateUtilities.ts +0 -15
- package/lib/front_end/core/platform/DevToolsPath.ts +0 -53
- package/lib/front_end/core/platform/KeyboardUtilities.ts +0 -38
- package/lib/front_end/core/platform/MapUtilities.ts +0 -95
- package/lib/front_end/core/platform/MimeType.ts +0 -175
- package/lib/front_end/core/platform/NumberUtilities.ts +0 -80
- package/lib/front_end/core/platform/StringUtilities.ts +0 -588
- package/lib/front_end/core/platform/Timing.ts +0 -17
- package/lib/front_end/core/platform/TypedArrayUtilities.ts +0 -189
- package/lib/front_end/core/platform/TypescriptUtilities.ts +0 -86
- package/lib/front_end/core/platform/UIString.ts +0 -39
- package/lib/front_end/core/platform/UserVisibleError.ts +0 -28
- package/lib/front_end/core/platform/platform.ts +0 -45
- package/lib/front_end/core/protocol_client/ConnectionTransport.ts +0 -26
- package/lib/front_end/core/protocol_client/InspectorBackend.ts +0 -1050
- package/lib/front_end/core/protocol_client/NodeURL.ts +0 -42
- package/lib/front_end/core/protocol_client/protocol_client.ts +0 -13
- package/lib/front_end/core/root/Runtime.ts +0 -609
- package/lib/front_end/core/root/root.ts +0 -6
- package/lib/front_end/core/sdk/AccessibilityModel.ts +0 -353
- package/lib/front_end/core/sdk/AnimationModel.ts +0 -1041
- package/lib/front_end/core/sdk/AutofillModel.ts +0 -184
- package/lib/front_end/core/sdk/CPUProfilerModel.ts +0 -148
- package/lib/front_end/core/sdk/CPUThrottlingManager.ts +0 -282
- package/lib/front_end/core/sdk/CSSContainerQuery.ts +0 -139
- package/lib/front_end/core/sdk/CSSFontFace.ts +0 -40
- package/lib/front_end/core/sdk/CSSLayer.ts +0 -30
- package/lib/front_end/core/sdk/CSSMatchedStyles.ts +0 -1646
- package/lib/front_end/core/sdk/CSSMedia.ts +0 -121
- package/lib/front_end/core/sdk/CSSMetadata.ts +0 -1647
- package/lib/front_end/core/sdk/CSSModel.ts +0 -1128
- package/lib/front_end/core/sdk/CSSProperty.ts +0 -384
- package/lib/front_end/core/sdk/CSSPropertyParser.ts +0 -681
- package/lib/front_end/core/sdk/CSSPropertyParserMatchers.ts +0 -1395
- package/lib/front_end/core/sdk/CSSQuery.ts +0 -72
- package/lib/front_end/core/sdk/CSSRule.ts +0 -465
- package/lib/front_end/core/sdk/CSSScope.ts +0 -30
- package/lib/front_end/core/sdk/CSSStartingStyle.ts +0 -29
- package/lib/front_end/core/sdk/CSSStyleDeclaration.ts +0 -313
- package/lib/front_end/core/sdk/CSSStyleSheetHeader.ts +0 -196
- package/lib/front_end/core/sdk/CSSSupports.ts +0 -33
- package/lib/front_end/core/sdk/CategorizedBreakpoint.ts +0 -64
- package/lib/front_end/core/sdk/ChildTargetManager.ts +0 -314
- package/lib/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +0 -62
- package/lib/front_end/core/sdk/Connections.ts +0 -293
- package/lib/front_end/core/sdk/ConsoleModel.ts +0 -808
- package/lib/front_end/core/sdk/ConsoleModelTypes.ts +0 -15
- package/lib/front_end/core/sdk/Cookie.ts +0 -319
- package/lib/front_end/core/sdk/CookieModel.ts +0 -239
- package/lib/front_end/core/sdk/CookieParser.ts +0 -185
- package/lib/front_end/core/sdk/DOMDebuggerModel.ts +0 -787
- package/lib/front_end/core/sdk/DOMModel.ts +0 -1961
- package/lib/front_end/core/sdk/DebuggerModel.ts +0 -1605
- package/lib/front_end/core/sdk/EmulationModel.ts +0 -648
- package/lib/front_end/core/sdk/EnhancedTracesParser.ts +0 -515
- package/lib/front_end/core/sdk/EventBreakpointsModel.ts +0 -183
- package/lib/front_end/core/sdk/FrameAssociated.ts +0 -11
- package/lib/front_end/core/sdk/FrameManager.ts +0 -259
- package/lib/front_end/core/sdk/HeapProfilerModel.ts +0 -225
- package/lib/front_end/core/sdk/HttpReasonPhraseStrings.ts +0 -77
- package/lib/front_end/core/sdk/IOModel.ts +0 -91
- package/lib/front_end/core/sdk/IsolateManager.ts +0 -257
- package/lib/front_end/core/sdk/IssuesModel.ts +0 -70
- package/lib/front_end/core/sdk/LayerTreeBase.ts +0 -169
- package/lib/front_end/core/sdk/LogModel.ts +0 -56
- package/lib/front_end/core/sdk/NetworkManager.ts +0 -2823
- package/lib/front_end/core/sdk/NetworkRequest.ts +0 -2253
- package/lib/front_end/core/sdk/OverlayColorGenerator.ts +0 -52
- package/lib/front_end/core/sdk/OverlayModel.ts +0 -1011
- package/lib/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -522
- package/lib/front_end/core/sdk/PageLoad.ts +0 -35
- package/lib/front_end/core/sdk/PageResourceLoader.ts +0 -435
- package/lib/front_end/core/sdk/PaintProfiler.ts +0 -110
- package/lib/front_end/core/sdk/PerformanceMetricsModel.ts +0 -84
- package/lib/front_end/core/sdk/PreloadingModel.ts +0 -863
- package/lib/front_end/core/sdk/RehydratingConnection.ts +0 -386
- package/lib/front_end/core/sdk/RehydratingObject.ts +0 -66
- package/lib/front_end/core/sdk/RemoteObject.ts +0 -1160
- package/lib/front_end/core/sdk/Resource.ts +0 -232
- package/lib/front_end/core/sdk/ResourceTreeModel.ts +0 -1160
- package/lib/front_end/core/sdk/RuntimeModel.ts +0 -732
- package/lib/front_end/core/sdk/SDKModel.ts +0 -65
- package/lib/front_end/core/sdk/ScopeTreeCache.ts +0 -45
- package/lib/front_end/core/sdk/ScreenCaptureModel.ts +0 -255
- package/lib/front_end/core/sdk/Script.ts +0 -534
- package/lib/front_end/core/sdk/SecurityOriginManager.ts +0 -76
- package/lib/front_end/core/sdk/ServerSentEvents.ts +0 -80
- package/lib/front_end/core/sdk/ServerSentEventsProtocol.ts +0 -122
- package/lib/front_end/core/sdk/ServerTiming.ts +0 -260
- package/lib/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -377
- package/lib/front_end/core/sdk/ServiceWorkerManager.ts +0 -605
- package/lib/front_end/core/sdk/SourceMap.ts +0 -867
- package/lib/front_end/core/sdk/SourceMapCache.ts +0 -54
- package/lib/front_end/core/sdk/SourceMapFunctionRanges.ts +0 -156
- package/lib/front_end/core/sdk/SourceMapManager.ts +0 -239
- package/lib/front_end/core/sdk/SourceMapScopeChainEntry.ts +0 -189
- package/lib/front_end/core/sdk/SourceMapScopesInfo.ts +0 -508
- package/lib/front_end/core/sdk/StorageBucketsModel.ts +0 -204
- package/lib/front_end/core/sdk/StorageKeyManager.ts +0 -98
- package/lib/front_end/core/sdk/Target.ts +0 -332
- package/lib/front_end/core/sdk/TargetManager.ts +0 -453
- package/lib/front_end/core/sdk/TraceObject.ts +0 -61
- package/lib/front_end/core/sdk/WebAuthnModel.ts +0 -104
- package/lib/front_end/core/sdk/sdk.ts +0 -174
- package/lib/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -59
- package/lib/front_end/generated/InspectorBackendCommands.js +0 -1617
- package/lib/front_end/generated/SupportedCSSProperties.js +0 -7512
- package/lib/front_end/generated/protocol-proxy-api.d.ts +0 -5022
- package/lib/front_end/generated/protocol.ts +0 -22014
- package/lib/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -318
- package/lib/front_end/models/bindings/CompilerScriptMapping.ts +0 -536
- package/lib/front_end/models/bindings/ContentProviderBasedProject.ts +0 -187
- package/lib/front_end/models/bindings/DebuggerLanguagePlugins.ts +0 -1197
- package/lib/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -733
- package/lib/front_end/models/bindings/DefaultScriptMapping.ts +0 -141
- package/lib/front_end/models/bindings/FileUtils.ts +0 -228
- package/lib/front_end/models/bindings/LiveLocation.ts +0 -81
- package/lib/front_end/models/bindings/NetworkProject.ts +0 -157
- package/lib/front_end/models/bindings/PresentationConsoleMessageHelper.ts +0 -312
- package/lib/front_end/models/bindings/ResourceMapping.ts +0 -539
- package/lib/front_end/models/bindings/ResourceScriptMapping.ts +0 -491
- package/lib/front_end/models/bindings/ResourceUtils.ts +0 -103
- package/lib/front_end/models/bindings/SASSSourceMapping.ts +0 -222
- package/lib/front_end/models/bindings/StylesSourceMapping.ts +0 -316
- package/lib/front_end/models/bindings/TempFile.ts +0 -67
- package/lib/front_end/models/bindings/bindings.ts +0 -39
- package/lib/front_end/models/cpu_profile/CPUProfileDataModel.ts +0 -571
- package/lib/front_end/models/cpu_profile/ProfileTreeModel.ts +0 -103
- package/lib/front_end/models/cpu_profile/cpu_profile.ts +0 -11
- package/lib/front_end/models/formatter/FormatterWorkerPool.ts +0 -219
- package/lib/front_end/models/formatter/ScriptFormatter.ts +0 -112
- package/lib/front_end/models/formatter/formatter.ts +0 -8
- package/lib/front_end/models/source_map_scopes/NamesResolver.ts +0 -765
- package/lib/front_end/models/source_map_scopes/ScopeChainModel.ts +0 -84
- package/lib/front_end/models/source_map_scopes/source_map_scopes.ts +0 -11
- package/lib/front_end/models/stack_trace/StackTrace.ts +0 -53
- package/lib/front_end/models/stack_trace/StackTraceImpl.ts +0 -85
- package/lib/front_end/models/stack_trace/StackTraceModel.ts +0 -128
- package/lib/front_end/models/stack_trace/Trie.ts +0 -163
- package/lib/front_end/models/stack_trace/stack_trace.ts +0 -9
- package/lib/front_end/models/stack_trace/stack_trace_impl.ts +0 -13
- package/lib/front_end/models/text_utils/CodeMirrorUtils.ts +0 -37
- package/lib/front_end/models/text_utils/ContentData.ts +0 -199
- package/lib/front_end/models/text_utils/ContentProvider.ts +0 -68
- package/lib/front_end/models/text_utils/StaticContentProvider.ts +0 -49
- package/lib/front_end/models/text_utils/StreamingContentData.ts +0 -108
- package/lib/front_end/models/text_utils/Text.ts +0 -90
- package/lib/front_end/models/text_utils/TextCursor.ts +0 -44
- package/lib/front_end/models/text_utils/TextRange.ts +0 -266
- package/lib/front_end/models/text_utils/TextUtils.ts +0 -401
- package/lib/front_end/models/text_utils/WasmDisassembly.ts +0 -87
- package/lib/front_end/models/text_utils/text_utils.ts +0 -27
- package/lib/front_end/models/trace/EntityMapper.ts +0 -141
- package/lib/front_end/models/trace/EventsSerializer.ts +0 -101
- package/lib/front_end/models/trace/LanternComputationData.ts +0 -438
- package/lib/front_end/models/trace/ModelImpl.ts +0 -236
- package/lib/front_end/models/trace/Name.ts +0 -136
- package/lib/front_end/models/trace/Processor.ts +0 -652
- package/lib/front_end/models/trace/Styles.ts +0 -1138
- package/lib/front_end/models/trace/extras/FilmStrip.ts +0 -78
- package/lib/front_end/models/trace/extras/MainThreadActivity.ts +0 -86
- package/lib/front_end/models/trace/extras/ScriptDuplication.ts +0 -236
- package/lib/front_end/models/trace/extras/StackTraceForEvent.ts +0 -203
- package/lib/front_end/models/trace/extras/ThirdParties.ts +0 -164
- package/lib/front_end/models/trace/extras/TraceFilter.ts +0 -62
- package/lib/front_end/models/trace/extras/TraceTree.ts +0 -701
- package/lib/front_end/models/trace/extras/extras.ts +0 -11
- package/lib/front_end/models/trace/handlers/AnimationFramesHandler.ts +0 -128
- package/lib/front_end/models/trace/handlers/AnimationHandler.ts +0 -36
- package/lib/front_end/models/trace/handlers/AsyncJSCallsHandler.ts +0 -239
- package/lib/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
- package/lib/front_end/models/trace/handlers/DOMStatsHandler.ts +0 -31
- package/lib/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -306
- package/lib/front_end/models/trace/handlers/FlowsHandler.ts +0 -175
- package/lib/front_end/models/trace/handlers/FramesHandler.ts +0 -571
- package/lib/front_end/models/trace/handlers/GPUHandler.ts +0 -50
- package/lib/front_end/models/trace/handlers/ImagePaintingHandler.ts +0 -183
- package/lib/front_end/models/trace/handlers/InitiatorsHandler.ts +0 -193
- package/lib/front_end/models/trace/handlers/InvalidationsHandler.ts +0 -168
- package/lib/front_end/models/trace/handlers/LargestImagePaintHandler.ts +0 -109
- package/lib/front_end/models/trace/handlers/LargestTextPaintHandler.ts +0 -35
- package/lib/front_end/models/trace/handlers/LayerTreeHandler.ts +0 -123
- package/lib/front_end/models/trace/handlers/LayoutShiftsHandler.ts +0 -573
- package/lib/front_end/models/trace/handlers/MemoryHandler.ts +0 -31
- package/lib/front_end/models/trace/handlers/MetaHandler.ts +0 -525
- package/lib/front_end/models/trace/handlers/ModelHandlers.ts +0 -34
- package/lib/front_end/models/trace/handlers/NetworkRequestsHandler.ts +0 -672
- package/lib/front_end/models/trace/handlers/PageFramesHandler.ts +0 -52
- package/lib/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +0 -460
- package/lib/front_end/models/trace/handlers/RendererHandler.ts +0 -428
- package/lib/front_end/models/trace/handlers/SamplesHandler.ts +0 -271
- package/lib/front_end/models/trace/handlers/ScreenshotsHandler.ts +0 -122
- package/lib/front_end/models/trace/handlers/ScriptsHandler.ts +0 -336
- package/lib/front_end/models/trace/handlers/SelectorStatsHandler.ts +0 -110
- package/lib/front_end/models/trace/handlers/Threads.ts +0 -139
- package/lib/front_end/models/trace/handlers/UserInteractionsHandler.ts +0 -400
- package/lib/front_end/models/trace/handlers/UserTimingsHandler.ts +0 -233
- package/lib/front_end/models/trace/handlers/WarningsHandler.ts +0 -162
- package/lib/front_end/models/trace/handlers/WorkersHandler.ts +0 -45
- package/lib/front_end/models/trace/handlers/handlers.ts +0 -8
- package/lib/front_end/models/trace/handlers/helpers.ts +0 -196
- package/lib/front_end/models/trace/handlers/types.ts +0 -75
- package/lib/front_end/models/trace/helpers/Extensions.ts +0 -54
- package/lib/front_end/models/trace/helpers/Network.ts +0 -129
- package/lib/front_end/models/trace/helpers/SamplesIntegrator.ts +0 -544
- package/lib/front_end/models/trace/helpers/SyntheticEvents.ts +0 -87
- package/lib/front_end/models/trace/helpers/Timing.ts +0 -248
- package/lib/front_end/models/trace/helpers/Trace.ts +0 -928
- package/lib/front_end/models/trace/helpers/TreeHelpers.ts +0 -320
- package/lib/front_end/models/trace/helpers/helpers.ts +0 -11
- package/lib/front_end/models/trace/insights/CLSCulprits.ts +0 -668
- package/lib/front_end/models/trace/insights/Cache.ts +0 -269
- package/lib/front_end/models/trace/insights/Common.ts +0 -453
- package/lib/front_end/models/trace/insights/DOMSize.ts +0 -223
- package/lib/front_end/models/trace/insights/DocumentLatency.ts +0 -319
- package/lib/front_end/models/trace/insights/DuplicatedJavaScript.ts +0 -126
- package/lib/front_end/models/trace/insights/FontDisplay.ts +0 -119
- package/lib/front_end/models/trace/insights/ForcedReflow.ts +0 -220
- package/lib/front_end/models/trace/insights/INPBreakdown.ts +0 -171
- package/lib/front_end/models/trace/insights/ImageDelivery.ts +0 -348
- package/lib/front_end/models/trace/insights/LCPBreakdown.ts +0 -268
- package/lib/front_end/models/trace/insights/LCPDiscovery.ts +0 -237
- package/lib/front_end/models/trace/insights/LegacyJavaScript.ts +0 -138
- package/lib/front_end/models/trace/insights/Models.ts +0 -22
- package/lib/front_end/models/trace/insights/ModernHTTP.ts +0 -257
- package/lib/front_end/models/trace/insights/NetworkDependencyTree.ts +0 -726
- package/lib/front_end/models/trace/insights/RenderBlocking.ts +0 -257
- package/lib/front_end/models/trace/insights/SlowCSSSelector.ts +0 -175
- package/lib/front_end/models/trace/insights/Statistics.ts +0 -101
- package/lib/front_end/models/trace/insights/ThirdParties.ts +0 -130
- package/lib/front_end/models/trace/insights/Viewport.ts +0 -138
- package/lib/front_end/models/trace/insights/insights.ts +0 -10
- package/lib/front_end/models/trace/insights/types.ts +0 -157
- package/lib/front_end/models/trace/lantern/core/LanternError.ts +0 -7
- package/lib/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +0 -619
- package/lib/front_end/models/trace/lantern/core/core.ts +0 -6
- package/lib/front_end/models/trace/lantern/graph/BaseNode.ts +0 -345
- package/lib/front_end/models/trace/lantern/graph/CPUNode.ts +0 -80
- package/lib/front_end/models/trace/lantern/graph/NetworkNode.ts +0 -101
- package/lib/front_end/models/trace/lantern/graph/PageDependencyGraph.ts +0 -636
- package/lib/front_end/models/trace/lantern/graph/graph.ts +0 -8
- package/lib/front_end/models/trace/lantern/lantern.ts +0 -17
- package/lib/front_end/models/trace/lantern/metrics/FirstContentfulPaint.ts +0 -187
- package/lib/front_end/models/trace/lantern/metrics/Interactive.ts +0 -88
- package/lib/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +0 -92
- package/lib/front_end/models/trace/lantern/metrics/MaxPotentialFID.ts +0 -72
- package/lib/front_end/models/trace/lantern/metrics/Metric.ts +0 -126
- package/lib/front_end/models/trace/lantern/metrics/SpeedIndex.ts +0 -126
- package/lib/front_end/models/trace/lantern/metrics/TBTUtils.ts +0 -82
- package/lib/front_end/models/trace/lantern/metrics/TotalBlockingTime.ts +0 -112
- package/lib/front_end/models/trace/lantern/metrics/metrics.ts +0 -12
- package/lib/front_end/models/trace/lantern/simulation/ConnectionPool.ts +0 -150
- package/lib/front_end/models/trace/lantern/simulation/Constants.ts +0 -46
- package/lib/front_end/models/trace/lantern/simulation/DNSCache.ts +0 -61
- package/lib/front_end/models/trace/lantern/simulation/SimulationTimingMap.ts +0 -196
- package/lib/front_end/models/trace/lantern/simulation/Simulator.ts +0 -556
- package/lib/front_end/models/trace/lantern/simulation/TCPConnection.ts +0 -192
- package/lib/front_end/models/trace/lantern/simulation/simulation.ts +0 -10
- package/lib/front_end/models/trace/lantern/types/Lantern.ts +0 -220
- package/lib/front_end/models/trace/lantern/types/types.ts +0 -5
- package/lib/front_end/models/trace/trace.ts +0 -33
- package/lib/front_end/models/trace/types/Configuration.ts +0 -110
- package/lib/front_end/models/trace/types/Extensions.ts +0 -136
- package/lib/front_end/models/trace/types/File.ts +0 -281
- package/lib/front_end/models/trace/types/Overlays.ts +0 -138
- package/lib/front_end/models/trace/types/Timing.ts +0 -30
- package/lib/front_end/models/trace/types/TraceEvents.ts +0 -3277
- package/lib/front_end/models/trace/types/types.ts +0 -10
- package/lib/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +0 -240
- package/lib/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +0 -5
- package/lib/front_end/models/workspace/FileManager.ts +0 -97
- package/lib/front_end/models/workspace/IgnoreListManager.ts +0 -628
- package/lib/front_end/models/workspace/SearchConfig.ts +0 -149
- package/lib/front_end/models/workspace/UISourceCode.ts +0 -698
- package/lib/front_end/models/workspace/WorkspaceImpl.ts +0 -339
- package/lib/front_end/models/workspace/workspace.ts +0 -17
- package/lib/front_end/panels/timeline/TimelineUIUtils.ts +0 -1029
- package/lib/front_end/panels/timeline/extensions/ExtensionUI.ts +0 -49
- package/lib/front_end/panels/timeline/extensions/extensions.ts +0 -9
- package/lib/front_end/third_party/codemirror.next/LICENSE +0 -21
- package/lib/front_end/third_party/codemirror.next/README.chromium +0 -30
- package/lib/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
- package/lib/front_end/third_party/codemirror.next/bundle.ts +0 -135
- package/lib/front_end/third_party/codemirror.next/chunk/angular.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/angular.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/cpp.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/cpp.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/css.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/html.js +0 -4
- package/lib/front_end/third_party/codemirror.next/chunk/java.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/java.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/javascript.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/legacy.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/legacy.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/less.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/less.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/markdown.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/markdown.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/php.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/php.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/python.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/python.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/sass.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/sass.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/svelte.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/svelte.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/vue.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/vue.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/wast.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/wast.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/xml.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/xml.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/codemirror.next.d.ts +0 -8057
- package/lib/front_end/third_party/codemirror.next/codemirror.next.js +0 -2
- package/lib/front_end/third_party/codemirror.next/codemirror.next.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/package.json +0 -43
- package/lib/front_end/third_party/codemirror.next/rebuild.sh +0 -6
- package/lib/front_end/third_party/codemirror.next/rollup.config.mjs +0 -49
- package/lib/front_end/third_party/i18n/LICENSE +0 -202
- package/lib/front_end/third_party/i18n/README.chromium +0 -15
- package/lib/front_end/third_party/i18n/i18n-impl.ts +0 -61
- package/lib/front_end/third_party/i18n/i18n.ts +0 -11
- package/lib/front_end/third_party/i18n/localized-string-set.ts +0 -129
- package/lib/front_end/third_party/intl-messageformat/LICENSE +0 -33
- package/lib/front_end/third_party/intl-messageformat/README.chromium +0 -24
- package/lib/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
- package/lib/front_end/third_party/intl-messageformat/intl-messageformat.ts +0 -6
- package/lib/front_end/third_party/intl-messageformat/package/LICENSE.md +0 -33
- package/lib/front_end/third_party/intl-messageformat/package/README.md +0 -3
- package/lib/front_end/third_party/intl-messageformat/package/index.d.ts +0 -6
- package/lib/front_end/third_party/intl-messageformat/package/index.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/index.js +0 -13
- package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.d.ts +0 -5
- package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.js +0 -1710
- package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.iife.js +0 -1815
- package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts +0 -6
- package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/lib/index.js +0 -10
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts +0 -34
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.js +0 -229
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts +0 -28
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.js +0 -48
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts +0 -34
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.js +0 -179
- package/lib/front_end/third_party/intl-messageformat/package/package.json +0 -42
- package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts +0 -34
- package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/src/core.js +0 -230
- package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts +0 -28
- package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/src/error.js +0 -51
- package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts +0 -34
- package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/src/formatters.js +0 -182
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/error.d.ts +0 -79
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/index.d.ts +0 -15
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/parser.d.ts +0 -153
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/types.d.ts +0 -139
- package/lib/front_end/third_party/legacy-javascript/LICENSE +0 -202
- package/lib/front_end/third_party/legacy-javascript/README.chromium +0 -13
- package/lib/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
- package/lib/front_end/third_party/legacy-javascript/legacy-javascript.ts +0 -3
- package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.d.ts +0 -18
- package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.js +0 -943
- package/lib/front_end/third_party/legacy-javascript/package.json +0 -8
- package/lib/front_end/third_party/legacy-javascript/rebuild.sh +0 -9
- package/lib/front_end/third_party/source-map-scopes-codec/LICENSE +0 -26
- package/lib/front_end/third_party/source-map-scopes-codec/README.chromium +0 -31
- package/lib/front_end/third_party/source-map-scopes-codec/package/CONTRIBUTING.md +0 -33
- package/lib/front_end/third_party/source-map-scopes-codec/package/LICENSE +0 -26
- package/lib/front_end/third_party/source-map-scopes-codec/package/README.md +0 -64
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts +0 -62
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts +0 -37
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +0 -29
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts +0 -8
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +0 -6
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/deno.json +0 -21
- package/lib/front_end/third_party/source-map-scopes-codec/package/package.json +0 -14
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js +0 -196
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.ts +0 -262
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js +0 -235
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.ts +0 -359
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js +0 -39
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.ts +0 -53
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +0 -438
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +0 -539
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js +0 -23
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.ts +0 -35
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +0 -257
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +0 -348
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js +0 -8
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +0 -20
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes-tsconfig.json +0 -8
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes.d.ts +0 -184
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js +0 -9
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.ts +0 -12
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js +0 -82
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.ts +0 -99
- package/lib/front_end/third_party/source-map-scopes-codec/source-map-scopes-codec.ts +0 -5
- package/lib/front_end/third_party/third-party-web/LICENSE +0 -20
- package/lib/front_end/third_party/third-party-web/README.chromium +0 -13
- package/lib/front_end/third_party/third-party-web/lib/nostats-subset.d.ts +0 -2
- package/lib/front_end/third_party/third-party-web/lib/nostats-subset.js +0 -149
- package/lib/front_end/third_party/third-party-web/package/LICENSE +0 -20
- package/lib/front_end/third_party/third-party-web/package/README.md +0 -929
- package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive-nostats.json +0 -1
- package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive.json +0 -1
- package/lib/front_end/third_party/third-party-web/package/dist/entities-nostats.json +0 -1
- package/lib/front_end/third_party/third-party-web/package/dist/entities.json +0 -1
- package/lib/front_end/third_party/third-party-web/package/facades.md +0 -46
- package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.js +0 -1
- package/lib/front_end/third_party/third-party-web/package/httparchive-subset.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/httparchive-subset.js +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/__snapshots__/index.test.js.snap +0 -1006
- package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.js +0 -139
- package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.test.js +0 -44
- package/lib/front_end/third_party/third-party-web/package/lib/entities.test.js +0 -27
- package/lib/front_end/third_party/third-party-web/package/lib/index.d.ts +0 -34
- package/lib/front_end/third_party/third-party-web/package/lib/index.js +0 -3
- package/lib/front_end/third_party/third-party-web/package/lib/index.test.js +0 -246
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/faqs.partial.md +0 -36
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/goals.partial.md +0 -9
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/methodology.partial.md +0 -5
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/template.md +0 -151
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-02-01.md +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-03-01.md +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-06.md +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-13.md +0 -14
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2021-01-01.md +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2024-07-01.md +0 -3
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.js +0 -3
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.js +0 -3
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.js +0 -3
- package/lib/front_end/third_party/third-party-web/package/nostats-subset.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/nostats-subset.js +0 -1
- package/lib/front_end/third_party/third-party-web/package/package.json +0 -46
- package/lib/front_end/third_party/third-party-web/package.json +0 -8
- package/lib/front_end/third_party/third-party-web/rebuild.sh +0 -13
- package/lib/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
- package/lib/front_end/third_party/third-party-web/third-party-web.ts +0 -3
- package/lib/front_end/ui/legacy/theme_support/ThemeSupport.ts +0 -222
- package/lib/front_end/ui/legacy/theme_support/theme_support.ts +0 -5
- package/patches/chrome-devtools-frontend+1.0.1533544.patch +0 -1716
|
@@ -1,733 +0,0 @@
|
|
|
1
|
-
// Copyright 2014 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
import * as Common from '../../core/common/common.js';
|
|
6
|
-
import * as Platform from '../../core/platform/platform.js';
|
|
7
|
-
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
|
-
import * as Protocol from '../../generated/protocol.js';
|
|
9
|
-
import type * as StackTrace from '../stack_trace/stack_trace.js';
|
|
10
|
-
// eslint-disable-next-line @devtools/es-modules-import
|
|
11
|
-
import * as StackTraceImpl from '../stack_trace/stack_trace_impl.js';
|
|
12
|
-
import type * as TextUtils from '../text_utils/text_utils.js';
|
|
13
|
-
import * as Workspace from '../workspace/workspace.js';
|
|
14
|
-
|
|
15
|
-
import {CompilerScriptMapping} from './CompilerScriptMapping.js';
|
|
16
|
-
import {DebuggerLanguagePluginManager} from './DebuggerLanguagePlugins.js';
|
|
17
|
-
import {DefaultScriptMapping} from './DefaultScriptMapping.js';
|
|
18
|
-
import {type LiveLocation, type LiveLocationPool, LiveLocationWithPool} from './LiveLocation.js';
|
|
19
|
-
import {NetworkProject} from './NetworkProject.js';
|
|
20
|
-
import type {ResourceMapping} from './ResourceMapping.js';
|
|
21
|
-
import {type ResourceScriptFile, ResourceScriptMapping} from './ResourceScriptMapping.js';
|
|
22
|
-
|
|
23
|
-
let debuggerWorkspaceBindingInstance: DebuggerWorkspaceBinding|undefined;
|
|
24
|
-
|
|
25
|
-
export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObserver<SDK.DebuggerModel.DebuggerModel> {
|
|
26
|
-
readonly resourceMapping: ResourceMapping;
|
|
27
|
-
readonly #debuggerModelToData: Map<SDK.DebuggerModel.DebuggerModel, ModelData>;
|
|
28
|
-
readonly #liveLocationPromises: Set<Promise<void|Location|StackTraceTopFrameLocation|null>>;
|
|
29
|
-
readonly pluginManager: DebuggerLanguagePluginManager;
|
|
30
|
-
|
|
31
|
-
private constructor(
|
|
32
|
-
resourceMapping: ResourceMapping, targetManager: SDK.TargetManager.TargetManager,
|
|
33
|
-
ignoreListManager: Workspace.IgnoreListManager.IgnoreListManager) {
|
|
34
|
-
this.resourceMapping = resourceMapping;
|
|
35
|
-
|
|
36
|
-
this.#debuggerModelToData = new Map();
|
|
37
|
-
targetManager.addModelListener(
|
|
38
|
-
SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.GlobalObjectCleared, this.globalObjectCleared, this);
|
|
39
|
-
targetManager.addModelListener(
|
|
40
|
-
SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerResumed, this.debuggerResumed, this);
|
|
41
|
-
targetManager.observeModels(SDK.DebuggerModel.DebuggerModel, this);
|
|
42
|
-
ignoreListManager.addEventListener(
|
|
43
|
-
Workspace.IgnoreListManager.Events.IGNORED_SCRIPT_RANGES_UPDATED, event => this.updateLocations(event.data));
|
|
44
|
-
|
|
45
|
-
this.#liveLocationPromises = new Set();
|
|
46
|
-
|
|
47
|
-
this.pluginManager = new DebuggerLanguagePluginManager(targetManager, resourceMapping.workspace, this);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
setFunctionRanges(
|
|
51
|
-
uiSourceCode: Workspace.UISourceCode.UISourceCode,
|
|
52
|
-
ranges: SDK.SourceMapFunctionRanges.NamedFunctionRange[]): void {
|
|
53
|
-
for (const modelData of this.#debuggerModelToData.values()) {
|
|
54
|
-
modelData.compilerMapping.setFunctionRanges(uiSourceCode, ranges);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
static instance(opts: {
|
|
59
|
-
forceNew: boolean|null,
|
|
60
|
-
resourceMapping: ResourceMapping|null,
|
|
61
|
-
targetManager: SDK.TargetManager.TargetManager|null,
|
|
62
|
-
ignoreListManager: Workspace.IgnoreListManager.IgnoreListManager|null,
|
|
63
|
-
} = {forceNew: null, resourceMapping: null, targetManager: null, ignoreListManager: null}): DebuggerWorkspaceBinding {
|
|
64
|
-
const {forceNew, resourceMapping, targetManager, ignoreListManager} = opts;
|
|
65
|
-
if (!debuggerWorkspaceBindingInstance || forceNew) {
|
|
66
|
-
if (!resourceMapping || !targetManager || !ignoreListManager) {
|
|
67
|
-
throw new Error(
|
|
68
|
-
`Unable to create DebuggerWorkspaceBinding: resourceMapping, targetManager and IgnoreLIstManager must be provided: ${
|
|
69
|
-
new Error().stack}`);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
debuggerWorkspaceBindingInstance =
|
|
73
|
-
new DebuggerWorkspaceBinding(resourceMapping, targetManager, ignoreListManager);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return debuggerWorkspaceBindingInstance;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
static removeInstance(): void {
|
|
80
|
-
debuggerWorkspaceBindingInstance = undefined;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
private async computeAutoStepRanges(mode: SDK.DebuggerModel.StepMode, callFrame: SDK.DebuggerModel.CallFrame):
|
|
84
|
-
Promise<SDK.DebuggerModel.LocationRange[]> {
|
|
85
|
-
function contained(location: SDK.DebuggerModel.Location, range: SDK.DebuggerModel.LocationRange): boolean {
|
|
86
|
-
const {start, end} = range;
|
|
87
|
-
if (start.scriptId !== location.scriptId) {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
if (location.lineNumber < start.lineNumber || location.lineNumber > end.lineNumber) {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
if (location.lineNumber === start.lineNumber && location.columnNumber < start.columnNumber) {
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
|
-
if (location.lineNumber === end.lineNumber && location.columnNumber >= end.columnNumber) {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const rawLocation = callFrame.location();
|
|
103
|
-
if (!rawLocation) {
|
|
104
|
-
return [];
|
|
105
|
-
}
|
|
106
|
-
const pluginManager = this.pluginManager;
|
|
107
|
-
let ranges: SDK.DebuggerModel.LocationRange[] = [];
|
|
108
|
-
if (mode === SDK.DebuggerModel.StepMode.STEP_OUT) {
|
|
109
|
-
// Step out of inline function.
|
|
110
|
-
return await pluginManager.getInlinedFunctionRanges(rawLocation);
|
|
111
|
-
}
|
|
112
|
-
const uiLocation = await pluginManager.rawLocationToUILocation(rawLocation);
|
|
113
|
-
if (uiLocation) {
|
|
114
|
-
ranges = await pluginManager.uiLocationToRawLocationRanges(
|
|
115
|
-
uiLocation.uiSourceCode, uiLocation.lineNumber, uiLocation.columnNumber) ||
|
|
116
|
-
[];
|
|
117
|
-
// TODO(bmeurer): Remove the {rawLocation} from the {ranges}?
|
|
118
|
-
ranges = ranges.filter(range => contained(rawLocation, range));
|
|
119
|
-
if (mode === SDK.DebuggerModel.StepMode.STEP_OVER) {
|
|
120
|
-
// Step over an inlined function.
|
|
121
|
-
ranges = ranges.concat(await pluginManager.getInlinedCalleesRanges(rawLocation));
|
|
122
|
-
}
|
|
123
|
-
return ranges;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const compilerMapping = this.#debuggerModelToData.get(rawLocation.debuggerModel)?.compilerMapping;
|
|
127
|
-
if (!compilerMapping) {
|
|
128
|
-
return [];
|
|
129
|
-
}
|
|
130
|
-
ranges = compilerMapping.getLocationRangesForSameSourceLocation(rawLocation);
|
|
131
|
-
ranges = ranges.filter(range => contained(rawLocation, range));
|
|
132
|
-
return ranges;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
modelAdded(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {
|
|
136
|
-
debuggerModel.setBeforePausedCallback(this.shouldPause.bind(this));
|
|
137
|
-
this.#debuggerModelToData.set(debuggerModel, new ModelData(debuggerModel, this));
|
|
138
|
-
debuggerModel.setComputeAutoStepRangesCallback(this.computeAutoStepRanges.bind(this));
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
modelRemoved(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {
|
|
142
|
-
debuggerModel.setComputeAutoStepRangesCallback(null);
|
|
143
|
-
const modelData = this.#debuggerModelToData.get(debuggerModel);
|
|
144
|
-
if (modelData) {
|
|
145
|
-
modelData.dispose();
|
|
146
|
-
this.#debuggerModelToData.delete(debuggerModel);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* The promise returned by this function is resolved once all *currently*
|
|
152
|
-
* pending LiveLocations are processed.
|
|
153
|
-
*/
|
|
154
|
-
async pendingLiveLocationChangesPromise(): Promise<void|Location|StackTraceTopFrameLocation|null> {
|
|
155
|
-
await Promise.all(this.#liveLocationPromises);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
private recordLiveLocationChange(promise: Promise<void|Location|StackTraceTopFrameLocation|null>): void {
|
|
159
|
-
void promise.then(() => {
|
|
160
|
-
this.#liveLocationPromises.delete(promise);
|
|
161
|
-
});
|
|
162
|
-
this.#liveLocationPromises.add(promise);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
async updateLocations(script: SDK.Script.Script): Promise<void> {
|
|
166
|
-
const updatePromises = [script.target()
|
|
167
|
-
.model(StackTraceImpl.StackTraceModel.StackTraceModel)
|
|
168
|
-
?.scriptInfoChanged(script, this.#translateRawFrames.bind(this))];
|
|
169
|
-
|
|
170
|
-
const modelData = this.#debuggerModelToData.get(script.debuggerModel);
|
|
171
|
-
if (modelData) {
|
|
172
|
-
const updatePromise = modelData.updateLocations(script);
|
|
173
|
-
this.recordLiveLocationChange(updatePromise);
|
|
174
|
-
updatePromises.push(updatePromise);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
await Promise.all(updatePromises);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
async createStackTraceFromProtocolRuntime(stackTrace: Protocol.Runtime.StackTrace, target: SDK.Target.Target):
|
|
181
|
-
Promise<StackTrace.StackTrace.StackTrace> {
|
|
182
|
-
const model =
|
|
183
|
-
target.model(StackTraceImpl.StackTraceModel.StackTraceModel) as StackTraceImpl.StackTraceModel.StackTraceModel;
|
|
184
|
-
return await model.createFromProtocolRuntime(stackTrace, this.#translateRawFrames.bind(this));
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
async createLiveLocation(
|
|
188
|
-
rawLocation: SDK.DebuggerModel.Location, updateDelegate: (arg0: LiveLocation) => Promise<void>,
|
|
189
|
-
locationPool: LiveLocationPool): Promise<Location|null> {
|
|
190
|
-
const modelData = this.#debuggerModelToData.get(rawLocation.debuggerModel);
|
|
191
|
-
if (!modelData) {
|
|
192
|
-
return null;
|
|
193
|
-
}
|
|
194
|
-
const liveLocationPromise = modelData.createLiveLocation(rawLocation, updateDelegate, locationPool);
|
|
195
|
-
this.recordLiveLocationChange(liveLocationPromise);
|
|
196
|
-
return await liveLocationPromise;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
async createStackTraceTopFrameLiveLocation(
|
|
200
|
-
rawLocations: SDK.DebuggerModel.Location[], updateDelegate: (arg0: LiveLocation) => Promise<void>,
|
|
201
|
-
locationPool: LiveLocationPool): Promise<LiveLocation> {
|
|
202
|
-
console.assert(rawLocations.length > 0);
|
|
203
|
-
const locationPromise =
|
|
204
|
-
StackTraceTopFrameLocation.createStackTraceTopFrameLocation(rawLocations, this, updateDelegate, locationPool);
|
|
205
|
-
this.recordLiveLocationChange(locationPromise);
|
|
206
|
-
return await locationPromise;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
async createCallFrameLiveLocation(
|
|
210
|
-
location: SDK.DebuggerModel.Location, updateDelegate: (arg0: LiveLocation) => Promise<void>,
|
|
211
|
-
locationPool: LiveLocationPool): Promise<Location|null> {
|
|
212
|
-
const script = location.script();
|
|
213
|
-
if (!script) {
|
|
214
|
-
return null;
|
|
215
|
-
}
|
|
216
|
-
const debuggerModel = location.debuggerModel;
|
|
217
|
-
const liveLocationPromise = this.createLiveLocation(location, updateDelegate, locationPool);
|
|
218
|
-
this.recordLiveLocationChange(liveLocationPromise);
|
|
219
|
-
const liveLocation = await liveLocationPromise;
|
|
220
|
-
if (!liveLocation) {
|
|
221
|
-
return null;
|
|
222
|
-
}
|
|
223
|
-
this.registerCallFrameLiveLocation(debuggerModel, liveLocation);
|
|
224
|
-
return liveLocation;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
async rawLocationToUILocation(rawLocation: SDK.DebuggerModel.Location):
|
|
228
|
-
Promise<Workspace.UISourceCode.UILocation|null> {
|
|
229
|
-
const uiLocation = await this.pluginManager.rawLocationToUILocation(rawLocation);
|
|
230
|
-
if (uiLocation) {
|
|
231
|
-
return uiLocation;
|
|
232
|
-
}
|
|
233
|
-
const modelData = this.#debuggerModelToData.get(rawLocation.debuggerModel);
|
|
234
|
-
return modelData ? modelData.rawLocationToUILocation(rawLocation) : null;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
uiSourceCodeForSourceMapSourceURL(
|
|
238
|
-
debuggerModel: SDK.DebuggerModel.DebuggerModel, url: Platform.DevToolsPath.UrlString,
|
|
239
|
-
isContentScript: boolean): Workspace.UISourceCode.UISourceCode|null {
|
|
240
|
-
const modelData = this.#debuggerModelToData.get(debuggerModel);
|
|
241
|
-
if (!modelData) {
|
|
242
|
-
return null;
|
|
243
|
-
}
|
|
244
|
-
return modelData.compilerMapping.uiSourceCodeForURL(url, isContentScript);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
async uiSourceCodeForSourceMapSourceURLPromise(
|
|
248
|
-
debuggerModel: SDK.DebuggerModel.DebuggerModel, url: Platform.DevToolsPath.UrlString,
|
|
249
|
-
isContentScript: boolean): Promise<Workspace.UISourceCode.UISourceCode> {
|
|
250
|
-
const uiSourceCode = this.uiSourceCodeForSourceMapSourceURL(debuggerModel, url, isContentScript);
|
|
251
|
-
return await (uiSourceCode || this.waitForUISourceCodeAdded(url, debuggerModel.target()));
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
async uiSourceCodeForDebuggerLanguagePluginSourceURLPromise(
|
|
255
|
-
debuggerModel: SDK.DebuggerModel.DebuggerModel,
|
|
256
|
-
url: Platform.DevToolsPath.UrlString): Promise<Workspace.UISourceCode.UISourceCode|null> {
|
|
257
|
-
const uiSourceCode = this.pluginManager.uiSourceCodeForURL(debuggerModel, url);
|
|
258
|
-
return await (uiSourceCode || this.waitForUISourceCodeAdded(url, debuggerModel.target()));
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
uiSourceCodeForScript(script: SDK.Script.Script): Workspace.UISourceCode.UISourceCode|null {
|
|
262
|
-
const modelData = this.#debuggerModelToData.get(script.debuggerModel);
|
|
263
|
-
if (!modelData) {
|
|
264
|
-
return null;
|
|
265
|
-
}
|
|
266
|
-
return modelData.uiSourceCodeForScript(script);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
waitForUISourceCodeAdded(url: Platform.DevToolsPath.UrlString, target: SDK.Target.Target):
|
|
270
|
-
Promise<Workspace.UISourceCode.UISourceCode> {
|
|
271
|
-
return new Promise(resolve => {
|
|
272
|
-
const workspace = Workspace.Workspace.WorkspaceImpl.instance();
|
|
273
|
-
const descriptor = workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdded, event => {
|
|
274
|
-
const uiSourceCode = event.data;
|
|
275
|
-
if (uiSourceCode.url() === url && NetworkProject.targetForUISourceCode(uiSourceCode) === target) {
|
|
276
|
-
workspace.removeEventListener(Workspace.Workspace.Events.UISourceCodeAdded, descriptor.listener);
|
|
277
|
-
resolve(uiSourceCode);
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
async uiLocationToRawLocations(
|
|
284
|
-
uiSourceCode: Workspace.UISourceCode.UISourceCode, lineNumber: number,
|
|
285
|
-
columnNumber?: number): Promise<SDK.DebuggerModel.Location[]> {
|
|
286
|
-
const locations = await this.pluginManager.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber);
|
|
287
|
-
if (locations) {
|
|
288
|
-
return locations;
|
|
289
|
-
}
|
|
290
|
-
for (const modelData of this.#debuggerModelToData.values()) {
|
|
291
|
-
const locations = modelData.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber);
|
|
292
|
-
if (locations.length) {
|
|
293
|
-
return locations;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
return [];
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Computes all the raw location ranges that intersect with the {@link textRange} in the given
|
|
301
|
-
* {@link uiSourceCode}. The reverse mappings of the returned ranges must not be fully contained
|
|
302
|
-
* with the {@link textRange} and it's the responsibility of the caller to appropriately filter or
|
|
303
|
-
* clamp if desired.
|
|
304
|
-
*
|
|
305
|
-
* It's important to note that for a contiguous range in the {@link uiSourceCode} there can be a
|
|
306
|
-
* variety of non-contiguous raw location ranges that intersect with the {@link textRange}. A
|
|
307
|
-
* simple example is that of an HTML document with multiple inline `<script>`s in the same line,
|
|
308
|
-
* so just asking for the raw locations in this single line will return a set of location ranges
|
|
309
|
-
* in different scripts.
|
|
310
|
-
*
|
|
311
|
-
* This method returns an empty array if this {@link uiSourceCode} is not provided by any of the
|
|
312
|
-
* mappings for this instance.
|
|
313
|
-
*
|
|
314
|
-
* @param uiSourceCode the {@link UISourceCode} to which the {@link textRange} belongs.
|
|
315
|
-
* @param textRange the text range in terms of the UI.
|
|
316
|
-
* @returns the list of raw location ranges that intersect with the text range or `[]` if
|
|
317
|
-
* the {@link uiSourceCode} does not belong to this instance.
|
|
318
|
-
*/
|
|
319
|
-
async uiLocationRangeToRawLocationRanges(
|
|
320
|
-
uiSourceCode: Workspace.UISourceCode.UISourceCode,
|
|
321
|
-
textRange: TextUtils.TextRange.TextRange): Promise<SDK.DebuggerModel.LocationRange[]> {
|
|
322
|
-
const ranges = await this.pluginManager.uiLocationRangeToRawLocationRanges(uiSourceCode, textRange);
|
|
323
|
-
if (ranges) {
|
|
324
|
-
return ranges;
|
|
325
|
-
}
|
|
326
|
-
for (const modelData of this.#debuggerModelToData.values()) {
|
|
327
|
-
const ranges = modelData.uiLocationRangeToRawLocationRanges(uiSourceCode, textRange);
|
|
328
|
-
if (ranges) {
|
|
329
|
-
return ranges;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
return [];
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
async normalizeUILocation(uiLocation: Workspace.UISourceCode.UILocation): Promise<Workspace.UISourceCode.UILocation> {
|
|
336
|
-
const rawLocations =
|
|
337
|
-
await this.uiLocationToRawLocations(uiLocation.uiSourceCode, uiLocation.lineNumber, uiLocation.columnNumber);
|
|
338
|
-
for (const location of rawLocations) {
|
|
339
|
-
const uiLocationCandidate = await this.rawLocationToUILocation(location);
|
|
340
|
-
if (uiLocationCandidate) {
|
|
341
|
-
return uiLocationCandidate;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
return uiLocation;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Computes the set of lines in the {@link uiSourceCode} that map to scripts by either looking at
|
|
349
|
-
* the debug info (if any) or checking for inline scripts within documents. If this set cannot be
|
|
350
|
-
* computed or all the lines in the {@link uiSourceCode} correspond to lines in a script, `null`
|
|
351
|
-
* is returned here.
|
|
352
|
-
*
|
|
353
|
-
* @param uiSourceCode the source entity.
|
|
354
|
-
* @returns a set of known mapped lines for {@link uiSourceCode} or `null` if it's impossible to
|
|
355
|
-
* determine the set or the {@link uiSourceCode} does not map to or include any scripts.
|
|
356
|
-
*/
|
|
357
|
-
async getMappedLines(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise<Set<number>|null> {
|
|
358
|
-
for (const modelData of this.#debuggerModelToData.values()) {
|
|
359
|
-
const mappedLines = modelData.getMappedLines(uiSourceCode);
|
|
360
|
-
if (mappedLines !== null) {
|
|
361
|
-
return mappedLines;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
return await this.pluginManager.getMappedLines(uiSourceCode);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
scriptFile(uiSourceCode: Workspace.UISourceCode.UISourceCode, debuggerModel: SDK.DebuggerModel.DebuggerModel):
|
|
368
|
-
ResourceScriptFile|null {
|
|
369
|
-
const modelData = this.#debuggerModelToData.get(debuggerModel);
|
|
370
|
-
return modelData ? modelData.getResourceScriptMapping().scriptFile(uiSourceCode) : null;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
scriptsForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): SDK.Script.Script[] {
|
|
374
|
-
const scripts = new Set<SDK.Script.Script>();
|
|
375
|
-
this.pluginManager.scriptsForUISourceCode(uiSourceCode).forEach(script => scripts.add(script));
|
|
376
|
-
for (const modelData of this.#debuggerModelToData.values()) {
|
|
377
|
-
const resourceScriptFile = modelData.getResourceScriptMapping().scriptFile(uiSourceCode);
|
|
378
|
-
if (resourceScriptFile?.script) {
|
|
379
|
-
scripts.add(resourceScriptFile.script);
|
|
380
|
-
}
|
|
381
|
-
modelData.compilerMapping.scriptsForUISourceCode(uiSourceCode).forEach(script => scripts.add(script));
|
|
382
|
-
}
|
|
383
|
-
return [...scripts];
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
supportsConditionalBreakpoints(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {
|
|
387
|
-
const scripts = this.pluginManager.scriptsForUISourceCode(uiSourceCode);
|
|
388
|
-
return scripts.every(script => script.isJavaScript());
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
private globalObjectCleared(event: Common.EventTarget.EventTargetEvent<SDK.DebuggerModel.DebuggerModel>): void {
|
|
392
|
-
this.reset(event.data);
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
private reset(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {
|
|
396
|
-
const modelData = this.#debuggerModelToData.get(debuggerModel);
|
|
397
|
-
if (!modelData) {
|
|
398
|
-
return;
|
|
399
|
-
}
|
|
400
|
-
for (const location of modelData.callFrameLocations.values()) {
|
|
401
|
-
this.removeLiveLocation(location);
|
|
402
|
-
}
|
|
403
|
-
modelData.callFrameLocations.clear();
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
resetForTest(target: SDK.Target.Target): void {
|
|
407
|
-
const debuggerModel = (target.model(SDK.DebuggerModel.DebuggerModel) as SDK.DebuggerModel.DebuggerModel);
|
|
408
|
-
const modelData = this.#debuggerModelToData.get(debuggerModel);
|
|
409
|
-
if (modelData) {
|
|
410
|
-
modelData.getResourceScriptMapping().resetForTest();
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
private registerCallFrameLiveLocation(debuggerModel: SDK.DebuggerModel.DebuggerModel, location: Location): void {
|
|
415
|
-
const modelData = this.#debuggerModelToData.get(debuggerModel);
|
|
416
|
-
if (modelData) {
|
|
417
|
-
const locations = modelData.callFrameLocations;
|
|
418
|
-
locations.add(location);
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
removeLiveLocation(location: Location): void {
|
|
423
|
-
const modelData = this.#debuggerModelToData.get(location.rawLocation.debuggerModel);
|
|
424
|
-
if (modelData) {
|
|
425
|
-
modelData.disposeLocation(location);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
private debuggerResumed(event: Common.EventTarget.EventTargetEvent<SDK.DebuggerModel.DebuggerModel>): void {
|
|
430
|
-
this.reset(event.data);
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
private async shouldPause(
|
|
434
|
-
debuggerPausedDetails: SDK.DebuggerModel.DebuggerPausedDetails,
|
|
435
|
-
autoSteppingContext: SDK.DebuggerModel.Location|null): Promise<boolean> {
|
|
436
|
-
// This function returns false if the debugger should continue stepping
|
|
437
|
-
const {callFrames: [frame]} = debuggerPausedDetails;
|
|
438
|
-
if (!frame) {
|
|
439
|
-
return false;
|
|
440
|
-
}
|
|
441
|
-
const functionLocation = frame.functionLocation();
|
|
442
|
-
if (!autoSteppingContext || debuggerPausedDetails.reason !== Protocol.Debugger.PausedEventReason.Step ||
|
|
443
|
-
!functionLocation || !frame.script.isWasm() || !Common.Settings.moduleSetting('wasm-auto-stepping').get() ||
|
|
444
|
-
!this.pluginManager.hasPluginForScript(frame.script)) {
|
|
445
|
-
return true;
|
|
446
|
-
}
|
|
447
|
-
const uiLocation = await this.pluginManager.rawLocationToUILocation(frame.location());
|
|
448
|
-
if (uiLocation) {
|
|
449
|
-
return true;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
return autoSteppingContext.script() !== functionLocation.script() ||
|
|
453
|
-
autoSteppingContext.columnNumber !== functionLocation.columnNumber ||
|
|
454
|
-
autoSteppingContext.lineNumber !== functionLocation.lineNumber;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
async #translateRawFrames(frames: readonly StackTraceImpl.Trie.RawFrame[], target: SDK.Target.Target):
|
|
458
|
-
ReturnType<StackTraceImpl.StackTraceModel.TranslateRawFrames> {
|
|
459
|
-
const rawFrames = frames.slice(0);
|
|
460
|
-
const translatedFrames: Awaited<ReturnType<StackTraceImpl.StackTraceModel.TranslateRawFrames>> = [];
|
|
461
|
-
while (rawFrames.length) {
|
|
462
|
-
await this.#translateRawFramesStep(rawFrames, translatedFrames, target);
|
|
463
|
-
}
|
|
464
|
-
return translatedFrames;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
async #translateRawFramesStep(
|
|
468
|
-
rawFrames: StackTraceImpl.Trie.RawFrame[],
|
|
469
|
-
translatedFrames: Awaited<ReturnType<StackTraceImpl.StackTraceModel.TranslateRawFrames>>,
|
|
470
|
-
target: SDK.Target.Target): Promise<void> {
|
|
471
|
-
if (await this.pluginManager.translateRawFramesStep(rawFrames, translatedFrames, target)) {
|
|
472
|
-
return;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
const modelData =
|
|
476
|
-
this.#debuggerModelToData.get(target.model(SDK.DebuggerModel.DebuggerModel) as SDK.DebuggerModel.DebuggerModel);
|
|
477
|
-
if (modelData) {
|
|
478
|
-
modelData.translateRawFramesStep(rawFrames, translatedFrames);
|
|
479
|
-
return;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
const frame = rawFrames.shift() as StackTraceImpl.Trie.RawFrame;
|
|
483
|
-
const {url, lineNumber, columnNumber, functionName} = frame;
|
|
484
|
-
translatedFrames.push([{url, line: lineNumber, column: columnNumber, name: functionName}]);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
class ModelData {
|
|
489
|
-
readonly #debuggerModel: SDK.DebuggerModel.DebuggerModel;
|
|
490
|
-
readonly #debuggerWorkspaceBinding: DebuggerWorkspaceBinding;
|
|
491
|
-
callFrameLocations: Set<Location>;
|
|
492
|
-
#defaultMapping: DefaultScriptMapping;
|
|
493
|
-
readonly #resourceMapping: ResourceMapping;
|
|
494
|
-
#resourceScriptMapping: ResourceScriptMapping;
|
|
495
|
-
readonly compilerMapping: CompilerScriptMapping;
|
|
496
|
-
readonly #locations: Platform.MapUtilities.Multimap<string, Location>;
|
|
497
|
-
|
|
498
|
-
constructor(debuggerModel: SDK.DebuggerModel.DebuggerModel, debuggerWorkspaceBinding: DebuggerWorkspaceBinding) {
|
|
499
|
-
this.#debuggerModel = debuggerModel;
|
|
500
|
-
this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
|
|
501
|
-
|
|
502
|
-
this.callFrameLocations = new Set();
|
|
503
|
-
|
|
504
|
-
const {workspace} = debuggerWorkspaceBinding.resourceMapping;
|
|
505
|
-
this.#defaultMapping = new DefaultScriptMapping(debuggerModel, workspace, debuggerWorkspaceBinding);
|
|
506
|
-
this.#resourceMapping = debuggerWorkspaceBinding.resourceMapping;
|
|
507
|
-
this.#resourceScriptMapping = new ResourceScriptMapping(debuggerModel, workspace, debuggerWorkspaceBinding);
|
|
508
|
-
this.compilerMapping = new CompilerScriptMapping(debuggerModel, workspace, debuggerWorkspaceBinding);
|
|
509
|
-
|
|
510
|
-
this.#locations = new Platform.MapUtilities.Multimap();
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
async createLiveLocation(
|
|
514
|
-
rawLocation: SDK.DebuggerModel.Location, updateDelegate: (arg0: LiveLocation) => Promise<void>,
|
|
515
|
-
locationPool: LiveLocationPool): Promise<Location> {
|
|
516
|
-
console.assert(rawLocation.scriptId !== '');
|
|
517
|
-
const scriptId = rawLocation.scriptId;
|
|
518
|
-
const location = new Location(scriptId, rawLocation, this.#debuggerWorkspaceBinding, updateDelegate, locationPool);
|
|
519
|
-
this.#locations.set(scriptId, location);
|
|
520
|
-
await location.update();
|
|
521
|
-
return location;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
disposeLocation(location: Location): void {
|
|
525
|
-
this.#locations.delete(location.scriptId, location);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
async updateLocations(script: SDK.Script.Script): Promise<void> {
|
|
529
|
-
const promises = [];
|
|
530
|
-
for (const location of this.#locations.get(script.scriptId)) {
|
|
531
|
-
promises.push(location.update());
|
|
532
|
-
}
|
|
533
|
-
await Promise.all(promises);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
rawLocationToUILocation(rawLocation: SDK.DebuggerModel.Location): Workspace.UISourceCode.UILocation|null {
|
|
537
|
-
let uiLocation = this.compilerMapping.rawLocationToUILocation(rawLocation);
|
|
538
|
-
uiLocation = uiLocation || this.#resourceScriptMapping.rawLocationToUILocation(rawLocation);
|
|
539
|
-
uiLocation = uiLocation || this.#resourceMapping.jsLocationToUILocation(rawLocation);
|
|
540
|
-
uiLocation = uiLocation || this.#defaultMapping.rawLocationToUILocation(rawLocation);
|
|
541
|
-
return uiLocation;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
uiSourceCodeForScript(script: SDK.Script.Script): Workspace.UISourceCode.UISourceCode|null {
|
|
545
|
-
let uiSourceCode: Workspace.UISourceCode.UISourceCode|null = null;
|
|
546
|
-
uiSourceCode = uiSourceCode || this.#resourceScriptMapping.uiSourceCodeForScript(script);
|
|
547
|
-
uiSourceCode = uiSourceCode || this.#resourceMapping.uiSourceCodeForScript(script);
|
|
548
|
-
uiSourceCode = uiSourceCode || this.#defaultMapping.uiSourceCodeForScript(script);
|
|
549
|
-
return uiSourceCode;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
uiLocationToRawLocations(
|
|
553
|
-
uiSourceCode: Workspace.UISourceCode.UISourceCode, lineNumber: number,
|
|
554
|
-
columnNumber: number|undefined = 0): SDK.DebuggerModel.Location[] {
|
|
555
|
-
// TODO(crbug.com/1153123): Revisit the `#columnNumber = 0` and also preserve `undefined` for source maps?
|
|
556
|
-
let locations = this.compilerMapping.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber);
|
|
557
|
-
locations = locations.length ?
|
|
558
|
-
locations :
|
|
559
|
-
this.#resourceScriptMapping.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber);
|
|
560
|
-
locations = locations.length ?
|
|
561
|
-
locations :
|
|
562
|
-
this.#resourceMapping.uiLocationToJSLocations(uiSourceCode, lineNumber, columnNumber);
|
|
563
|
-
locations = locations.length ?
|
|
564
|
-
locations :
|
|
565
|
-
this.#defaultMapping.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber);
|
|
566
|
-
return locations;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
uiLocationRangeToRawLocationRanges(
|
|
570
|
-
uiSourceCode: Workspace.UISourceCode.UISourceCode,
|
|
571
|
-
textRange: TextUtils.TextRange.TextRange): SDK.DebuggerModel.LocationRange[]|null {
|
|
572
|
-
let ranges = this.compilerMapping.uiLocationRangeToRawLocationRanges(uiSourceCode, textRange);
|
|
573
|
-
ranges ??= this.#resourceScriptMapping.uiLocationRangeToRawLocationRanges(uiSourceCode, textRange);
|
|
574
|
-
ranges ??= this.#resourceMapping.uiLocationRangeToJSLocationRanges(uiSourceCode, textRange);
|
|
575
|
-
ranges ??= this.#defaultMapping.uiLocationRangeToRawLocationRanges(uiSourceCode, textRange);
|
|
576
|
-
return ranges;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
translateRawFramesStep(
|
|
580
|
-
rawFrames: StackTraceImpl.Trie.RawFrame[],
|
|
581
|
-
translatedFrames: Awaited<ReturnType<StackTraceImpl.StackTraceModel.TranslateRawFrames>>): void {
|
|
582
|
-
if (!this.compilerMapping.translateRawFramesStep(rawFrames, translatedFrames)) {
|
|
583
|
-
this.#defaultTranslateRawFramesStep(rawFrames, translatedFrames);
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
/** The default implementation translates one frame at a time and only translates the location, but not the function name. */
|
|
588
|
-
#defaultTranslateRawFramesStep(
|
|
589
|
-
rawFrames: StackTraceImpl.Trie.RawFrame[],
|
|
590
|
-
translatedFrames: Awaited<ReturnType<StackTraceImpl.StackTraceModel.TranslateRawFrames>>): void {
|
|
591
|
-
const frame = rawFrames.shift() as StackTraceImpl.Trie.RawFrame;
|
|
592
|
-
const {scriptId, url, lineNumber, columnNumber, functionName} = frame;
|
|
593
|
-
const rawLocation = scriptId ? this.#debuggerModel.createRawLocationByScriptId(scriptId, lineNumber, columnNumber) :
|
|
594
|
-
url ? this.#debuggerModel.createRawLocationByURL(url, lineNumber, columnNumber) :
|
|
595
|
-
null;
|
|
596
|
-
if (rawLocation) {
|
|
597
|
-
const uiLocation = this.rawLocationToUILocation(rawLocation);
|
|
598
|
-
if (uiLocation) {
|
|
599
|
-
translatedFrames.push([{
|
|
600
|
-
uiSourceCode: uiLocation.uiSourceCode,
|
|
601
|
-
name: functionName,
|
|
602
|
-
line: uiLocation.lineNumber,
|
|
603
|
-
column: uiLocation.columnNumber ?? -1
|
|
604
|
-
}]);
|
|
605
|
-
return;
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
translatedFrames.push([{url, line: lineNumber, column: columnNumber, name: functionName}]);
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
getMappedLines(uiSourceCode: Workspace.UISourceCode.UISourceCode): Set<number>|null {
|
|
613
|
-
const mappedLines = this.compilerMapping.getMappedLines(uiSourceCode);
|
|
614
|
-
// TODO(crbug.com/1411431): The scripts from the ResourceMapping appear over time,
|
|
615
|
-
// and there's currently no way to inform the UI to update.
|
|
616
|
-
// mappedLines = mappedLines ?? this.#resourceMapping.getMappedLines(uiSourceCode);
|
|
617
|
-
return mappedLines;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
dispose(): void {
|
|
621
|
-
this.#debuggerModel.setBeforePausedCallback(null);
|
|
622
|
-
this.compilerMapping.dispose();
|
|
623
|
-
this.#resourceScriptMapping.dispose();
|
|
624
|
-
this.#defaultMapping.dispose();
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
getResourceScriptMapping(): ResourceScriptMapping {
|
|
628
|
-
return this.#resourceScriptMapping;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
export class Location extends LiveLocationWithPool {
|
|
633
|
-
readonly scriptId: string;
|
|
634
|
-
readonly rawLocation: SDK.DebuggerModel.Location;
|
|
635
|
-
readonly #binding: DebuggerWorkspaceBinding;
|
|
636
|
-
|
|
637
|
-
constructor(
|
|
638
|
-
scriptId: string, rawLocation: SDK.DebuggerModel.Location, binding: DebuggerWorkspaceBinding,
|
|
639
|
-
updateDelegate: (arg0: LiveLocation) => Promise<void>, locationPool: LiveLocationPool) {
|
|
640
|
-
super(updateDelegate, locationPool);
|
|
641
|
-
this.scriptId = scriptId;
|
|
642
|
-
this.rawLocation = rawLocation;
|
|
643
|
-
this.#binding = binding;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
override async uiLocation(): Promise<Workspace.UISourceCode.UILocation|null> {
|
|
647
|
-
const debuggerModelLocation = this.rawLocation;
|
|
648
|
-
return await this.#binding.rawLocationToUILocation(debuggerModelLocation);
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
override dispose(): void {
|
|
652
|
-
super.dispose();
|
|
653
|
-
this.#binding.removeLiveLocation(this);
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
class StackTraceTopFrameLocation extends LiveLocationWithPool {
|
|
658
|
-
#updateScheduled: boolean;
|
|
659
|
-
#current: LiveLocation|null;
|
|
660
|
-
#locations: LiveLocation[]|null;
|
|
661
|
-
constructor(updateDelegate: (arg0: LiveLocation) => Promise<void>, locationPool: LiveLocationPool) {
|
|
662
|
-
super(updateDelegate, locationPool);
|
|
663
|
-
this.#updateScheduled = true;
|
|
664
|
-
this.#current = null;
|
|
665
|
-
this.#locations = null;
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
static async createStackTraceTopFrameLocation(
|
|
669
|
-
rawLocations: SDK.DebuggerModel.Location[], binding: DebuggerWorkspaceBinding,
|
|
670
|
-
updateDelegate: (arg0: LiveLocation) => Promise<void>,
|
|
671
|
-
locationPool: LiveLocationPool): Promise<StackTraceTopFrameLocation> {
|
|
672
|
-
const location = new StackTraceTopFrameLocation(updateDelegate, locationPool);
|
|
673
|
-
const locationsPromises = rawLocations.map(
|
|
674
|
-
rawLocation => binding.createLiveLocation(rawLocation, location.scheduleUpdate.bind(location), locationPool));
|
|
675
|
-
location.#locations = ((await Promise.all(locationsPromises)).filter(l => !!l));
|
|
676
|
-
await location.updateLocation();
|
|
677
|
-
return location;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
override async uiLocation(): Promise<Workspace.UISourceCode.UILocation|null> {
|
|
681
|
-
return this.#current ? await this.#current.uiLocation() : null;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
override dispose(): void {
|
|
685
|
-
super.dispose();
|
|
686
|
-
if (this.#locations) {
|
|
687
|
-
for (const location of this.#locations) {
|
|
688
|
-
location.dispose();
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
this.#locations = null;
|
|
692
|
-
this.#current = null;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
private async scheduleUpdate(): Promise<void> {
|
|
696
|
-
if (this.#updateScheduled) {
|
|
697
|
-
return;
|
|
698
|
-
}
|
|
699
|
-
this.#updateScheduled = true;
|
|
700
|
-
queueMicrotask(() => {
|
|
701
|
-
void this.updateLocation();
|
|
702
|
-
});
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
private async updateLocation(): Promise<void> {
|
|
706
|
-
this.#updateScheduled = false;
|
|
707
|
-
if (!this.#locations || this.#locations.length === 0) {
|
|
708
|
-
return;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
this.#current = this.#locations[0];
|
|
712
|
-
for (const location of this.#locations) {
|
|
713
|
-
const uiLocation = await location.uiLocation();
|
|
714
|
-
if (!uiLocation?.isIgnoreListed()) {
|
|
715
|
-
this.#current = location;
|
|
716
|
-
break;
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
void this.update();
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
export interface DebuggerSourceMapping {
|
|
724
|
-
rawLocationToUILocation(rawLocation: SDK.DebuggerModel.Location): Workspace.UISourceCode.UILocation|null;
|
|
725
|
-
|
|
726
|
-
uiLocationToRawLocations(
|
|
727
|
-
uiSourceCode: Workspace.UISourceCode.UISourceCode, lineNumber: number,
|
|
728
|
-
columnNumber?: number): SDK.DebuggerModel.Location[];
|
|
729
|
-
|
|
730
|
-
uiLocationRangeToRawLocationRanges(
|
|
731
|
-
uiSourceCode: Workspace.UISourceCode.UISourceCode,
|
|
732
|
-
textRange: TextUtils.TextRange.TextRange): SDK.DebuggerModel.LocationRange[]|null;
|
|
733
|
-
}
|