chrome-devtools-frontend 1.0.1698733 → 1.0.1700561
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-verification/SKILL.md +19 -0
- package/.agents/skills/{repro-flaky-tests → fix-tests}/SKILL.md +2 -2
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +2 -2
- package/front_end/core/sdk/DOMModel.ts +3 -5
- package/front_end/core/sdk/NetworkManager.ts +2 -2
- package/front_end/core/sdk/OverlayModel.ts +11 -12
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +3 -0
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +84 -32
- package/front_end/core/sdk/StorageBucketsModel.ts +2 -0
- package/front_end/entrypoints/main/GlobalAiButton.ts +2 -6
- package/front_end/entrypoints/main/MainImpl.ts +8 -1
- package/front_end/generated/InspectorBackendCommands.ts +12 -2
- package/front_end/generated/SupportedCSSProperties.ts +14 -0
- package/front_end/generated/protocol-mapping.d.ts +48 -1
- package/front_end/generated/protocol-proxy-api.d.ts +37 -1
- package/front_end/generated/protocol.ts +131 -0
- package/front_end/models/bindings/NetworkProject.ts +30 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +62 -0
- package/front_end/models/change_tracker/ChangeTracker.ts +1 -1
- package/front_end/models/comment_manager/CD4ABridge.ts +2 -2
- package/front_end/models/comment_manager/CommentManager.ts +18 -0
- package/front_end/models/emulation/DeviceModeModel.ts +1 -1
- package/front_end/models/extensions/ExtensionAPI.ts +4 -2
- package/front_end/models/issues_manager/CookieIssue.ts +0 -15
- package/front_end/models/persistence/NetworkPersistenceManager.ts +29 -4
- package/front_end/models/source_map_scopes/NamesResolver.ts +34 -4
- package/front_end/models/source_map_scopes/ScopeChainModel.ts +31 -7
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +281 -3
- package/front_end/panels/accessibility/accessibilityAnnouncementRecordingView.css +85 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -2
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +5 -8
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/application/AppManifestView.ts +128 -134
- package/front_end/panels/application/CrashReportContextView.ts +6 -6
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +17 -17
- package/front_end/panels/application/DeviceBoundSessionsView.ts +136 -137
- package/front_end/panels/application/IndexedDBModel.ts +3 -0
- package/front_end/panels/application/IndexedDBViews.ts +1 -1
- package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -0
- package/front_end/panels/application/OriginTrialTreeView.ts +18 -23
- package/front_end/panels/application/ReportingApiTreeElement.ts +3 -3
- package/front_end/panels/application/ReportingApiView.ts +6 -14
- package/front_end/panels/application/application-meta.ts +7 -7
- package/front_end/panels/application/components/AdsView.ts +63 -1
- package/front_end/panels/application/components/adsView.css +11 -1
- package/front_end/panels/common/CommentThreadWidget.ts +20 -22
- package/front_end/panels/common/CommentsOverlayWidget.ts +115 -9
- package/front_end/panels/common/CommentsStatusBarPill.ts +13 -1
- package/front_end/panels/common/ExtensionServer.ts +43 -34
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
- package/front_end/panels/common/commentThreadWidget.css +6 -0
- package/front_end/panels/common/common-meta.ts +4 -1
- package/front_end/panels/elements/CSSRuleValidator.ts +1 -1
- package/front_end/panels/elements/ElementsPanel.ts +4 -4
- package/front_end/panels/elements/ElementsTreeElement.ts +9 -2
- package/front_end/panels/elements/ElementsTreeOutline.ts +25 -33
- package/front_end/panels/elements/elementsTreeOutline.css +8 -4
- package/front_end/panels/event_listeners/EventListenersView.ts +9 -4
- package/front_end/panels/issues/IssuesPane.ts +34 -22
- package/front_end/panels/lighthouse/LighthouseController.ts +1 -1
- package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +17 -15
- package/front_end/panels/recorder/RecordingView.ts +32 -53
- package/front_end/panels/recorder/StepView.ts +19 -4
- package/front_end/panels/recorder/TimelineSection.ts +1 -1
- package/front_end/panels/recorder/controlButton.css +6 -0
- package/front_end/panels/recorder/recordingView.css +11 -2
- package/front_end/panels/settings/BackendLinkingSettingsTab.ts +2 -1
- package/front_end/panels/settings/EditFileSystemView.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +137 -56
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +17 -15
- package/front_end/panels/timeline/components/DetailsView.ts +3 -3
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +0 -2
- package/front_end/panels/timeline/components/LiveMetricsView.ts +59 -64
- package/front_end/panels/timeline/components/OriginMap.ts +1 -1
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +2 -3
- package/front_end/panels/timeline/components/liveMetricsView.css +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1580 -1524
- package/front_end/third_party/lighthouse/locales/ar-XB.json +111 -72
- package/front_end/third_party/lighthouse/locales/ar.json +113 -74
- package/front_end/third_party/lighthouse/locales/bg.json +112 -73
- package/front_end/third_party/lighthouse/locales/ca.json +112 -73
- package/front_end/third_party/lighthouse/locales/cs.json +112 -73
- package/front_end/third_party/lighthouse/locales/da.json +112 -73
- package/front_end/third_party/lighthouse/locales/de.json +112 -73
- package/front_end/third_party/lighthouse/locales/el.json +112 -73
- package/front_end/third_party/lighthouse/locales/en-GB.json +111 -72
- package/front_end/third_party/lighthouse/locales/en-US.json +102 -66
- package/front_end/third_party/lighthouse/locales/en-XA.json +111 -72
- package/front_end/third_party/lighthouse/locales/en-XL.json +102 -66
- package/front_end/third_party/lighthouse/locales/es-419.json +112 -73
- package/front_end/third_party/lighthouse/locales/es.json +112 -73
- package/front_end/third_party/lighthouse/locales/fi.json +112 -73
- package/front_end/third_party/lighthouse/locales/fil.json +112 -73
- package/front_end/third_party/lighthouse/locales/fr.json +112 -73
- package/front_end/third_party/lighthouse/locales/he.json +112 -73
- package/front_end/third_party/lighthouse/locales/hi.json +112 -73
- package/front_end/third_party/lighthouse/locales/hr.json +112 -73
- package/front_end/third_party/lighthouse/locales/hu.json +112 -73
- package/front_end/third_party/lighthouse/locales/id.json +112 -73
- package/front_end/third_party/lighthouse/locales/it.json +113 -74
- package/front_end/third_party/lighthouse/locales/ja.json +112 -73
- package/front_end/third_party/lighthouse/locales/ko.json +112 -73
- package/front_end/third_party/lighthouse/locales/lt.json +112 -73
- package/front_end/third_party/lighthouse/locales/lv.json +112 -73
- package/front_end/third_party/lighthouse/locales/nl.json +112 -73
- package/front_end/third_party/lighthouse/locales/no.json +112 -73
- package/front_end/third_party/lighthouse/locales/pl.json +112 -73
- package/front_end/third_party/lighthouse/locales/pt-PT.json +112 -73
- package/front_end/third_party/lighthouse/locales/pt.json +112 -73
- package/front_end/third_party/lighthouse/locales/ro.json +112 -73
- package/front_end/third_party/lighthouse/locales/ru.json +112 -73
- package/front_end/third_party/lighthouse/locales/sk.json +112 -73
- package/front_end/third_party/lighthouse/locales/sl.json +112 -73
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +112 -73
- package/front_end/third_party/lighthouse/locales/sr.json +112 -73
- package/front_end/third_party/lighthouse/locales/sv.json +124 -85
- package/front_end/third_party/lighthouse/locales/ta.json +112 -73
- package/front_end/third_party/lighthouse/locales/te.json +112 -73
- package/front_end/third_party/lighthouse/locales/th.json +112 -73
- package/front_end/third_party/lighthouse/locales/tr.json +113 -74
- package/front_end/third_party/lighthouse/locales/uk.json +112 -73
- package/front_end/third_party/lighthouse/locales/vi.json +112 -73
- package/front_end/third_party/lighthouse/locales/zh-HK.json +112 -73
- package/front_end/third_party/lighthouse/locales/zh-TW.json +113 -74
- package/front_end/third_party/lighthouse/locales/zh.json +113 -74
- package/front_end/third_party/lighthouse/report/bundle.d.ts +4 -4
- package/front_end/third_party/lighthouse/report/bundle.js +10 -3
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +2 -2
- package/front_end/third_party/lit/lit.ts +3 -0
- package/front_end/third_party/lit/package.json +3 -0
- package/front_end/third_party/lit/rebuild.sh +3 -2
- package/front_end/ui/comments/CommentAnchorResolver.ts +8 -2
- package/front_end/ui/comments/CommentOverlayManager.ts +2 -1
- package/front_end/ui/components/buttons/Button.ts +19 -1
- package/front_end/ui/legacy/ContextMenu.ts +16 -1
- package/front_end/ui/legacy/InspectorView.ts +4 -3
- package/front_end/ui/legacy/PlusButton.ts +5 -6
- package/front_end/ui/legacy/TabbedPane.ts +121 -80
- package/front_end/ui/legacy/Treeoutline.ts +37 -6
- package/front_end/ui/legacy/UIUtils.ts +7 -0
- package/front_end/ui/legacy/Widget.ts +33 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +3 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +14 -4
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +157 -171
- package/front_end/ui/lit/lit.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
- package/inspector_overlay/highlight_anchor.ts +197 -0
- package/inspector_overlay/tool_highlight.ts +8 -0
- package/package.json +1 -1
- package/.agents/skills/devtools-ci/SKILL.md +0 -65
- package/.agents/skills/evaluate-ai-css-completion/SKILL.md +0 -143
- package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +0 -104
- package/.agents/skills/fixing-skipped-tests/SKILL.md +0 -32
- package/.agents/skills/gerrit-cli/SKILL.md +0 -74
- package/.agents/skills/gerrit-cli/references/commands.md +0 -169
- package/.agents/skills/gerrit-cli/references/workflows.md +0 -63
- package/.agents/skills/gerrit-cli/scripts/import_upstream.py +0 -85
- package/front_end/models/issues_manager/descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +0 -4
|
@@ -3368,11 +3368,21 @@ declare namespace ProtocolProxyApi {
|
|
|
3368
3368
|
invoke_getManifestIcons(): Promise<Protocol.Page.GetManifestIconsResponse>;
|
|
3369
3369
|
|
|
3370
3370
|
/**
|
|
3371
|
-
* Returns the unique (PWA) app id.
|
|
3371
|
+
* Returns the unique (PWA) app id, along with IWA bundle ID and parent app info.
|
|
3372
3372
|
* Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
|
|
3373
3373
|
*/
|
|
3374
3374
|
invoke_getAppId(): Promise<Protocol.Page.GetAppIdResponse>;
|
|
3375
3375
|
|
|
3376
|
+
/**
|
|
3377
|
+
* Returns the list of installed child Sub-Apps for the inspected parent app.
|
|
3378
|
+
*/
|
|
3379
|
+
invoke_getSubApps(): Promise<Protocol.Page.GetSubAppsResponse>;
|
|
3380
|
+
|
|
3381
|
+
/**
|
|
3382
|
+
* Returns the list of sibling Sub-Apps sharing the same parent app if the inspected context is a Sub-App.
|
|
3383
|
+
*/
|
|
3384
|
+
invoke_getSiblingSubApps(): Promise<Protocol.Page.GetSiblingSubAppsResponse>;
|
|
3385
|
+
|
|
3376
3386
|
invoke_getAdScriptAncestry(params: Protocol.Page.GetAdScriptAncestryRequest): Promise<Protocol.Page.GetAdScriptAncestryResponse>;
|
|
3377
3387
|
|
|
3378
3388
|
/**
|
|
@@ -4315,6 +4325,27 @@ declare namespace ProtocolProxyApi {
|
|
|
4315
4325
|
*/
|
|
4316
4326
|
invoke_clearTrustTokens(params: Protocol.Storage.ClearTrustTokensRequest): Promise<Protocol.Storage.ClearTrustTokensResponse>;
|
|
4317
4327
|
|
|
4328
|
+
/**
|
|
4329
|
+
* Returns all stored Private Verification Tokens for the current browsing
|
|
4330
|
+
* context.
|
|
4331
|
+
*/
|
|
4332
|
+
invoke_getPrivateVerificationTokens(): Promise<Protocol.Storage.GetPrivateVerificationTokensResponse>;
|
|
4333
|
+
|
|
4334
|
+
/**
|
|
4335
|
+
* Removes all Private Verification Tokens issued by the provided issuerOrigin.
|
|
4336
|
+
*/
|
|
4337
|
+
invoke_clearPrivateVerificationTokens(params: Protocol.Storage.ClearPrivateVerificationTokensRequest): Promise<Protocol.ProtocolResponseWithError>;
|
|
4338
|
+
|
|
4339
|
+
/**
|
|
4340
|
+
* Removes a specific Private Verification Token by its ID.
|
|
4341
|
+
*/
|
|
4342
|
+
invoke_deletePrivateVerificationToken(params: Protocol.Storage.DeletePrivateVerificationTokenRequest): Promise<Protocol.ProtocolResponseWithError>;
|
|
4343
|
+
|
|
4344
|
+
/**
|
|
4345
|
+
* Set tracking for Private Verification Tokens.
|
|
4346
|
+
*/
|
|
4347
|
+
invoke_setPrivateVerificationTokensTracking(params: Protocol.Storage.SetPrivateVerificationTokensTrackingRequest): Promise<Protocol.ProtocolResponseWithError>;
|
|
4348
|
+
|
|
4318
4349
|
/**
|
|
4319
4350
|
* Set tracking for a storage key's buckets.
|
|
4320
4351
|
*/
|
|
@@ -4362,6 +4393,11 @@ declare namespace ProtocolProxyApi {
|
|
|
4362
4393
|
|
|
4363
4394
|
storageBucketDeleted(params: Protocol.Storage.StorageBucketDeletedEvent): void;
|
|
4364
4395
|
|
|
4396
|
+
/**
|
|
4397
|
+
* Private Verification Tokens have been stored or deleted.
|
|
4398
|
+
*/
|
|
4399
|
+
privateVerificationTokensUpdated(): void;
|
|
4400
|
+
|
|
4365
4401
|
}
|
|
4366
4402
|
|
|
4367
4403
|
export interface SystemInfoApi {
|
|
@@ -13855,6 +13855,48 @@ export namespace Overlay {
|
|
|
13855
13855
|
Apca = 'apca',
|
|
13856
13856
|
}
|
|
13857
13857
|
|
|
13858
|
+
/**
|
|
13859
|
+
* Configuration for Inset-Modified Containing Block (IMCB) and CSS Anchor Positioning highlight.
|
|
13860
|
+
*/
|
|
13861
|
+
export interface ImcbHighlightConfig {
|
|
13862
|
+
/**
|
|
13863
|
+
* Border color for the Inset-Modified Containing Block (default: transparent).
|
|
13864
|
+
*/
|
|
13865
|
+
imcbBorderColor?: DOM.RGBA;
|
|
13866
|
+
/**
|
|
13867
|
+
* Background fill color for the Inset-Modified Containing Block (default: transparent).
|
|
13868
|
+
*/
|
|
13869
|
+
imcbBackgroundColor?: DOM.RGBA;
|
|
13870
|
+
/**
|
|
13871
|
+
* Fill color for the inset modifiers area (difference between CB and IMCB).
|
|
13872
|
+
*/
|
|
13873
|
+
insetsBackgroundColor?: DOM.RGBA;
|
|
13874
|
+
/**
|
|
13875
|
+
* Hatch color for the inset modifiers area.
|
|
13876
|
+
*/
|
|
13877
|
+
insetsHatchColor?: DOM.RGBA;
|
|
13878
|
+
/**
|
|
13879
|
+
* Border color for the referenced target anchor element(s) (when element is anchor-positioned).
|
|
13880
|
+
*/
|
|
13881
|
+
anchorBorderColor?: DOM.RGBA;
|
|
13882
|
+
/**
|
|
13883
|
+
* Background fill color for the referenced target anchor element(s) (when element is anchor-positioned).
|
|
13884
|
+
*/
|
|
13885
|
+
anchorBackgroundColor?: DOM.RGBA;
|
|
13886
|
+
/**
|
|
13887
|
+
* Whether to render the 3x3 position-area grid lines when position-area is used.
|
|
13888
|
+
*/
|
|
13889
|
+
showPositionAreaGrid?: boolean;
|
|
13890
|
+
/**
|
|
13891
|
+
* Line color for the 3x3 position-area grid lines.
|
|
13892
|
+
*/
|
|
13893
|
+
positionAreaGridLineColor?: DOM.RGBA;
|
|
13894
|
+
/**
|
|
13895
|
+
* Fill color for the active region within the position-area grid.
|
|
13896
|
+
*/
|
|
13897
|
+
positionAreaActiveRegionColor?: DOM.RGBA;
|
|
13898
|
+
}
|
|
13899
|
+
|
|
13858
13900
|
/**
|
|
13859
13901
|
* Configuration data for the highlighting of page elements.
|
|
13860
13902
|
*/
|
|
@@ -13935,6 +13977,10 @@ export namespace Overlay {
|
|
|
13935
13977
|
* The container query container highlight configuration (default: all transparent).
|
|
13936
13978
|
*/
|
|
13937
13979
|
containerQueryContainerHighlightConfig?: ContainerQueryContainerHighlightConfig;
|
|
13980
|
+
/**
|
|
13981
|
+
* The IMCB highlight configuration (default: all transparent).
|
|
13982
|
+
*/
|
|
13983
|
+
imcbHighlightConfig?: ImcbHighlightConfig;
|
|
13938
13984
|
}
|
|
13939
13985
|
|
|
13940
13986
|
export const enum ColorFormat {
|
|
@@ -15485,6 +15531,25 @@ export namespace Page {
|
|
|
15485
15531
|
themeColor?: string;
|
|
15486
15532
|
}
|
|
15487
15533
|
|
|
15534
|
+
export interface SubApp {
|
|
15535
|
+
/**
|
|
15536
|
+
* Display name of the sub-app.
|
|
15537
|
+
*/
|
|
15538
|
+
name: string;
|
|
15539
|
+
/**
|
|
15540
|
+
* Scope of the sub-app.
|
|
15541
|
+
*/
|
|
15542
|
+
scope: string;
|
|
15543
|
+
/**
|
|
15544
|
+
* Manifest id of the sub-app.
|
|
15545
|
+
*/
|
|
15546
|
+
manifestId: string;
|
|
15547
|
+
/**
|
|
15548
|
+
* Start URL of the sub-app.
|
|
15549
|
+
*/
|
|
15550
|
+
startUrl: string;
|
|
15551
|
+
}
|
|
15552
|
+
|
|
15488
15553
|
/**
|
|
15489
15554
|
* The type of a frameNavigated event.
|
|
15490
15555
|
*/
|
|
@@ -15895,6 +15960,22 @@ export namespace Page {
|
|
|
15895
15960
|
* Recommendation for manifest's id attribute to match current id computed from start_url
|
|
15896
15961
|
*/
|
|
15897
15962
|
recommendedId?: string;
|
|
15963
|
+
/**
|
|
15964
|
+
* The bundle ID for an Isolated Web App (IWA)
|
|
15965
|
+
*/
|
|
15966
|
+
bundleId?: string;
|
|
15967
|
+
/**
|
|
15968
|
+
* The name of the parent app if this app is a Sub-App
|
|
15969
|
+
*/
|
|
15970
|
+
parentAppName?: string;
|
|
15971
|
+
}
|
|
15972
|
+
|
|
15973
|
+
export interface GetSubAppsResponse extends ProtocolResponseWithError {
|
|
15974
|
+
subApps: SubApp[];
|
|
15975
|
+
}
|
|
15976
|
+
|
|
15977
|
+
export interface GetSiblingSubAppsResponse extends ProtocolResponseWithError {
|
|
15978
|
+
subApps: SubApp[];
|
|
15898
15979
|
}
|
|
15899
15980
|
|
|
15900
15981
|
export interface GetAdScriptAncestryRequest {
|
|
@@ -18392,6 +18473,40 @@ export namespace Storage {
|
|
|
18392
18473
|
count: number;
|
|
18393
18474
|
}
|
|
18394
18475
|
|
|
18476
|
+
/**
|
|
18477
|
+
* Details of a stored Private Verification Token.
|
|
18478
|
+
*/
|
|
18479
|
+
export interface PrivateVerificationToken {
|
|
18480
|
+
/**
|
|
18481
|
+
* Unique identifier of the token in the database.
|
|
18482
|
+
*/
|
|
18483
|
+
id: string;
|
|
18484
|
+
/**
|
|
18485
|
+
* Origin of the token issuer.
|
|
18486
|
+
*/
|
|
18487
|
+
issuerOrigin: string;
|
|
18488
|
+
/**
|
|
18489
|
+
* Public key ID used to issue the token.
|
|
18490
|
+
*/
|
|
18491
|
+
keyId: integer;
|
|
18492
|
+
/**
|
|
18493
|
+
* Expiration timestamp in seconds since the epoch.
|
|
18494
|
+
*/
|
|
18495
|
+
expiration: Network.TimeSinceEpoch;
|
|
18496
|
+
/**
|
|
18497
|
+
* Token creation timestamp in seconds since the epoch.
|
|
18498
|
+
*/
|
|
18499
|
+
creationTime: Network.TimeSinceEpoch;
|
|
18500
|
+
/**
|
|
18501
|
+
* Token protocol version.
|
|
18502
|
+
*/
|
|
18503
|
+
version: integer;
|
|
18504
|
+
/**
|
|
18505
|
+
* Base64-encoded serialized token.
|
|
18506
|
+
*/
|
|
18507
|
+
token: string;
|
|
18508
|
+
}
|
|
18509
|
+
|
|
18395
18510
|
export const enum StorageBucketsDurability {
|
|
18396
18511
|
Relaxed = 'relaxed',
|
|
18397
18512
|
Strict = 'strict',
|
|
@@ -18619,6 +18734,22 @@ export namespace Storage {
|
|
|
18619
18734
|
didDeleteTokens: boolean;
|
|
18620
18735
|
}
|
|
18621
18736
|
|
|
18737
|
+
export interface GetPrivateVerificationTokensResponse extends ProtocolResponseWithError {
|
|
18738
|
+
tokens: PrivateVerificationToken[];
|
|
18739
|
+
}
|
|
18740
|
+
|
|
18741
|
+
export interface ClearPrivateVerificationTokensRequest {
|
|
18742
|
+
issuerOrigin: string;
|
|
18743
|
+
}
|
|
18744
|
+
|
|
18745
|
+
export interface DeletePrivateVerificationTokenRequest {
|
|
18746
|
+
tokenId: string;
|
|
18747
|
+
}
|
|
18748
|
+
|
|
18749
|
+
export interface SetPrivateVerificationTokensTrackingRequest {
|
|
18750
|
+
enable: boolean;
|
|
18751
|
+
}
|
|
18752
|
+
|
|
18622
18753
|
export interface SetStorageBucketTrackingRequest {
|
|
18623
18754
|
storageKey: string;
|
|
18624
18755
|
enable: boolean;
|
|
@@ -15,6 +15,7 @@ const uiSourceCodeToAttributionMap = new WeakMap<Workspace.UISourceCode.UISource
|
|
|
15
15
|
|
|
16
16
|
export class NetworkProjectManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
17
17
|
readonly #projectToTargetMap = new WeakMap<Workspace.Workspace.Project, SDK.Target.Target>();
|
|
18
|
+
readonly #sourceURLSynthesizedUISourceCodes = new WeakSet<Workspace.UISourceCode.UISourceCode>();
|
|
18
19
|
|
|
19
20
|
static instance({forceNew}: {
|
|
20
21
|
forceNew: boolean,
|
|
@@ -41,6 +42,14 @@ export class NetworkProjectManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
41
42
|
getTargetForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): SDK.Target.Target|null {
|
|
42
43
|
return this.#projectToTargetMap.get(uiSourceCode.project()) ?? null;
|
|
43
44
|
}
|
|
45
|
+
|
|
46
|
+
setSourceURLSynthesized(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
|
|
47
|
+
this.#sourceURLSynthesizedUISourceCodes.add(uiSourceCode);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
isSourceURLSynthesized(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {
|
|
51
|
+
return this.#sourceURLSynthesizedUISourceCodes.has(uiSourceCode);
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
54
|
|
|
46
55
|
export const enum Events {
|
|
@@ -59,6 +68,27 @@ export interface EventTypes {
|
|
|
59
68
|
}
|
|
60
69
|
|
|
61
70
|
export class NetworkProject {
|
|
71
|
+
/**
|
|
72
|
+
* Records that `uiSourceCode` was synthesized from a `//# sourceURL=` annotation,
|
|
73
|
+
* and therefore doesn't correspond to an actual network resource.
|
|
74
|
+
*/
|
|
75
|
+
static setSourceURLSynthesized(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
|
|
76
|
+
// eslint-disable-next-line @devtools/no-instance-of-migrated-singletons
|
|
77
|
+
NetworkProjectManager.instance().setSourceURLSynthesized(uiSourceCode);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Whether `uiSourceCode` was synthesized from a `//# sourceURL=` annotation.
|
|
82
|
+
*
|
|
83
|
+
* Both the URL and the content of such a source are fully controlled by the page,
|
|
84
|
+
* so it must never be treated like a genuine network resource (for example it must
|
|
85
|
+
* not be persisted as a local override, see b/553931271).
|
|
86
|
+
*/
|
|
87
|
+
static isSourceURLSynthesized(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {
|
|
88
|
+
// eslint-disable-next-line @devtools/no-instance-of-migrated-singletons
|
|
89
|
+
return NetworkProjectManager.instance().isSourceURLSynthesized(uiSourceCode);
|
|
90
|
+
}
|
|
91
|
+
|
|
62
92
|
static resolveFrame(uiSourceCode: Workspace.UISourceCode.UISourceCode, frameId: Protocol.Page.FrameId):
|
|
63
93
|
SDK.ResourceTreeModel.ResourceTreeFrame|null {
|
|
64
94
|
const target = NetworkProject.targetForUISourceCode(uiSourceCode);
|
|
@@ -14,6 +14,19 @@ import {type DebuggerSourceMapping, DebuggerWorkspaceBinding} from './DebuggerWo
|
|
|
14
14
|
import {NetworkProject} from './NetworkProject.js';
|
|
15
15
|
import {metadataForURL} from './ResourceUtils.js';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* The security origin of the URL that `target` (or its closest ancestor that has
|
|
19
|
+
* one) is inspecting, or `null` if none of them has an inspected URL yet.
|
|
20
|
+
*/
|
|
21
|
+
function inspectedSecurityOrigin(target: SDK.Target.Target): SDK.SecurityOrigin.SecurityOrigin|null {
|
|
22
|
+
for (let current: SDK.Target.Target|null = target; current; current = current.parentTarget()) {
|
|
23
|
+
if (current.inspectedURL()) {
|
|
24
|
+
return current.inspectedSecurityOrigin();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
export class ResourceScriptMapping implements DebuggerSourceMapping {
|
|
18
31
|
readonly debuggerModel: SDK.DebuggerModel.DebuggerModel;
|
|
19
32
|
#workspace: Workspace.Workspace.WorkspaceImpl;
|
|
@@ -197,6 +210,19 @@ export class ResourceScriptMapping implements DebuggerSourceMapping {
|
|
|
197
210
|
// Try to resolve `//# sourceURL=` annotations relative to
|
|
198
211
|
// the base URL, according to the sourcemap specification.
|
|
199
212
|
url = SDK.SourceMapManager.SourceMapManager.resolveRelativeSourceURL(script.debuggerModel.target(), url);
|
|
213
|
+
|
|
214
|
+
// `//# sourceURL=` annotations are fully controlled by the page, so don't let
|
|
215
|
+
// them impersonate a resource of a different origin (b/553931271).
|
|
216
|
+
if (!this.#isTrustworthySourceURL(script, url)) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Don't let a synthetic source evict the `UISourceCode` of a script that was
|
|
221
|
+
// actually fetched from the network under the same URL.
|
|
222
|
+
const previousUISourceCode = this.project(script).uiSourceCodeForURL(url);
|
|
223
|
+
if (previousUISourceCode && !NetworkProject.isSourceURLSynthesized(previousUISourceCode)) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
200
226
|
} else {
|
|
201
227
|
// Ignore inline <script>s without `//# sourceURL` annotation here.
|
|
202
228
|
if (script.isInlineScript()) {
|
|
@@ -225,6 +251,9 @@ export class ResourceScriptMapping implements DebuggerSourceMapping {
|
|
|
225
251
|
// Create UISourceCode.
|
|
226
252
|
const originalContentProvider = script.originalContentProvider();
|
|
227
253
|
const uiSourceCode = project.createUISourceCode(url, originalContentProvider.contentType());
|
|
254
|
+
if (script.hasSourceURL) {
|
|
255
|
+
NetworkProject.setSourceURLSynthesized(uiSourceCode);
|
|
256
|
+
}
|
|
228
257
|
NetworkProject.setInitialFrameAttribution(uiSourceCode, script.frameId);
|
|
229
258
|
const metadata = metadataForURL(this.debuggerModel.target(), script.frameId, url);
|
|
230
259
|
|
|
@@ -238,6 +267,39 @@ export class ResourceScriptMapping implements DebuggerSourceMapping {
|
|
|
238
267
|
void this.debuggerWorkspaceBinding.updateLocations(script);
|
|
239
268
|
}
|
|
240
269
|
|
|
270
|
+
/**
|
|
271
|
+
* Whether the (already resolved) `//# sourceURL=` annotation `url` of `script` may
|
|
272
|
+
* be used as-is.
|
|
273
|
+
*
|
|
274
|
+
* Only `http(s)` URLs can collide with genuine network resources, so an origin is
|
|
275
|
+
* only enforced for those. Annotations using other schemes (e.g. `webpack-internal://`,
|
|
276
|
+
* `snippet://` or `chrome-extension://` for content scripts) cannot impersonate a
|
|
277
|
+
* network resource and are always accepted.
|
|
278
|
+
*
|
|
279
|
+
* The origin of the script's frame is authoritative. For targets that don't have a
|
|
280
|
+
* frame (e.g. workers) we fall back to the inspected URL of the target (or of its
|
|
281
|
+
* closest ancestor that has one). If no origin can be established at all, the
|
|
282
|
+
* annotation is rejected, since we cannot rule out that it spoofs another origin.
|
|
283
|
+
*/
|
|
284
|
+
#isTrustworthySourceURL(script: SDK.Script.Script, url: Platform.DevToolsPath.UrlString): boolean {
|
|
285
|
+
if (script.isContentScript()) {
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
const parsedURL = Common.ParsedURL.ParsedURL.fromString(url);
|
|
289
|
+
if (!parsedURL || !['http', 'https'].includes(parsedURL.scheme)) {
|
|
290
|
+
return true;
|
|
291
|
+
}
|
|
292
|
+
const target = script.debuggerModel.target();
|
|
293
|
+
const frame = script.frameId ?
|
|
294
|
+
target.model(SDK.ResourceTreeModel.ResourceTreeModel)?.frameForId(script.frameId) ?? null :
|
|
295
|
+
null;
|
|
296
|
+
const securityOrigin = frame ? frame.securityOrigin() : inspectedSecurityOrigin(target);
|
|
297
|
+
if (!securityOrigin) {
|
|
298
|
+
return false;
|
|
299
|
+
}
|
|
300
|
+
return SDK.SecurityOrigin.SecurityOrigin.create(url).isSameOriginWith(securityOrigin);
|
|
301
|
+
}
|
|
302
|
+
|
|
241
303
|
scriptFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): ResourceScriptFile|null {
|
|
242
304
|
return this.#uiSourceCodeToScriptFile.get(uiSourceCode) || null;
|
|
243
305
|
}
|
|
@@ -25,7 +25,7 @@ export class ChangeTracker {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
get isTracking(): boolean {
|
|
28
|
-
return Boolean(Root.Runtime.hostConfig.devToolsComments?.enabled);
|
|
28
|
+
return Boolean(Root.Runtime.hostConfig.devToolsComments?.enabled) && this.#commentManager.isAgentAttached();
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
trackChange(
|
|
@@ -132,8 +132,8 @@ export class CD4ABridge extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
setAgentAttached(value: boolean): void {
|
|
136
|
+
this.#commentManager.setAgentAttached(value);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
resolveCommentThread(threadId: string, replyText?: string): boolean {
|
|
@@ -32,11 +32,13 @@ export {
|
|
|
32
32
|
export const enum Events {
|
|
33
33
|
COMMENT_THREADS_CHANGED = 'CommentThreadsChanged',
|
|
34
34
|
COMMENT_MODE_CHANGED = 'CommentModeChanged',
|
|
35
|
+
AGENT_ATTACHED_CHANGED = 'AgentAttachedChanged',
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
export interface EventTypes {
|
|
38
39
|
[Events.COMMENT_THREADS_CHANGED]: CommentThread[];
|
|
39
40
|
[Events.COMMENT_MODE_CHANGED]: boolean;
|
|
41
|
+
[Events.AGENT_ATTACHED_CHANGED]: boolean;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
/**
|
|
@@ -45,6 +47,7 @@ export interface EventTypes {
|
|
|
45
47
|
export class CommentManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
46
48
|
readonly #commentThreads = new Map<string, CommentThread>();
|
|
47
49
|
#commentMode = false;
|
|
50
|
+
#agentAttached = false;
|
|
48
51
|
|
|
49
52
|
constructor() {
|
|
50
53
|
super();
|
|
@@ -55,6 +58,21 @@ export class CommentManager extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
55
58
|
this.dispatchEventToListeners(Events.COMMENT_THREADS_CHANGED, this.getCommentThreads());
|
|
56
59
|
}
|
|
57
60
|
|
|
61
|
+
setAgentAttached(value: boolean): void {
|
|
62
|
+
if (this.#agentAttached === value) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this.#agentAttached = value;
|
|
66
|
+
if (!value) {
|
|
67
|
+
this.setCommentMode(false);
|
|
68
|
+
}
|
|
69
|
+
this.dispatchEventToListeners(Events.AGENT_ATTACHED_CHANGED, value);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
isAgentAttached(): boolean {
|
|
73
|
+
return this.#agentAttached;
|
|
74
|
+
}
|
|
75
|
+
|
|
58
76
|
setCommentMode(active: boolean): void {
|
|
59
77
|
if (this.#commentMode === active) {
|
|
60
78
|
return;
|
|
@@ -70,7 +70,7 @@ const UIStrings = {
|
|
|
70
70
|
* @description Error message shown on the Devices settings tab when the user enters an invalid
|
|
71
71
|
* device pixel ratio for a custom device.
|
|
72
72
|
*/
|
|
73
|
-
devicePixelRatioMustBeANumberOr: 'Device pixel ratio must be a number or blank
|
|
73
|
+
devicePixelRatioMustBeANumberOr: 'Device pixel ratio must be a number or blank',
|
|
74
74
|
/**
|
|
75
75
|
* @description Error message shown on the Devices settings tab when the user enters a device
|
|
76
76
|
* pixel ratio for a custom device that is too large.
|
|
@@ -1586,8 +1586,10 @@ globalThis.injectedExtensionAPI = function(
|
|
|
1586
1586
|
const targetDocument = targetWindowForTest?.document ?? document;
|
|
1587
1587
|
const focused = targetDocument.activeElement;
|
|
1588
1588
|
if (focused) {
|
|
1589
|
-
|
|
1590
|
-
|
|
1589
|
+
// Elements made editable through the EditContext API are not reported as contentEditable.
|
|
1590
|
+
const hasEditContext = 'editContext' in focused && Boolean(focused.editContext);
|
|
1591
|
+
const isInput = focused.nodeName === 'INPUT' || focused.nodeName === 'TEXTAREA' ||
|
|
1592
|
+
(focused as HTMLElement).isContentEditable || hasEditContext;
|
|
1591
1593
|
if (isInput && !(requestPayload.ctrlKey || requestPayload.altKey || requestPayload.metaKey)) {
|
|
1592
1594
|
return;
|
|
1593
1595
|
}
|
|
@@ -306,8 +306,6 @@ export function isCausedByThirdParty(
|
|
|
306
306
|
// site. Only cookies that have their domain also set to this third-party
|
|
307
307
|
// are included in the request. We assume that the cookie was set by the same
|
|
308
308
|
// third-party at some point, so we treat this as a third-party issue.
|
|
309
|
-
//
|
|
310
|
-
// TODO(crbug.com/1080589): Use "First-Party sets" instead of the sites registered domain.
|
|
311
309
|
return !isSubdomainOf(parsedCookieUrl.domain(), outermostFrame.domainAndRegistry());
|
|
312
310
|
}
|
|
313
311
|
|
|
@@ -403,11 +401,6 @@ const excludeDomainNonAscii: LazyMarkdownIssueDescription = {
|
|
|
403
401
|
links: [],
|
|
404
402
|
};
|
|
405
403
|
|
|
406
|
-
const excludeBlockedWithinRelatedWebsiteSet: LazyMarkdownIssueDescription = {
|
|
407
|
-
file: 'cookieExcludeBlockedWithinRelatedWebsiteSet.md',
|
|
408
|
-
links: [],
|
|
409
|
-
};
|
|
410
|
-
|
|
411
404
|
const cookieCrossSiteRedirectDowngrade: LazyMarkdownIssueDescription = {
|
|
412
405
|
file: 'cookieCrossSiteRedirectDowngrade.md',
|
|
413
406
|
links: [{
|
|
@@ -451,14 +444,6 @@ const issueDescriptions = new Map<string, LazyMarkdownIssueDescription>([
|
|
|
451
444
|
['CookieIssue::WarnDomainNonASCII::SetCookie', warnDomainNonAscii],
|
|
452
445
|
['CookieIssue::ExcludeDomainNonASCII::ReadCookie', excludeDomainNonAscii],
|
|
453
446
|
['CookieIssue::ExcludeDomainNonASCII::SetCookie', excludeDomainNonAscii],
|
|
454
|
-
[
|
|
455
|
-
'CookieIssue::ExcludeThirdPartyCookieBlockedInRelatedWebsiteSet::ReadCookie',
|
|
456
|
-
excludeBlockedWithinRelatedWebsiteSet,
|
|
457
|
-
],
|
|
458
|
-
[
|
|
459
|
-
'CookieIssue::ExcludeThirdPartyCookieBlockedInRelatedWebsiteSet::SetCookie',
|
|
460
|
-
excludeBlockedWithinRelatedWebsiteSet,
|
|
461
|
-
],
|
|
462
447
|
['CookieIssue::WarnThirdPartyPhaseout::ReadCookie', placeholderDescriptionForInvisibleIssues],
|
|
463
448
|
['CookieIssue::WarnThirdPartyPhaseout::SetCookie', placeholderDescriptionForInvisibleIssues],
|
|
464
449
|
['CookieIssue::WarnDeprecationTrialMetadata::ReadCookie', placeholderDescriptionForInvisibleIssues],
|
|
@@ -9,6 +9,7 @@ import * as Root from '../../core/root/root.js';
|
|
|
9
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
10
10
|
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
11
11
|
import * as Protocol from '../../generated/protocol.js';
|
|
12
|
+
import * as Bindings from '../bindings/bindings.js';
|
|
12
13
|
import * as Breakpoints from '../breakpoints/breakpoints.js';
|
|
13
14
|
import * as Workspace from '../workspace/workspace.js';
|
|
14
15
|
|
|
@@ -431,8 +432,32 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
|
431
432
|
}
|
|
432
433
|
|
|
433
434
|
isUISourceCodeOverridable(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {
|
|
434
|
-
|
|
435
|
-
|
|
435
|
+
if (uiSourceCode.project().type() !== Workspace.Workspace.projectTypes.Network) {
|
|
436
|
+
return false;
|
|
437
|
+
}
|
|
438
|
+
if (NetworkPersistenceManager.isForbiddenNetworkUrl(uiSourceCode.url())) {
|
|
439
|
+
return false;
|
|
440
|
+
}
|
|
441
|
+
// A `//# sourceURL=` annotation is fully controlled by the page and doesn't refer
|
|
442
|
+
// to an actual network resource, so there is nothing to override here. Persisting
|
|
443
|
+
// it would poison the overrides folder with a file that masquerades as a genuine
|
|
444
|
+
// resource (b/553931271).
|
|
445
|
+
if (Bindings.NetworkProject.NetworkProject.isSourceURLSynthesized(uiSourceCode)) {
|
|
446
|
+
return false;
|
|
447
|
+
}
|
|
448
|
+
return true;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Whether the contents of `uiSourceCode` may be written into the overrides folder.
|
|
453
|
+
*
|
|
454
|
+
* Sources that originate from a source map are overridable in the sense that the
|
|
455
|
+
* deployed resource they are mapped from can be overridden (see
|
|
456
|
+
* `PersistenceActions`), but their own URL and content are page controlled and
|
|
457
|
+
* must never be persisted themselves (b/553931271).
|
|
458
|
+
*/
|
|
459
|
+
#canPersistUISourceCodeAsOverride(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {
|
|
460
|
+
return this.isUISourceCodeOverridable(uiSourceCode) && !uiSourceCode.contentType().isFromSourceMap();
|
|
436
461
|
}
|
|
437
462
|
|
|
438
463
|
#isUISourceCodeAlreadyOverridden(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {
|
|
@@ -445,12 +470,12 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
|
445
470
|
}
|
|
446
471
|
|
|
447
472
|
#canSaveUISourceCodeForOverrides(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {
|
|
448
|
-
return this.#active && this
|
|
473
|
+
return this.#active && this.#canPersistUISourceCodeAsOverride(uiSourceCode) &&
|
|
449
474
|
!this.#isUISourceCodeAlreadyOverridden(uiSourceCode);
|
|
450
475
|
}
|
|
451
476
|
|
|
452
477
|
async setupAndStartLocalOverrides(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise<boolean> {
|
|
453
|
-
if (!this
|
|
478
|
+
if (!this.#canPersistUISourceCodeAsOverride(uiSourceCode)) {
|
|
454
479
|
return false;
|
|
455
480
|
}
|
|
456
481
|
// No overrides folder, set it up
|
|
@@ -2,6 +2,7 @@
|
|
|
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 Root from '../../core/root/root.js';
|
|
5
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
6
7
|
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
7
8
|
import * as Protocol from '../../generated/protocol.js';
|
|
@@ -380,9 +381,16 @@ export const resolveScopeChain =
|
|
|
380
381
|
return scopeChain;
|
|
381
382
|
}
|
|
382
383
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
384
|
+
if (Root.Runtime.hostConfig.devToolsSourceMapScopesInSourcesPanel?.enabled) {
|
|
385
|
+
let sourceMap = callFrame.script.sourceMap();
|
|
386
|
+
if (!sourceMap && callFrame.debuggerModel?.sourceMapManager) {
|
|
387
|
+
sourceMap = await callFrame.debuggerModel.sourceMapManager().sourceMapForClientPromise(callFrame.script);
|
|
388
|
+
}
|
|
389
|
+
const mappedScopeChain = sourceMap?.resolveScopeChain(callFrame);
|
|
390
|
+
if (mappedScopeChain) {
|
|
391
|
+
return mappedScopeChain;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
386
394
|
|
|
387
395
|
if (callFrame.script.isWasm()) {
|
|
388
396
|
return callFrame.scopeChain().filter(scope => !scope.empty());
|
|
@@ -537,6 +545,7 @@ class ScopeWithSourceMappedVariables implements SDK.DebuggerModel.ScopeChainEntr
|
|
|
537
545
|
/** The resolved `this` of the current call frame */
|
|
538
546
|
readonly #thisObject: SDK.RemoteObject.RemoteObject|null;
|
|
539
547
|
readonly #debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding;
|
|
548
|
+
#object?: SDK.RemoteObject.RemoteObject;
|
|
540
549
|
|
|
541
550
|
constructor(scope: SDK.DebuggerModel.ScopeChainEntry, thisObject: SDK.RemoteObject.RemoteObject|null,
|
|
542
551
|
debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding) {
|
|
@@ -566,7 +575,10 @@ class ScopeWithSourceMappedVariables implements SDK.DebuggerModel.ScopeChainEntr
|
|
|
566
575
|
}
|
|
567
576
|
|
|
568
577
|
object(): SDK.RemoteObject.RemoteObject {
|
|
569
|
-
|
|
578
|
+
if (!this.#object) {
|
|
579
|
+
this.#object = resolveScopeInObject(this.#debuggerScope, this.#debuggerWorkspaceBinding);
|
|
580
|
+
}
|
|
581
|
+
return this.#object;
|
|
570
582
|
}
|
|
571
583
|
|
|
572
584
|
description(): string {
|
|
@@ -591,6 +603,8 @@ export class RemoteObject extends SDK.RemoteObject.RemoteObject {
|
|
|
591
603
|
private readonly scope: SDK.DebuggerModel.ScopeChainEntry;
|
|
592
604
|
private readonly object: SDK.RemoteObject.RemoteObject;
|
|
593
605
|
readonly #debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding;
|
|
606
|
+
#allPropertiesPromise?: Promise<SDK.RemoteObject.GetPropertiesResult>;
|
|
607
|
+
#cachedWithPreview = false;
|
|
594
608
|
|
|
595
609
|
constructor(scope: SDK.DebuggerModel.ScopeChainEntry,
|
|
596
610
|
debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding) {
|
|
@@ -642,6 +656,18 @@ export class RemoteObject extends SDK.RemoteObject.RemoteObject {
|
|
|
642
656
|
|
|
643
657
|
override async getAllProperties(accessorPropertiesOnly: boolean, generatePreview: boolean):
|
|
644
658
|
Promise<SDK.RemoteObject.GetPropertiesResult> {
|
|
659
|
+
if (accessorPropertiesOnly) {
|
|
660
|
+
return await this.#resolveAllProperties(true, generatePreview);
|
|
661
|
+
}
|
|
662
|
+
if (!this.#allPropertiesPromise || (generatePreview && !this.#cachedWithPreview)) {
|
|
663
|
+
this.#cachedWithPreview = generatePreview;
|
|
664
|
+
this.#allPropertiesPromise = this.#resolveAllProperties(false, generatePreview);
|
|
665
|
+
}
|
|
666
|
+
return await this.#allPropertiesPromise;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
async #resolveAllProperties(accessorPropertiesOnly: boolean,
|
|
670
|
+
generatePreview: boolean): Promise<SDK.RemoteObject.GetPropertiesResult> {
|
|
645
671
|
const allProperties = await this.object.getAllProperties(accessorPropertiesOnly, generatePreview);
|
|
646
672
|
const {variableMapping} = await resolveDebuggerScope(this.scope, this.#debuggerWorkspaceBinding);
|
|
647
673
|
|
|
@@ -656,6 +682,8 @@ export class RemoteObject extends SDK.RemoteObject.RemoteObject {
|
|
|
656
682
|
|
|
657
683
|
override async setPropertyValue(argumentName: string|Protocol.Runtime.CallArgument, value: string):
|
|
658
684
|
Promise<string|undefined> {
|
|
685
|
+
this.#allPropertiesPromise = undefined;
|
|
686
|
+
this.#cachedWithPreview = false;
|
|
659
687
|
const {variableMapping} = await resolveDebuggerScope(this.scope, this.#debuggerWorkspaceBinding);
|
|
660
688
|
|
|
661
689
|
let name;
|
|
@@ -676,6 +704,8 @@ export class RemoteObject extends SDK.RemoteObject.RemoteObject {
|
|
|
676
704
|
}
|
|
677
705
|
|
|
678
706
|
override async deleteProperty(name: Protocol.Runtime.CallArgument): Promise<string|undefined> {
|
|
707
|
+
this.#allPropertiesPromise = undefined;
|
|
708
|
+
this.#cachedWithPreview = false;
|
|
679
709
|
return await this.object.deleteProperty(name);
|
|
680
710
|
}
|
|
681
711
|
|