chrome-devtools-frontend 1.0.1661063 → 1.0.1662965
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/.agents/skills/devtools-unicode-escaping/SKILL.md +64 -0
- package/.agents/skills/evaluate-ai-css-completion/SKILL.md +19 -9
- package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +44 -16
- package/.agents/skills/migrate-chromium-test/SKILL.md +32 -2
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +7 -1
- package/docs/ui_engineering.md +75 -42
- package/front_end/core/common/SettingRegistration.ts +0 -10
- package/front_end/core/common/Settings.ts +69 -3
- package/front_end/core/platform/ArrayUtilities.ts +10 -0
- package/front_end/core/platform/StringUtilities.ts +38 -6
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -10
- package/front_end/core/sdk/StorageBucketsModel.ts +0 -10
- package/front_end/core/sdk/sdk-meta.ts +0 -1
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +0 -13
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +8 -3
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +3 -3
- package/front_end/entrypoints/main/MainImpl.ts +7 -2
- package/front_end/foundation/README.md +86 -0
- package/front_end/foundation/Universe.ts +16 -0
- package/front_end/generated/InspectorBackendCommands.ts +6 -19
- package/front_end/generated/protocol-mapping.d.ts +0 -53
- package/front_end/generated/protocol-proxy-api.d.ts +0 -46
- package/front_end/generated/protocol.ts +20 -186
- package/front_end/models/ai_assistance/AiAgent2.ts +3 -3
- package/front_end/models/ai_assistance/AiConversation.ts +21 -10
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +21 -10
- package/front_end/models/ai_assistance/ChangeManager.ts +2 -2
- package/front_end/models/ai_assistance/ExtensionScope.ts +6 -2
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +8 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -1
- package/front_end/models/badges/UserBadges.ts +31 -17
- package/front_end/models/bindings/CompilerScriptMapping.ts +5 -4
- package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -3
- package/front_end/models/bindings/DefaultScriptMapping.ts +3 -3
- package/front_end/models/bindings/NetworkProject.ts +22 -1
- package/front_end/models/bindings/ResourceMapping.ts +4 -3
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +4 -3
- package/front_end/models/bindings/StylesSourceMapping.ts +3 -3
- package/front_end/models/emulation/DeviceModeModel.ts +67 -5
- package/front_end/models/extensions/RecorderExtensionEndpoint.ts +7 -5
- package/front_end/models/extensions/RecorderPluginManager.ts +10 -6
- package/front_end/models/har/Log.snapshot.txt +193 -0
- package/front_end/models/har/Log.ts +3 -2
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +14 -5
- package/front_end/models/issues_manager/CheckFormsIssuesTrigger.ts +8 -9
- package/front_end/models/issues_manager/RelatedIssue.ts +10 -8
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/logs/RequestResolver.ts +2 -2
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +0 -5
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +8 -6
- package/front_end/models/source_map_scopes/NamesResolver.ts +36 -30
- package/front_end/models/stack_trace/StackTrace.ts +17 -0
- package/front_end/models/trace/handlers/FramesHandler.ts +4 -7
- package/front_end/models/trace/handlers/ModelHandlers.ts +0 -1
- package/front_end/models/trace/handlers/RendererHandler.ts +2 -15
- package/front_end/models/trace/handlers/Threads.ts +4 -11
- package/front_end/models/trace/insights/DOMSize.ts +1 -1
- package/front_end/models/workspace/WorkspaceImpl.ts +1 -10
- package/front_end/panels/application/ApplicationPanelSidebar.ts +0 -44
- package/front_end/panels/application/CookieItemsView.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +1 -1
- package/front_end/panels/application/IndexedDBModel.ts +0 -10
- package/front_end/panels/application/IndexedDBViews.ts +240 -164
- package/front_end/panels/application/ServiceWorkersView.ts +494 -411
- package/front_end/panels/application/SharedStorageModel.ts +0 -10
- package/front_end/panels/application/application.ts +0 -6
- package/front_end/panels/application/components/AdsView.ts +23 -0
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +1 -1
- package/front_end/panels/application/components/adsView.css +21 -1
- package/front_end/panels/application/components/components.ts +0 -2
- package/front_end/panels/application/indexedDBViews.css +1 -1
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +1 -1
- package/front_end/panels/application/serviceWorkersView.css +40 -4
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +147 -123
- package/front_end/panels/common/ExtensionServer.ts +3 -3
- package/front_end/panels/console/ConsoleView.ts +1 -1
- package/front_end/panels/emulation/DeviceModeView.ts +139 -70
- package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +53 -12
- package/front_end/panels/network/NetworkDataGridNode.ts +43 -1
- package/front_end/panels/network/RequestInitiatorView.ts +24 -2
- package/front_end/panels/network/RequestPayloadView.ts +77 -39
- package/front_end/panels/network/components/ResponseHeaderSection.ts +5 -3
- package/front_end/panels/network/networkLogView.css +5 -0
- package/front_end/panels/network/requestInitiatorViewTree.css +5 -0
- package/front_end/panels/profiler/HeapProfileView.ts +198 -79
- package/front_end/panels/profiler/HeapSnapshotView.ts +2 -2
- package/front_end/panels/recorder/README.md +1 -2
- package/front_end/panels/recorder/RecorderPanel.ts +1749 -17
- package/front_end/panels/recorder/recorder.ts +0 -2
- package/front_end/panels/settings/AISettingsTab.ts +13 -0
- package/front_end/panels/sources/SourcesNavigator.ts +3 -2
- package/front_end/panels/sources/SourcesView.ts +0 -17
- package/front_end/panels/sources/UISourceCodeFrame.ts +42 -0
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +0 -17
- package/front_end/panels/timeline/ThreadAppender.ts +0 -106
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/report_view/ReportView.ts +11 -5
- package/front_end/ui/components/report_view/report.css +4 -1
- package/front_end/ui/components/spinners/Spinner.ts +29 -32
- package/front_end/ui/components/spinners/spinner.css +32 -84
- package/front_end/ui/legacy/TextPrompt.ts +49 -1
- package/front_end/ui/legacy/Treeoutline.ts +14 -6
- package/front_end/ui/legacy/UIUtils.ts +36 -11
- package/front_end/ui/legacy/Widget.ts +17 -10
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +2 -2
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +36 -7
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +63 -68
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/objectValue.css +2 -1
- package/front_end/ui/legacy/inspectorCommon.css +4 -4
- package/front_end/ui/legacy/textPrompt.css +10 -0
- package/front_end/ui/lit/lit.ts +1 -0
- package/front_end/ui/lit/render.ts +44 -10
- package/front_end/ui/lit/strip-whitespace.ts +23 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
- package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
- package/front_end/panels/application/InterestGroupStorageModel.ts +0 -81
- package/front_end/panels/application/InterestGroupStorageView.ts +0 -151
- package/front_end/panels/application/InterestGroupTreeElement.ts +0 -65
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +0 -135
- package/front_end/panels/application/components/interestGroupAccessGrid.css +0 -27
- package/front_end/panels/application/interestGroupStorageView.css +0 -9
- package/front_end/panels/recorder/RecorderController.ts +0 -1595
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +0 -149
- /package/front_end/panels/recorder/{recorderController.css → recorderPanel.css} +0 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// See https://bugs.webkit.org/show_bug.cgi?id=58127 for details.
|
|
10
10
|
|
|
11
11
|
import * as Common from '../../core/common/common.js';
|
|
12
|
-
import
|
|
12
|
+
import * as Platform from '../../core/platform/platform.js';
|
|
13
13
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
14
14
|
import type * as Protocol from '../../generated/protocol.js';
|
|
15
15
|
|
|
@@ -33,7 +33,8 @@ export class Log {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
private creator(): Creator {
|
|
36
|
-
const
|
|
36
|
+
const userAgent = Platform.HostRuntime.HOST_RUNTIME.getUserAgent();
|
|
37
|
+
const webKitVersion = /AppleWebKit\/([^ ]+)/.exec(userAgent);
|
|
37
38
|
|
|
38
39
|
return {name: 'WebInspector', version: webKitVersion ? webKitVersion[1] : 'n/a'};
|
|
39
40
|
}
|
|
@@ -11,6 +11,7 @@ import type * as HeapSnapshotModel from './HeapSnapshotModel.js';
|
|
|
11
11
|
|
|
12
12
|
export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<HeapSnapshotWorkerProxy.EventTypes> {
|
|
13
13
|
readonly eventHandler: (arg0: string, arg1: string) => void;
|
|
14
|
+
#console: Common.Console.Console;
|
|
14
15
|
nextObjectId = 1;
|
|
15
16
|
nextCallId = 1;
|
|
16
17
|
callbacks = new Map<number, (...args: any[]) => void>();
|
|
@@ -19,9 +20,14 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
19
20
|
interval?: number;
|
|
20
21
|
readonly workerUrl?: string;
|
|
21
22
|
|
|
22
|
-
constructor(
|
|
23
|
+
constructor(
|
|
24
|
+
eventHandler: (arg0: string, arg1: string) => void,
|
|
25
|
+
console: Common.Console.Console,
|
|
26
|
+
workerUrl?: string,
|
|
27
|
+
) {
|
|
23
28
|
super();
|
|
24
29
|
this.eventHandler = eventHandler;
|
|
30
|
+
this.#console = console;
|
|
25
31
|
this.workerUrl = workerUrl;
|
|
26
32
|
this.worker = Platform.HostRuntime.HOST_RUNTIME.createWorker(
|
|
27
33
|
workerUrl ?? import.meta.resolve('../../entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js'),
|
|
@@ -29,6 +35,10 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
29
35
|
this.worker.onmessage = this.messageReceived.bind(this);
|
|
30
36
|
}
|
|
31
37
|
|
|
38
|
+
get console(): Common.Console.Console {
|
|
39
|
+
return this.#console;
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
createLoader(profileUid: number, snapshotReceivedCallback: (arg0: HeapSnapshotProxy) => void):
|
|
33
43
|
HeapSnapshotLoaderProxy {
|
|
34
44
|
const objectId = this.nextObjectId++;
|
|
@@ -159,9 +169,8 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
159
169
|
return;
|
|
160
170
|
}
|
|
161
171
|
if (data.error) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
Common.Console.Console.instance().error(data['errorCallStack']);
|
|
172
|
+
this.#console.error(`An error occurred when a call to method '${data.errorMethodName}' was requested`);
|
|
173
|
+
this.#console.error(data['errorCallStack']);
|
|
165
174
|
this.callbacks.delete(data.callId);
|
|
166
175
|
return;
|
|
167
176
|
}
|
|
@@ -238,7 +247,7 @@ export class HeapSnapshotLoaderProxy extends HeapSnapshotProxyObject implements
|
|
|
238
247
|
|
|
239
248
|
async close(): Promise<void> {
|
|
240
249
|
await this.callMethodPromise('close');
|
|
241
|
-
const secondWorker = new HeapSnapshotWorkerProxy(() => {}, this.worker.workerUrl);
|
|
250
|
+
const secondWorker = new HeapSnapshotWorkerProxy(() => {}, this.worker.console, this.worker.workerUrl);
|
|
242
251
|
const channel = new MessageChannel();
|
|
243
252
|
await secondWorker.setupForSecondaryInit(channel.port2);
|
|
244
253
|
const snapshotProxy = await this.callFactoryMethodPromise('buildSnapshot', HeapSnapshotProxy, [channel.port1]);
|
|
@@ -3,20 +3,19 @@
|
|
|
3
3
|
// Use of this source code is governed by a BSD-style license that can be
|
|
4
4
|
// found in the LICENSE file.
|
|
5
5
|
import type * as Common from '../../core/common/common.js';
|
|
6
|
+
import * as Root from '../../core/root/root.js';
|
|
6
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Responsible for asking autofill for current form issues. This currently happens when devtools is first open.
|
|
10
11
|
*/
|
|
11
12
|
// TODO(crbug.com/1399414): Trigger check form issues when an element with an associated issue is editted in the issues panel.
|
|
12
|
-
let checkFormsIssuesTriggerInstance: CheckFormsIssuesTrigger|null = null;
|
|
13
13
|
export class CheckFormsIssuesTrigger {
|
|
14
|
-
constructor() {
|
|
15
|
-
SDK.
|
|
16
|
-
|
|
17
|
-
{scoped: true});
|
|
14
|
+
constructor(targetManager: SDK.TargetManager.TargetManager = SDK.TargetManager.TargetManager.instance()) {
|
|
15
|
+
targetManager.addModelListener(SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.Load,
|
|
16
|
+
this.#pageLoaded, this, {scoped: true});
|
|
18
17
|
|
|
19
|
-
for (const model of
|
|
18
|
+
for (const model of targetManager.models(SDK.ResourceTreeModel.ResourceTreeModel)) {
|
|
20
19
|
if (model.target().outermostTarget() !== model.target()) {
|
|
21
20
|
continue;
|
|
22
21
|
}
|
|
@@ -26,10 +25,10 @@ export class CheckFormsIssuesTrigger {
|
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
static instance({forceNew}: {forceNew: boolean} = {forceNew: false}): CheckFormsIssuesTrigger {
|
|
29
|
-
if (!
|
|
30
|
-
|
|
28
|
+
if (!Root.DevToolsContext.globalInstance().has(CheckFormsIssuesTrigger) || forceNew) {
|
|
29
|
+
Root.DevToolsContext.globalInstance().set(CheckFormsIssuesTrigger, new CheckFormsIssuesTrigger());
|
|
31
30
|
}
|
|
32
|
-
return
|
|
31
|
+
return Root.DevToolsContext.globalInstance().get(CheckFormsIssuesTrigger);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
// TODO(crbug.com/1399414): Handle response by dropping current issues in favor of new ones.
|
|
@@ -6,7 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
7
|
|
|
8
8
|
import type {Issue, IssueCategory} from './Issue.js';
|
|
9
|
-
import {IssuesManager} from './IssuesManager.js';
|
|
9
|
+
import type {IssuesManager} from './IssuesManager.js';
|
|
10
10
|
|
|
11
11
|
export type IssuesAssociatable = Readonly<SDK.NetworkRequest.NetworkRequest>|SDK.Cookie.Cookie|string;
|
|
12
12
|
|
|
@@ -45,24 +45,26 @@ export function issuesAssociatedWith(issues: Issue[], obj: IssuesAssociatable):
|
|
|
45
45
|
throw new Error(`issues can not be associated with ${JSON.stringify(obj)}`);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export function hasIssues(obj: IssuesAssociatable): boolean {
|
|
49
|
-
const issues = Array.from(
|
|
48
|
+
export function hasIssues(obj: IssuesAssociatable, issuesManager: IssuesManager): boolean {
|
|
49
|
+
const issues = Array.from(issuesManager.issues());
|
|
50
50
|
return issuesAssociatedWith(issues, obj).length > 0;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export function hasIssueOfCategory(obj: IssuesAssociatable, category: IssueCategory
|
|
54
|
-
|
|
53
|
+
export function hasIssueOfCategory(obj: IssuesAssociatable, category: IssueCategory,
|
|
54
|
+
issuesManager: IssuesManager): boolean {
|
|
55
|
+
const issues = Array.from(issuesManager.issues());
|
|
55
56
|
return issuesAssociatedWith(issues, obj).some(issue => issue.getCategory() === category);
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
export async function reveal(obj: IssuesAssociatable,
|
|
59
|
+
export async function reveal(obj: IssuesAssociatable, issuesManager: IssuesManager,
|
|
60
|
+
category?: IssueCategory): Promise<void|undefined> {
|
|
59
61
|
if (typeof obj === 'string') {
|
|
60
|
-
const issue =
|
|
62
|
+
const issue = issuesManager.getIssueById(obj);
|
|
61
63
|
if (issue) {
|
|
62
64
|
return await Common.Revealer.reveal(issue);
|
|
63
65
|
}
|
|
64
66
|
}
|
|
65
|
-
const issues = Array.from(
|
|
67
|
+
const issues = Array.from(issuesManager.issues());
|
|
66
68
|
const candidates = issuesAssociatedWith(issues, obj).filter(issue => !category || issue.getCategory() === category);
|
|
67
69
|
if (candidates.length > 0) {
|
|
68
70
|
return await Common.Revealer.reveal(candidates[0]);
|
|
@@ -6,7 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
7
7
|
import type * as Protocol from '../../generated/protocol.js';
|
|
8
8
|
|
|
9
|
-
import {Events as NetworkLogEvents, NetworkLog} from './NetworkLog.js';
|
|
9
|
+
import {Events as NetworkLogEvents, type NetworkLog} from './NetworkLog.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* A class that facilitates resolving a requestId to a network request. If the requestId does not resolve, a listener
|
|
@@ -22,7 +22,7 @@ export class RequestResolver extends
|
|
|
22
22
|
private networkListener: Common.EventTarget.EventDescriptor|null = null;
|
|
23
23
|
private networkLog: NetworkLog;
|
|
24
24
|
|
|
25
|
-
constructor(networkLog: NetworkLog
|
|
25
|
+
constructor(networkLog: NetworkLog) {
|
|
26
26
|
super();
|
|
27
27
|
this.networkLog = networkLog;
|
|
28
28
|
}
|
|
@@ -6,7 +6,6 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import * as Root from '../../core/root/root.js';
|
|
9
|
-
import type * as SDK from '../../core/sdk/sdk.js';
|
|
10
9
|
import type {ContentDataOrError} from '../text_utils/ContentData.js';
|
|
11
10
|
import type {SearchMatch} from '../text_utils/ContentProvider.js';
|
|
12
11
|
import * as Workspace from '../workspace/workspace.js';
|
|
@@ -169,10 +168,6 @@ export class FileSystem implements Workspace.Workspace.Project {
|
|
|
169
168
|
uiSourceCodes(): Iterable<Workspace.UISourceCode.UISourceCode> {
|
|
170
169
|
return [];
|
|
171
170
|
}
|
|
172
|
-
|
|
173
|
-
target(): SDK.Target.Target|null {
|
|
174
|
-
return null;
|
|
175
|
-
}
|
|
176
171
|
}
|
|
177
172
|
|
|
178
173
|
/**
|
|
@@ -216,17 +216,18 @@ function createFunctionCode(
|
|
|
216
216
|
*/
|
|
217
217
|
export async function getFunctionCodeFromLocation(
|
|
218
218
|
target: SDK.Target.Target, url: Platform.DevToolsPath.UrlString, line: number, column: number,
|
|
219
|
-
options?: CreateFunctionCodeOptions
|
|
219
|
+
options?: CreateFunctionCodeOptions,
|
|
220
|
+
debuggerWorkspaceBinding =
|
|
221
|
+
Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()): Promise<FunctionCode|null> {
|
|
220
222
|
const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);
|
|
221
223
|
if (!debuggerModel) {
|
|
222
224
|
throw new Error('missing debugger model');
|
|
223
225
|
}
|
|
224
226
|
|
|
225
227
|
let uiSourceCode: Workspace.UISourceCode.UISourceCode|null = null;
|
|
226
|
-
const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
|
|
227
228
|
const projects = debuggerWorkspaceBinding.workspace.projectsForType(Workspace.Workspace.projectTypes.Network);
|
|
228
229
|
for (const project of projects) {
|
|
229
|
-
if (
|
|
230
|
+
if (Bindings.NetworkProject.NetworkProject.getTargetForProject(project) !== target) {
|
|
230
231
|
continue;
|
|
231
232
|
}
|
|
232
233
|
uiSourceCode = project.uiSourceCodeForURL(url);
|
|
@@ -245,7 +246,7 @@ export async function getFunctionCodeFromLocation(
|
|
|
245
246
|
return null;
|
|
246
247
|
}
|
|
247
248
|
|
|
248
|
-
return await getFunctionCodeFromRawLocation(rawLocation, options);
|
|
249
|
+
return await getFunctionCodeFromRawLocation(rawLocation, options, debuggerWorkspaceBinding);
|
|
249
250
|
}
|
|
250
251
|
|
|
251
252
|
async function format(uiSourceCode: Workspace.UISourceCode.UISourceCode, content: string,
|
|
@@ -264,8 +265,9 @@ async function format(uiSourceCode: Workspace.UISourceCode.UISourceCode, content
|
|
|
264
265
|
* Returns a {@link FunctionCode} for the given raw location.
|
|
265
266
|
*/
|
|
266
267
|
export async function getFunctionCodeFromRawLocation(
|
|
267
|
-
rawLocation: SDK.DebuggerModel.Location, options?: CreateFunctionCodeOptions
|
|
268
|
-
|
|
268
|
+
rawLocation: SDK.DebuggerModel.Location, options?: CreateFunctionCodeOptions,
|
|
269
|
+
debuggerWorkspaceBinding =
|
|
270
|
+
Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()): Promise<FunctionCode|null> {
|
|
269
271
|
const functionBounds = await debuggerWorkspaceBinding.functionBoundsAtRawLocation(rawLocation);
|
|
270
272
|
if (!functionBounds) {
|
|
271
273
|
return null;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import * as Common from '../../core/common/common.js';
|
|
6
5
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
6
|
import * as Protocol from '../../generated/protocol.js';
|
|
8
7
|
import * as Bindings from '../bindings/bindings.js';
|
|
@@ -190,7 +189,11 @@ const enum Punctuation {
|
|
|
190
189
|
|
|
191
190
|
const resolveDebuggerScope = async(scope: SDK.DebuggerModel.ScopeChainEntry):
|
|
192
191
|
Promise<{variableMapping: Map<string, string>, thisMapping: string | null}> => {
|
|
193
|
-
if (!
|
|
192
|
+
if (!scope.callFrame()
|
|
193
|
+
.debuggerModel.target()
|
|
194
|
+
.targetManager()
|
|
195
|
+
.settings.moduleSetting('js-source-maps-enabled')
|
|
196
|
+
.get()) {
|
|
194
197
|
return {variableMapping: new Map(), thisMapping: null};
|
|
195
198
|
}
|
|
196
199
|
const script = scope.callFrame().script;
|
|
@@ -278,16 +281,17 @@ const resolveScope = async(script: SDK.Script.Script, scopeChain: Formatter.Form
|
|
|
278
281
|
|
|
279
282
|
async function resolveSourceName(
|
|
280
283
|
script: SDK.Script.Script, sourceMap: SDK.SourceMap.SourceMap, name: string,
|
|
281
|
-
position: {lineNumber: number, columnNumber: number}
|
|
284
|
+
position: {lineNumber: number, columnNumber: number},
|
|
285
|
+
debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding =
|
|
286
|
+
Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()): Promise<string|null> {
|
|
282
287
|
const ranges = sourceMap.findEntryRanges(position.lineNumber, position.columnNumber);
|
|
283
288
|
if (!ranges) {
|
|
284
289
|
return null;
|
|
285
290
|
}
|
|
286
291
|
// Extract the underlying text from the compiled code's range and make sure that
|
|
287
292
|
// it starts with the identifier |name|.
|
|
288
|
-
const uiSourceCode =
|
|
289
|
-
|
|
290
|
-
script.debuggerModel, ranges.sourceURL, script.isContentScript());
|
|
293
|
+
const uiSourceCode = debuggerWorkspaceBinding.uiSourceCodeForSourceMapSourceURL(
|
|
294
|
+
script.debuggerModel, ranges.sourceURL, script.isContentScript());
|
|
291
295
|
if (!uiSourceCode) {
|
|
292
296
|
return null;
|
|
293
297
|
}
|
|
@@ -363,24 +367,27 @@ const resolveScope = async(script: SDK.Script.Script, scopeChain: Formatter.Form
|
|
|
363
367
|
};
|
|
364
368
|
|
|
365
369
|
export const resolveScopeChain =
|
|
366
|
-
async function(callFrame: SDK.DebuggerModel.CallFrame
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
370
|
+
async function(callFrame: SDK.DebuggerModel.CallFrame,
|
|
371
|
+
debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding =
|
|
372
|
+
Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()):
|
|
373
|
+
Promise<SDK.DebuggerModel.ScopeChainEntry[]> {
|
|
374
|
+
const {pluginManager} = debuggerWorkspaceBinding;
|
|
375
|
+
const scopeChain: SDK.DebuggerModel.ScopeChainEntry[]|null|undefined =
|
|
376
|
+
await pluginManager.resolveScopeChain(callFrame);
|
|
377
|
+
if (scopeChain) {
|
|
378
|
+
return scopeChain;
|
|
379
|
+
}
|
|
373
380
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
381
|
+
// TODO(crbug.com/465968290): Re-enable creating the scope chain from the source map once:
|
|
382
|
+
// 1) We have a flag indicating whether the source map contained variable/binding information.
|
|
383
|
+
// 2) We have a chrome feature flag.
|
|
377
384
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
};
|
|
385
|
+
if (callFrame.script.isWasm()) {
|
|
386
|
+
return callFrame.scopeChain();
|
|
387
|
+
}
|
|
388
|
+
const thisObject = await resolveThisObject(callFrame);
|
|
389
|
+
return callFrame.scopeChain().map(scope => new ScopeWithSourceMappedVariables(scope, thisObject));
|
|
390
|
+
};
|
|
384
391
|
|
|
385
392
|
/**
|
|
386
393
|
* @returns A mapping from original name -> compiled name. If the orignal name is unavailable (e.g. because the compiled name was
|
|
@@ -388,7 +395,7 @@ export const resolveScopeChain =
|
|
|
388
395
|
*/
|
|
389
396
|
export const allVariablesInCallFrame =
|
|
390
397
|
async(callFrame: SDK.DebuggerModel.CallFrame): Promise<Map<string, string|null>> => {
|
|
391
|
-
if (!
|
|
398
|
+
if (!callFrame.debuggerModel.target().targetManager().settings.moduleSetting('js-source-maps-enabled').get()) {
|
|
392
399
|
return new Map<string, string|null>();
|
|
393
400
|
}
|
|
394
401
|
const cachedMap = cachedMapByCallFrame.get(callFrame);
|
|
@@ -424,13 +431,13 @@ export const allVariablesInCallFrame =
|
|
|
424
431
|
export const allVariablesAtPosition =
|
|
425
432
|
async(location: SDK.DebuggerModel.Location): Promise<Map<string, string|null>> => {
|
|
426
433
|
const reverseMapping = new Map<string, string|null>();
|
|
427
|
-
if (!Common.Settings.Settings.instance().moduleSetting('js-source-maps-enabled').get()) {
|
|
428
|
-
return reverseMapping;
|
|
429
|
-
}
|
|
430
434
|
const script = location.script();
|
|
431
435
|
if (!script) {
|
|
432
436
|
return reverseMapping;
|
|
433
437
|
}
|
|
438
|
+
if (!script.debuggerModel.target().targetManager().settings.moduleSetting('js-source-maps-enabled').get()) {
|
|
439
|
+
return reverseMapping;
|
|
440
|
+
}
|
|
434
441
|
|
|
435
442
|
const scopeTreeAndText = await computeScopeTree(script);
|
|
436
443
|
if (!scopeTreeAndText) {
|
|
@@ -727,8 +734,9 @@ export async function resolveDebuggerFrameFunctionName(frame: SDK.DebuggerModel.
|
|
|
727
734
|
}
|
|
728
735
|
|
|
729
736
|
export async function resolveProfileFrameFunctionName(
|
|
730
|
-
{scriptId, lineNumber, columnNumber}: Partial<Protocol.Runtime.CallFrame>,
|
|
731
|
-
|
|
737
|
+
{scriptId, lineNumber, columnNumber}: Partial<Protocol.Runtime.CallFrame>, target: SDK.Target.Target|null,
|
|
738
|
+
debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding =
|
|
739
|
+
Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()): Promise<string|null> {
|
|
732
740
|
if (!target || lineNumber === undefined || columnNumber === undefined || scriptId === undefined) {
|
|
733
741
|
return null;
|
|
734
742
|
}
|
|
@@ -738,8 +746,6 @@ export async function resolveProfileFrameFunctionName(
|
|
|
738
746
|
if (!debuggerModel || !script) {
|
|
739
747
|
return null;
|
|
740
748
|
}
|
|
741
|
-
|
|
742
|
-
const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
|
|
743
749
|
const location = new SDK.DebuggerModel.Location(debuggerModel, scriptId, lineNumber, columnNumber);
|
|
744
750
|
const functionInfoFromPlugin = await debuggerWorkspaceBinding.pluginManager.getFunctionInfo(script, location);
|
|
745
751
|
if (functionInfoFromPlugin && 'frames' in functionInfoFromPlugin) {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
7
|
+
import type * as Protocol from '../../generated/protocol.js';
|
|
7
8
|
import type * as Workspace from '../workspace/workspace.js';
|
|
8
9
|
|
|
9
10
|
export type StackTrace = BaseStackTrace<Fragment>;
|
|
@@ -131,3 +132,19 @@ export class DebuggableFrameFlavor {
|
|
|
131
132
|
return DebuggableFrameFlavor.#last;
|
|
132
133
|
}
|
|
133
134
|
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Returns whether the given stack trace originated from a direct console
|
|
138
|
+
* invocation. A console-originated stack trace has exactly one frame with
|
|
139
|
+
* no url and no function name.
|
|
140
|
+
*
|
|
141
|
+
* TODO(crbug.com/40726969): Accept a translated `StackTrace` instead of a raw `Protocol.Runtime.StackTrace`.
|
|
142
|
+
*/
|
|
143
|
+
export function isConsoleOriginated(stackTrace: Protocol.Runtime.StackTrace): boolean {
|
|
144
|
+
const callFrames = stackTrace.callFrames;
|
|
145
|
+
if (callFrames.length !== 1) {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
const frame = callFrames[0];
|
|
149
|
+
return frame.url === '' && frame.functionName === '';
|
|
150
|
+
}
|
|
@@ -6,7 +6,6 @@ import * as Platform from '../../../core/platform/platform.js';
|
|
|
6
6
|
import * as Helpers from '../helpers/helpers.js';
|
|
7
7
|
import * as Types from '../types/types.js';
|
|
8
8
|
|
|
9
|
-
import {type AuctionWorkletsData, data as auctionWorkletsData} from './AuctionWorkletsHandler.js';
|
|
10
9
|
import {data as layerTreeHandlerData, type LayerTreeData} from './LayerTreeHandler.js';
|
|
11
10
|
import {data as metaHandlerData, type MetaHandlerData} from './MetaHandler.js';
|
|
12
11
|
import {data as rendererHandlerData, type RendererHandlerData} from './RendererHandler.js';
|
|
@@ -81,7 +80,6 @@ export async function finalize(): Promise<void> {
|
|
|
81
80
|
const modelForTrace = new TimelineFrameModel(
|
|
82
81
|
relevantFrameEvents,
|
|
83
82
|
rendererHandlerData(),
|
|
84
|
-
auctionWorkletsData(),
|
|
85
83
|
metaHandlerData(),
|
|
86
84
|
layerTreeHandlerData(),
|
|
87
85
|
);
|
|
@@ -101,7 +99,7 @@ export function data(): FramesData {
|
|
|
101
99
|
}
|
|
102
100
|
|
|
103
101
|
export function deps(): HandlerName[] {
|
|
104
|
-
return ['Meta', 'Renderer', '
|
|
102
|
+
return ['Meta', 'Renderer', 'LayerTree'];
|
|
105
103
|
}
|
|
106
104
|
|
|
107
105
|
export class TimelineFrameModel {
|
|
@@ -122,13 +120,12 @@ export class TimelineFrameModel {
|
|
|
122
120
|
#activeThreadId: Types.Events.ThreadID|null = null;
|
|
123
121
|
#layerTreeData: LayerTreeData;
|
|
124
122
|
|
|
125
|
-
constructor(
|
|
126
|
-
|
|
127
|
-
auctionWorkletsData: AuctionWorkletsData, metaData: MetaHandlerData, layerTreeData: LayerTreeData) {
|
|
123
|
+
constructor(allEvents: readonly Types.Events.Event[], rendererData: RendererHandlerData, metaData: MetaHandlerData,
|
|
124
|
+
layerTreeData: LayerTreeData) {
|
|
128
125
|
// We only care about getting threads from the Renderer, not Samples,
|
|
129
126
|
// because Frames don't exist in a CPU Profile (which won't have Renderer
|
|
130
127
|
// threads.)
|
|
131
|
-
const mainThreads = Threads.threadsInRenderer(rendererData
|
|
128
|
+
const mainThreads = Threads.threadsInRenderer(rendererData).filter(thread => {
|
|
132
129
|
return thread.type === Threads.ThreadType.MAIN_THREAD && thread.processIsOnMainFrame;
|
|
133
130
|
});
|
|
134
131
|
const threadData = mainThreads.map(thread => {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
export * as AnimationFrames from './AnimationFramesHandler.js';
|
|
6
6
|
export * as Animations from './AnimationHandler.js';
|
|
7
7
|
export * as AsyncJSCalls from './AsyncJSCallsHandler.js';
|
|
8
|
-
export * as AuctionWorklets from './AuctionWorkletsHandler.js';
|
|
9
8
|
export * as DOMStats from './DOMStatsHandler.js';
|
|
10
9
|
export * as ExtensionTraceData from './ExtensionTraceDataHandler.js';
|
|
11
10
|
export * as Flows from './FlowsHandler.js';
|
|
@@ -6,7 +6,6 @@ import * as Platform from '../../../core/platform/platform.js';
|
|
|
6
6
|
import * as Helpers from '../helpers/helpers.js';
|
|
7
7
|
import * as Types from '../types/types.js';
|
|
8
8
|
|
|
9
|
-
import {data as auctionWorkletsData} from './AuctionWorkletsHandler.js';
|
|
10
9
|
import * as HandlerHelpers from './helpers.js';
|
|
11
10
|
import {data as metaHandlerData, type FrameProcessData} from './MetaHandler.js';
|
|
12
11
|
import {data as networkRequestHandlerData} from './NetworkRequestsHandler.js';
|
|
@@ -248,7 +247,6 @@ export function assignThreadName(
|
|
|
248
247
|
* - Deletes processes with an unknown origin.
|
|
249
248
|
*/
|
|
250
249
|
export function sanitizeProcesses(processes: Map<Types.Events.ProcessID, RendererProcess>): void {
|
|
251
|
-
const auctionWorklets = auctionWorkletsData().worklets;
|
|
252
250
|
const metaData = metaHandlerData();
|
|
253
251
|
if (metaData.traceIsGeneric) {
|
|
254
252
|
return;
|
|
@@ -258,19 +256,8 @@ export function sanitizeProcesses(processes: Map<Types.Events.ProcessID, Rendere
|
|
|
258
256
|
// parsed for some reason, or if it's an "about:" origin, delete it.
|
|
259
257
|
// This is done because we don't really care about processes for which we
|
|
260
258
|
// can't provide actionable insights to the user (e.g. about:blank pages).
|
|
261
|
-
//
|
|
262
|
-
// There is one exception; AuctionWorklet processes get parsed in a
|
|
263
|
-
// separate handler, so at this point we check to see if the process has
|
|
264
|
-
// been found by the AuctionWorkletsHandler, and if so we update the URL.
|
|
265
|
-
// This ensures that we keep this process around and do not drop it due to
|
|
266
|
-
// the lack of a URL.
|
|
267
259
|
if (process.url === null) {
|
|
268
|
-
|
|
269
|
-
if (maybeWorklet) {
|
|
270
|
-
process.url = maybeWorklet.host;
|
|
271
|
-
} else {
|
|
272
|
-
processes.delete(pid);
|
|
273
|
-
}
|
|
260
|
+
processes.delete(pid);
|
|
274
261
|
continue;
|
|
275
262
|
}
|
|
276
263
|
}
|
|
@@ -392,7 +379,7 @@ export function makeCompleteEvent(event: Types.Events.Begin|Types.Events.End): T
|
|
|
392
379
|
}
|
|
393
380
|
|
|
394
381
|
export function deps(): HandlerName[] {
|
|
395
|
-
return ['Meta', 'Samples', '
|
|
382
|
+
return ['Meta', 'Samples', 'NetworkRequests'];
|
|
396
383
|
}
|
|
397
384
|
|
|
398
385
|
export interface RendererHandlerData {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import type * as Helpers from '../helpers/helpers.js';
|
|
6
6
|
import type * as Types from '../types/types.js';
|
|
7
7
|
|
|
8
|
-
import type {AuctionWorkletsData} from './AuctionWorkletsHandler.js';
|
|
9
8
|
import type * as Renderer from './RendererHandler.js';
|
|
10
9
|
import type {HandlerData} from './types.js';
|
|
11
10
|
|
|
@@ -24,15 +23,12 @@ export const enum ThreadType {
|
|
|
24
23
|
MAIN_THREAD = 'MAIN_THREAD',
|
|
25
24
|
WORKER = 'WORKER',
|
|
26
25
|
RASTERIZER = 'RASTERIZER',
|
|
27
|
-
AUCTION_WORKLET = 'AUCTION_WORKLET',
|
|
28
26
|
OTHER = 'OTHER',
|
|
29
27
|
CPU_PROFILE = 'CPU_PROFILE',
|
|
30
28
|
THREAD_POOL = 'THREAD_POOL',
|
|
31
29
|
}
|
|
32
30
|
|
|
33
|
-
function getThreadTypeForRendererThread(
|
|
34
|
-
pid: Types.Events.ProcessID, thread: Renderer.RendererThread,
|
|
35
|
-
auctionWorkletsData: AuctionWorkletsData): ThreadType {
|
|
31
|
+
function getThreadTypeForRendererThread(pid: Types.Events.ProcessID, thread: Renderer.RendererThread): ThreadType {
|
|
36
32
|
let threadType = ThreadType.OTHER;
|
|
37
33
|
if (thread.name === 'CrRendererMain') {
|
|
38
34
|
threadType = ThreadType.MAIN_THREAD;
|
|
@@ -40,8 +36,6 @@ function getThreadTypeForRendererThread(
|
|
|
40
36
|
threadType = ThreadType.WORKER;
|
|
41
37
|
} else if (thread.name?.startsWith('CompositorTileWorker')) {
|
|
42
38
|
threadType = ThreadType.RASTERIZER;
|
|
43
|
-
} else if (auctionWorkletsData.worklets.has(pid)) {
|
|
44
|
-
threadType = ThreadType.AUCTION_WORKLET;
|
|
45
39
|
} else if (thread.name?.startsWith('ThreadPool')) {
|
|
46
40
|
// TODO(paulirish): perhaps exclude ThreadPoolServiceThread entirely
|
|
47
41
|
threadType = ThreadType.THREAD_POOL;
|
|
@@ -49,8 +43,7 @@ function getThreadTypeForRendererThread(
|
|
|
49
43
|
return threadType;
|
|
50
44
|
}
|
|
51
45
|
|
|
52
|
-
export function threadsInRenderer(
|
|
53
|
-
rendererData: Renderer.RendererHandlerData, auctionWorkletsData: AuctionWorkletsData): readonly ThreadData[] {
|
|
46
|
+
export function threadsInRenderer(rendererData: Renderer.RendererHandlerData): readonly ThreadData[] {
|
|
54
47
|
const foundThreads: ThreadData[] = [];
|
|
55
48
|
// If we have Renderer threads, we prefer to use those. In the event that a
|
|
56
49
|
// trace is a CPU Profile trace, we will never have Renderer threads, so we
|
|
@@ -65,7 +58,7 @@ export function threadsInRenderer(
|
|
|
65
58
|
// filtering we need.
|
|
66
59
|
continue;
|
|
67
60
|
}
|
|
68
|
-
const threadType = getThreadTypeForRendererThread(pid, thread
|
|
61
|
+
const threadType = getThreadTypeForRendererThread(pid, thread);
|
|
69
62
|
foundThreads.push({
|
|
70
63
|
name: thread.name,
|
|
71
64
|
pid,
|
|
@@ -99,7 +92,7 @@ export function threadsInTrace(handlerData: HandlerData): readonly ThreadData[]
|
|
|
99
92
|
}
|
|
100
93
|
|
|
101
94
|
// If we have Renderer threads, we prefer to use those.
|
|
102
|
-
const threadsFromRenderer = threadsInRenderer(handlerData.Renderer
|
|
95
|
+
const threadsFromRenderer = threadsInRenderer(handlerData.Renderer);
|
|
103
96
|
if (threadsFromRenderer.length) {
|
|
104
97
|
threadsInHandlerDataCache.set(handlerData, threadsFromRenderer);
|
|
105
98
|
return threadsFromRenderer;
|
|
@@ -117,7 +117,7 @@ export function generateInsight(data: Handlers.Types.HandlerData, context: Insig
|
|
|
117
117
|
const largeLayoutUpdates: Types.Events.Layout[] = [];
|
|
118
118
|
const largeStyleRecalcs: Types.Events.RecalcStyle[] = [];
|
|
119
119
|
|
|
120
|
-
const threads = Handlers.Threads.threadsInRenderer(data.Renderer
|
|
120
|
+
const threads = Handlers.Threads.threadsInRenderer(data.Renderer);
|
|
121
121
|
for (const thread of threads) {
|
|
122
122
|
if (thread.type !== Handlers.Threads.ThreadType.MAIN_THREAD) {
|
|
123
123
|
continue;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as Root from '../../core/root/root.js';
|
|
8
|
-
import type * as SDK from '../../core/sdk/sdk.js';
|
|
9
8
|
import type * as TextUtils from '../text_utils/text_utils.js';
|
|
10
9
|
|
|
11
10
|
import type {SearchConfig} from './SearchConfig.js';
|
|
@@ -55,7 +54,6 @@ export interface Project {
|
|
|
55
54
|
* @returns an iterator for the sources provided by this project.
|
|
56
55
|
*/
|
|
57
56
|
uiSourceCodes(): Iterable<UISourceCode>;
|
|
58
|
-
target(): SDK.Target.Target|null;
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
/* eslint-disable @typescript-eslint/naming-convention -- Used by web_tests. */
|
|
@@ -76,15 +74,12 @@ export abstract class ProjectStore implements Project {
|
|
|
76
74
|
readonly #type: projectTypes;
|
|
77
75
|
readonly #displayName: string;
|
|
78
76
|
readonly #uiSourceCodes = new Map<Platform.DevToolsPath.UrlString, UISourceCode>();
|
|
79
|
-
readonly #target: SDK.Target.Target|null = null;
|
|
80
77
|
|
|
81
|
-
constructor(workspace: WorkspaceImpl, id: string, type: projectTypes, displayName: string
|
|
82
|
-
target: SDK.Target.Target|null = null) {
|
|
78
|
+
constructor(workspace: WorkspaceImpl, id: string, type: projectTypes, displayName: string) {
|
|
83
79
|
this.#workspace = workspace;
|
|
84
80
|
this.#id = id;
|
|
85
81
|
this.#type = type;
|
|
86
82
|
this.#displayName = displayName;
|
|
87
|
-
this.#target = target;
|
|
88
83
|
}
|
|
89
84
|
|
|
90
85
|
id(): string {
|
|
@@ -140,10 +135,6 @@ export abstract class ProjectStore implements Project {
|
|
|
140
135
|
return this.#uiSourceCodes.values();
|
|
141
136
|
}
|
|
142
137
|
|
|
143
|
-
target(): SDK.Target.Target|null {
|
|
144
|
-
return this.#target;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
138
|
renameUISourceCode(uiSourceCode: UISourceCode, newName: string): void {
|
|
148
139
|
const oldPath = uiSourceCode.url();
|
|
149
140
|
const newPath = uiSourceCode.parentURL() ?
|