chrome-devtools-mcp 1.6.0 → 1.7.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/README.md +26 -9
- package/build/src/HeapSnapshotManager.js +62 -23
- package/build/src/McpContext.js +64 -23
- package/build/src/McpPage.js +225 -11
- package/build/src/McpResponse.js +188 -280
- package/build/src/PageCollector.js +8 -3
- package/build/src/SlimMcpResponse.js +1 -1
- package/build/src/TextSnapshot.js +80 -19
- package/build/src/ToolHandler.js +19 -8
- package/build/src/WaitForHelper.js +142 -68
- package/build/src/bin/chrome-devtools-cli-options.js +38 -2
- package/build/src/bin/chrome-devtools-mcp-cli-options.js +1 -1
- package/build/src/bin/chrome-devtools-mcp-main.js +1 -1
- package/build/src/bin/chrome-devtools.js +19 -3
- package/build/src/daemon/client.js +22 -0
- package/build/src/daemon/daemon.js +15 -11
- package/build/src/daemon/utils.js +18 -3
- package/build/src/devtools/DevtoolsUtils.js +7 -2
- package/build/src/formatters/HeapSnapshotFormatter.js +48 -11
- package/build/src/index.js +2 -1
- package/build/src/telemetry/ClearcutLogger.js +3 -0
- package/build/src/telemetry/transformation.js +30 -0
- package/build/src/third_party/THIRD_PARTY_NOTICES +231 -52
- package/build/src/third_party/bundled-packages.json +3 -4
- package/build/src/third_party/devtools-formatter-worker.js +60 -19
- package/build/src/third_party/devtools-heap-snapshot-worker.js +383 -182
- package/build/src/third_party/index.js +28280 -9450
- package/build/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md +2 -2
- package/build/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +3 -3
- package/build/src/third_party/issue-descriptions/CoepCorpNotSameSite.md +2 -2
- package/build/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md +1 -1
- package/build/src/third_party/issue-descriptions/CompatibilityModeQuirks.md +1 -1
- package/build/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md +2 -2
- package/build/src/third_party/issue-descriptions/LowTextContrast.md +1 -1
- package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md +1 -1
- package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md +1 -1
- package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md +1 -1
- package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md +1 -1
- package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +3 -3
- package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +3 -3
- package/build/src/third_party/issue-descriptions/bounceTrackingMitigations.md +1 -1
- package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowlistItemType.md +2 -2
- package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidHeader.md +2 -2
- package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidUrlPattern.md +3 -3
- package/build/src/third_party/issue-descriptions/connectionAllowlistItemNotInnerList.md +2 -2
- package/build/src/third_party/issue-descriptions/connectionAllowlistMoreThanOneList.md +2 -2
- package/build/src/third_party/issue-descriptions/connectionAllowlistReportingEndpointNotToken.md +1 -1
- package/build/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md +3 -3
- package/build/src/third_party/issue-descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +1 -1
- package/build/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +1 -1
- package/build/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +1 -1
- package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +1 -1
- package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +1 -1
- package/build/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +1 -1
- package/build/src/third_party/issue-descriptions/corsDisabledScheme.md +2 -2
- package/build/src/third_party/issue-descriptions/corsDisallowedByMode.md +2 -2
- package/build/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +3 -3
- package/build/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +1 -1
- package/build/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +1 -1
- package/build/src/third_party/issue-descriptions/corsOriginMismatch.md +3 -3
- package/build/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +2 -2
- package/build/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +3 -3
- package/build/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +4 -3
- package/build/src/third_party/issue-descriptions/cspEvalViolation.md +4 -4
- package/build/src/third_party/issue-descriptions/cspInlineViolation.md +2 -2
- package/build/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +2 -2
- package/build/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +4 -4
- package/build/src/third_party/issue-descriptions/cspURLViolation.md +4 -4
- package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsEmptyList.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsHttpNotFound.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidContentType.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsNoResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestDnsFetchFailed.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestDnsInvalidRecord.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownHttpNotFound.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidContentType.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownNoResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestInvalidEmail.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestJwksHttpNotFound.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestJwksInvalidResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestKeyBindingSigningFailed.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestRpOriginIsOpaque.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenHttpNotFound.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidContentType.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidSdJwt.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenMalformedSdJwt.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenNoResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidAudience.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidIssuedAt.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidNonce.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidSdHash.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidTyp.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingAud.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingCnf.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingIat.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingNonce.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingSdHash.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbSignatureFailed.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmail.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmailVerified.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidHolderKey.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuedAt.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuer.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtJwksMissingKeys.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingCnf.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingEmail.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIat.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIss.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtSignatureFailed.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtUnsupportedHeaderAlg.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestUserLoggedOut.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownHttpNotFound.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidContentType.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownListEmpty.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownNoResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -1
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -1
- package/build/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +2 -2
- package/build/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +2 -2
- package/build/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +1 -1
- package/build/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +1 -1
- package/build/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +2 -2
- package/build/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +2 -2
- package/build/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +1 -1
- package/build/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +1 -1
- package/build/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +2 -2
- package/build/src/third_party/issue-descriptions/genericFormLabelForNameError.md +1 -1
- package/build/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +1 -1
- package/build/src/third_party/issue-descriptions/genericFormModelContextMissingToolName.md +1 -1
- package/build/src/third_party/issue-descriptions/genericFormModelContextParameterMissingName.md +1 -1
- package/build/src/third_party/issue-descriptions/genericFormModelContextRequiredParameterMissingName.md +1 -1
- package/build/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +2 -2
- package/build/src/third_party/issue-descriptions/heavyAd.md +1 -1
- package/build/src/third_party/issue-descriptions/lazyLoadImageZeroSize.md +7 -0
- package/build/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +3 -3
- package/build/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +1 -1
- package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +1 -1
- package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +1 -1
- package/build/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +2 -2
- package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +2 -2
- package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +2 -2
- package/build/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +1 -1
- package/build/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +2 -2
- package/build/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +2 -2
- package/build/src/third_party/issue-descriptions/permissionElementInvalidType.md +2 -2
- package/build/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +2 -2
- package/build/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +1 -1
- package/build/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +2 -2
- package/build/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +2 -2
- package/build/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +2 -2
- package/build/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +1 -1
- package/build/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +2 -2
- package/build/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +1 -1
- package/build/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +1 -1
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +1 -1
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +1 -1
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +1 -1
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +1 -1
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +1 -1
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +1 -1
- package/build/src/third_party/issue-descriptions/selectivePermissionsIntervention.md +3 -3
- package/build/src/third_party/issue-descriptions/sharedArrayBuffer.md +1 -1
- package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -1
- package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +1 -1
- package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -1
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -1
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -1
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +1 -1
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +2 -2
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -1
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +2 -2
- package/build/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +4 -4
- package/build/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +4 -4
- package/build/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +1 -1
- package/build/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +2 -2
- package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +2 -2
- package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +4 -4
- package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +4 -4
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +1 -1
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +2 -2
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +1 -1
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +1 -1
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +2 -2
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +5 -5
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +3 -3
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +2 -2
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +2 -2
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +2 -2
- package/build/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +4 -4
- package/build/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +3 -3
- package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +2 -2
- package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +2 -2
- package/build/src/third_party/issue-descriptions/stylesheetLateImport.md +1 -1
- package/build/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +1 -1
- package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +2 -2
- package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +3 -3
- package/build/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +2 -2
- package/build/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +1 -1
- package/build/src/third_party/lighthouse-devtools-mcp-bundle.js +1125 -1027
- package/build/src/tools/input.js +197 -105
- package/build/src/tools/memory.js +35 -4
- package/build/src/tools/network.js +1 -1
- package/build/src/tools/pages.js +1 -0
- package/build/src/tools/performance.js +60 -39
- package/build/src/tools/screenshot.js +152 -77
- package/build/src/tools/script.js +95 -31
- package/build/src/utils/polyfill.js +6 -3
- package/build/src/utils/url.js +43 -0
- package/build/src/version.js +1 -1
- package/package.json +20 -16
- package/skills/memory-leak-debugging/SKILL.md +12 -16
- package/skills/memory-leak-debugging/references/common-leaks.md +1 -1
- package/build/src/devtools/DevToolsConnectionAdapter.js +0 -70
- package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeRead.md +0 -8
- package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeSet.md +0 -8
- package/build/src/third_party/issue-descriptions/SameSiteExcludeNavigationContextDowngrade.md +0 -8
- package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeRead.md +0 -8
- package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeSet.md +0 -8
- package/build/src/third_party/issue-descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +0 -8
- package/build/src/third_party/issue-descriptions/arInsecureContext.md +0 -7
- package/build/src/third_party/issue-descriptions/arInvalidInfoHeader.md +0 -5
- package/build/src/third_party/issue-descriptions/arInvalidRegisterOsSourceHeader.md +0 -5
- package/build/src/third_party/issue-descriptions/arInvalidRegisterOsTriggerHeader.md +0 -5
- package/build/src/third_party/issue-descriptions/arInvalidRegisterSourceHeader.md +0 -5
- package/build/src/third_party/issue-descriptions/arInvalidRegisterTriggerHeader.md +0 -5
- package/build/src/third_party/issue-descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +0 -5
- package/build/src/third_party/issue-descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +0 -6
- package/build/src/third_party/issue-descriptions/arNoRegisterOsSourceHeader.md +0 -5
- package/build/src/third_party/issue-descriptions/arNoRegisterOsTriggerHeader.md +0 -5
- package/build/src/third_party/issue-descriptions/arNoRegisterSourceHeader.md +0 -5
- package/build/src/third_party/issue-descriptions/arNoRegisterTriggerHeader.md +0 -5
- package/build/src/third_party/issue-descriptions/arNoWebOrOsSupport.md +0 -4
- package/build/src/third_party/issue-descriptions/arOsSourceIgnored.md +0 -18
- package/build/src/third_party/issue-descriptions/arOsTriggerIgnored.md +0 -19
- package/build/src/third_party/issue-descriptions/arPermissionPolicyDisabled.md +0 -8
- package/build/src/third_party/issue-descriptions/arSourceAndTriggerHeaders.md +0 -9
- package/build/src/third_party/issue-descriptions/arSourceIgnored.md +0 -13
- package/build/src/third_party/issue-descriptions/arTriggerIgnored.md +0 -12
- package/build/src/third_party/issue-descriptions/arUntrustworthyReportingOrigin.md +0 -10
- package/build/src/third_party/issue-descriptions/arWebAndOsHeaders.md +0 -11
- package/build/src/utils/Mutex.js +0 -38
- package/skills/memory-leak-debugging/references/compare_snapshots.js +0 -109
- package/skills/memory-leak-debugging/references/memlab.md +0 -29
|
@@ -2810,34 +2810,6 @@ const LAYOUT_LINES_HIGHLIGHT_COLOR = [127, 32, 210];
|
|
|
2810
2810
|
Mask: Legacy.fromRGBA([248, 249, 249, 1]),
|
|
2811
2811
|
});
|
|
2812
2812
|
|
|
2813
|
-
// Copyright 2025 The Chromium Authors
|
|
2814
|
-
class WritableDevToolsContext {
|
|
2815
|
-
#instances = new Map();
|
|
2816
|
-
get(ctor) {
|
|
2817
|
-
const instance = this.#instances.get(ctor);
|
|
2818
|
-
if (!instance) {
|
|
2819
|
-
throw new Error(`No instance for ${ctor.name}. Ensure the bootstrapper creates it.`);
|
|
2820
|
-
}
|
|
2821
|
-
return instance;
|
|
2822
|
-
}
|
|
2823
|
-
has(ctor) {
|
|
2824
|
-
return this.#instances.has(ctor);
|
|
2825
|
-
}
|
|
2826
|
-
set(ctor, instance) {
|
|
2827
|
-
this.#instances.set(ctor, instance);
|
|
2828
|
-
}
|
|
2829
|
-
delete(ctor) {
|
|
2830
|
-
this.#instances.delete(ctor);
|
|
2831
|
-
}
|
|
2832
|
-
}
|
|
2833
|
-
let gInstance = null;
|
|
2834
|
-
function globalInstance() {
|
|
2835
|
-
if (!gInstance) {
|
|
2836
|
-
gInstance = new WritableDevToolsContext();
|
|
2837
|
-
}
|
|
2838
|
-
return gInstance;
|
|
2839
|
-
}
|
|
2840
|
-
|
|
2841
2813
|
// Copyright 2026 The Chromium Authors
|
|
2842
2814
|
var ExperimentName;
|
|
2843
2815
|
(function (ExperimentName) {
|
|
@@ -4801,7 +4773,7 @@ function lockedLazyString(str) {
|
|
|
4801
4773
|
// Copyright 2014 The Chromium Authors
|
|
4802
4774
|
const UIStrings$2 = {
|
|
4803
4775
|
elementsPanel: 'Elements panel',
|
|
4804
|
-
stylesSidebar: '
|
|
4776
|
+
stylesSidebar: 'Styles sidebar',
|
|
4805
4777
|
changesDrawer: 'Changes drawer',
|
|
4806
4778
|
issuesView: 'Issues view',
|
|
4807
4779
|
networkPanel: 'Network panel',
|
|
@@ -4810,51 +4782,12 @@ const UIStrings$2 = {
|
|
|
4810
4782
|
sourcesPanel: 'Sources panel',
|
|
4811
4783
|
timelinePanel: 'Performance panel',
|
|
4812
4784
|
memoryInspectorPanel: 'Memory inspector panel',
|
|
4813
|
-
developerResourcesPanel: 'Developer
|
|
4785
|
+
developerResourcesPanel: 'Developer resources panel',
|
|
4814
4786
|
animationsPanel: 'Animations panel',
|
|
4815
4787
|
lighthousePanel: 'Lighthouse panel',
|
|
4816
4788
|
};
|
|
4817
4789
|
const str_$2 = registerUIStrings('core/common/Revealer.ts', UIStrings$2);
|
|
4818
4790
|
const i18nLazyString$1 = getLazilyComputedLocalizedString.bind(undefined, str_$2);
|
|
4819
|
-
let revealerRegistry;
|
|
4820
|
-
class RevealerRegistry {
|
|
4821
|
-
registeredRevealers = [];
|
|
4822
|
-
static instance() {
|
|
4823
|
-
if (revealerRegistry === undefined) {
|
|
4824
|
-
revealerRegistry = new RevealerRegistry();
|
|
4825
|
-
}
|
|
4826
|
-
return revealerRegistry;
|
|
4827
|
-
}
|
|
4828
|
-
static removeInstance() {
|
|
4829
|
-
revealerRegistry = undefined;
|
|
4830
|
-
}
|
|
4831
|
-
register(registration) {
|
|
4832
|
-
this.registeredRevealers.push(registration);
|
|
4833
|
-
}
|
|
4834
|
-
async reveal(revealable, omitFocus) {
|
|
4835
|
-
const revealers = await Promise.all(this.getApplicableRegisteredRevealers(revealable).map(registration => registration.loadRevealer()));
|
|
4836
|
-
if (revealers.length < 1) {
|
|
4837
|
-
throw new Error(`No revealers found for ${revealable}`);
|
|
4838
|
-
}
|
|
4839
|
-
if (revealers.length > 1) {
|
|
4840
|
-
throw new Error(`Conflicting reveals found for ${revealable}`);
|
|
4841
|
-
}
|
|
4842
|
-
return await revealers[0].reveal(revealable, omitFocus);
|
|
4843
|
-
}
|
|
4844
|
-
getApplicableRegisteredRevealers(revealable) {
|
|
4845
|
-
return this.registeredRevealers.filter(registration => {
|
|
4846
|
-
for (const contextType of registration.contextTypes()) {
|
|
4847
|
-
if (revealable instanceof contextType) {
|
|
4848
|
-
return true;
|
|
4849
|
-
}
|
|
4850
|
-
}
|
|
4851
|
-
return false;
|
|
4852
|
-
});
|
|
4853
|
-
}
|
|
4854
|
-
}
|
|
4855
|
-
async function reveal(revealable, omitFocus = false) {
|
|
4856
|
-
await RevealerRegistry.instance().reveal(revealable, omitFocus);
|
|
4857
|
-
}
|
|
4858
4791
|
({
|
|
4859
4792
|
DEVELOPER_RESOURCES_PANEL: i18nLazyString$1(UIStrings$2.developerResourcesPanel),
|
|
4860
4793
|
ELEMENTS_PANEL: i18nLazyString$1(UIStrings$2.elementsPanel),
|
|
@@ -4872,41 +4805,6 @@ async function reveal(revealable, omitFocus = false) {
|
|
|
4872
4805
|
});
|
|
4873
4806
|
|
|
4874
4807
|
// Copyright 2014 The Chromium Authors
|
|
4875
|
-
class Console extends ObjectWrapper {
|
|
4876
|
-
#messages = [];
|
|
4877
|
-
static instance(opts) {
|
|
4878
|
-
if (!globalInstance().has(Console) || opts?.forceNew) {
|
|
4879
|
-
globalInstance().set(Console, new Console());
|
|
4880
|
-
}
|
|
4881
|
-
return globalInstance().get(Console);
|
|
4882
|
-
}
|
|
4883
|
-
static removeInstance() {
|
|
4884
|
-
globalInstance().delete(Console);
|
|
4885
|
-
}
|
|
4886
|
-
addMessage(text, level = "info" , show = false, source) {
|
|
4887
|
-
const message = new Message(text, level, Date.now(), show, source);
|
|
4888
|
-
this.#messages.push(message);
|
|
4889
|
-
this.dispatchEventToListeners("messageAdded" , message);
|
|
4890
|
-
}
|
|
4891
|
-
log(text) {
|
|
4892
|
-
this.addMessage(text, "info" );
|
|
4893
|
-
}
|
|
4894
|
-
warn(text, source) {
|
|
4895
|
-
this.addMessage(text, "warning" , undefined, source);
|
|
4896
|
-
}
|
|
4897
|
-
error(text, show = true) {
|
|
4898
|
-
this.addMessage(text, "error" , show);
|
|
4899
|
-
}
|
|
4900
|
-
messages() {
|
|
4901
|
-
return this.#messages;
|
|
4902
|
-
}
|
|
4903
|
-
show() {
|
|
4904
|
-
void this.showPromise();
|
|
4905
|
-
}
|
|
4906
|
-
showPromise() {
|
|
4907
|
-
return reveal(this);
|
|
4908
|
-
}
|
|
4909
|
-
}
|
|
4910
4808
|
var FrontendMessageSource;
|
|
4911
4809
|
(function (FrontendMessageSource) {
|
|
4912
4810
|
FrontendMessageSource["CSS"] = "css";
|
|
@@ -4914,22 +4812,6 @@ var FrontendMessageSource;
|
|
|
4914
4812
|
FrontendMessageSource["ISSUE_PANEL"] = "issue-panel";
|
|
4915
4813
|
FrontendMessageSource["SELF_XSS"] = "self-xss";
|
|
4916
4814
|
})(FrontendMessageSource || (FrontendMessageSource = {}));
|
|
4917
|
-
class Message {
|
|
4918
|
-
text;
|
|
4919
|
-
level;
|
|
4920
|
-
timestamp;
|
|
4921
|
-
show;
|
|
4922
|
-
source;
|
|
4923
|
-
constructor(text, level, timestamp, show, source) {
|
|
4924
|
-
this.text = text;
|
|
4925
|
-
this.level = level;
|
|
4926
|
-
this.timestamp = (typeof timestamp === 'number') ? timestamp : Date.now();
|
|
4927
|
-
this.show = show;
|
|
4928
|
-
if (source) {
|
|
4929
|
-
this.source = source;
|
|
4930
|
-
}
|
|
4931
|
-
}
|
|
4932
|
-
}
|
|
4933
4815
|
|
|
4934
4816
|
// Copyright 2012 The Chromium Authors
|
|
4935
4817
|
function normalizePath(path) {
|
|
@@ -5333,7 +5215,11 @@ class ParsedURL {
|
|
|
5333
5215
|
return 'data:';
|
|
5334
5216
|
}
|
|
5335
5217
|
const scheme = this.isBlobURL() ? this.blobInnerScheme : this.scheme;
|
|
5336
|
-
|
|
5218
|
+
const domain = this.domain();
|
|
5219
|
+
if (!scheme && !domain) {
|
|
5220
|
+
return '';
|
|
5221
|
+
}
|
|
5222
|
+
return scheme + '://' + domain;
|
|
5337
5223
|
}
|
|
5338
5224
|
urlWithoutScheme() {
|
|
5339
5225
|
if (this.scheme && this.url.startsWith(this.scheme + '://')) {
|
|
@@ -5730,7 +5616,6 @@ const UIStrings = {
|
|
|
5730
5616
|
extension: 'Extension',
|
|
5731
5617
|
adorner: 'Adorner',
|
|
5732
5618
|
account: 'Account',
|
|
5733
|
-
privacy: 'Privacy',
|
|
5734
5619
|
};
|
|
5735
5620
|
const str_ = registerUIStrings('core/common/SettingRegistration.ts', UIStrings);
|
|
5736
5621
|
getLocalizedString.bind(undefined, str_);
|
|
@@ -5738,6 +5623,7 @@ getLocalizedString.bind(undefined, str_);
|
|
|
5738
5623
|
// Copyright 2011 The Chromium Authors
|
|
5739
5624
|
class HeapSnapshotWorkerProxy extends ObjectWrapper {
|
|
5740
5625
|
eventHandler;
|
|
5626
|
+
#console;
|
|
5741
5627
|
nextObjectId = 1;
|
|
5742
5628
|
nextCallId = 1;
|
|
5743
5629
|
callbacks = new Map();
|
|
@@ -5745,13 +5631,17 @@ class HeapSnapshotWorkerProxy extends ObjectWrapper {
|
|
|
5745
5631
|
worker;
|
|
5746
5632
|
interval;
|
|
5747
5633
|
workerUrl;
|
|
5748
|
-
constructor(eventHandler, workerUrl) {
|
|
5634
|
+
constructor(eventHandler, console, workerUrl) {
|
|
5749
5635
|
super();
|
|
5750
5636
|
this.eventHandler = eventHandler;
|
|
5637
|
+
this.#console = console;
|
|
5751
5638
|
this.workerUrl = workerUrl;
|
|
5752
5639
|
this.worker = HOST_RUNTIME.createWorker(workerUrl ?? import.meta.resolve('../../entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js'));
|
|
5753
5640
|
this.worker.onmessage = this.messageReceived.bind(this);
|
|
5754
5641
|
}
|
|
5642
|
+
get console() {
|
|
5643
|
+
return this.#console;
|
|
5644
|
+
}
|
|
5755
5645
|
createLoader(profileUid, snapshotReceivedCallback) {
|
|
5756
5646
|
const objectId = this.nextObjectId++;
|
|
5757
5647
|
const proxy = new HeapSnapshotLoaderProxy(this, objectId, profileUid, snapshotReceivedCallback);
|
|
@@ -5819,7 +5709,7 @@ class HeapSnapshotWorkerProxy extends ObjectWrapper {
|
|
|
5819
5709
|
return;
|
|
5820
5710
|
}
|
|
5821
5711
|
this.checkLongRunningCalls();
|
|
5822
|
-
this.interval =
|
|
5712
|
+
this.interval = globalThis.setInterval(this.checkLongRunningCalls.bind(this), 300);
|
|
5823
5713
|
}
|
|
5824
5714
|
checkLongRunningCalls() {
|
|
5825
5715
|
for (const callId of this.previousCallbacks) {
|
|
@@ -5854,8 +5744,8 @@ class HeapSnapshotWorkerProxy extends ObjectWrapper {
|
|
|
5854
5744
|
return;
|
|
5855
5745
|
}
|
|
5856
5746
|
if (data.error) {
|
|
5857
|
-
|
|
5858
|
-
|
|
5747
|
+
this.#console.error(`An error occurred when a call to method '${data.errorMethodName}' was requested`);
|
|
5748
|
+
this.#console.error(data['errorCallStack']);
|
|
5859
5749
|
this.callbacks.delete(data.callId);
|
|
5860
5750
|
return;
|
|
5861
5751
|
}
|
|
@@ -5903,7 +5793,7 @@ class HeapSnapshotLoaderProxy extends HeapSnapshotProxyObject {
|
|
|
5903
5793
|
}
|
|
5904
5794
|
async close() {
|
|
5905
5795
|
await this.callMethodPromise('close');
|
|
5906
|
-
const secondWorker = new HeapSnapshotWorkerProxy(() => { }, this.worker.workerUrl);
|
|
5796
|
+
const secondWorker = new HeapSnapshotWorkerProxy(() => { }, this.worker.console, this.worker.workerUrl);
|
|
5907
5797
|
const channel = new MessageChannel();
|
|
5908
5798
|
await secondWorker.setupForSecondaryInit(channel.port2);
|
|
5909
5799
|
const snapshotProxy = await this.callFactoryMethodPromise('buildSnapshot', HeapSnapshotProxy, [channel.port1]);
|
|
@@ -5927,6 +5817,9 @@ class HeapSnapshotProxy extends HeapSnapshotProxyObject {
|
|
|
5927
5817
|
interfaceDefinitions() {
|
|
5928
5818
|
return this.callMethodPromise('interfaceDefinitions');
|
|
5929
5819
|
}
|
|
5820
|
+
getNativeContextSizes() {
|
|
5821
|
+
return this.callMethodPromise('getNativeContextSizes');
|
|
5822
|
+
}
|
|
5930
5823
|
aggregatesWithFilter(filter) {
|
|
5931
5824
|
return this.callMethodPromise('aggregatesWithFilter', filter);
|
|
5932
5825
|
}
|
|
@@ -5945,6 +5838,9 @@ class HeapSnapshotProxy extends HeapSnapshotProxyObject {
|
|
|
5945
5838
|
nodeIndexForId(nodeId) {
|
|
5946
5839
|
return this.callMethodPromise('nodeIndexForId', nodeId);
|
|
5947
5840
|
}
|
|
5841
|
+
getObjectInfo(nodeIndex) {
|
|
5842
|
+
return this.callMethodPromise('getObjectInfo', nodeIndex);
|
|
5843
|
+
}
|
|
5948
5844
|
createEdgesProvider(nodeIndex) {
|
|
5949
5845
|
return this.callFactoryMethod('createEdgesProvider', HeapSnapshotProviderProxy, nodeIndex);
|
|
5950
5846
|
}
|
|
@@ -6747,6 +6643,28 @@ class HeapSnapshotNode {
|
|
|
6747
6643
|
}
|
|
6748
6644
|
return undefined;
|
|
6749
6645
|
}
|
|
6646
|
+
nodeValueAsInt() {
|
|
6647
|
+
if (this.rawType() !== this.snapshot.nodeNumberType) {
|
|
6648
|
+
return undefined;
|
|
6649
|
+
}
|
|
6650
|
+
if (this.rawName() !== 'int') {
|
|
6651
|
+
return undefined;
|
|
6652
|
+
}
|
|
6653
|
+
const valNode = this.findInternalEdgeTarget('value');
|
|
6654
|
+
if (!valNode) {
|
|
6655
|
+
return undefined;
|
|
6656
|
+
}
|
|
6657
|
+
const value = parseInt(valNode.rawName(), 10);
|
|
6658
|
+
return isNaN(value) ? undefined : value;
|
|
6659
|
+
}
|
|
6660
|
+
nodeStringLength() {
|
|
6661
|
+
const lengthNode = this.findInternalEdgeTarget('length');
|
|
6662
|
+
return lengthNode ? lengthNode.nodeValueAsInt() : undefined;
|
|
6663
|
+
}
|
|
6664
|
+
nodeStringHash() {
|
|
6665
|
+
const hashNode = this.findInternalEdgeTarget('hash');
|
|
6666
|
+
return hashNode ? hashNode.nodeValueAsInt() : undefined;
|
|
6667
|
+
}
|
|
6750
6668
|
nodeIsTruncatedString() {
|
|
6751
6669
|
const truncNode = this.findInternalEdgeTarget('truncated');
|
|
6752
6670
|
if (!truncNode) {
|
|
@@ -6904,7 +6822,7 @@ class SecondaryInitManager {
|
|
|
6904
6822
|
...retainers,
|
|
6905
6823
|
essentialEdges: createBitVector(argsStep2.essentialEdgesBuffer),
|
|
6906
6824
|
port,
|
|
6907
|
-
nodeSelfSizesPromise: this.getNodeSelfSizes()
|
|
6825
|
+
nodeSelfSizesPromise: this.getNodeSelfSizes(),
|
|
6908
6826
|
};
|
|
6909
6827
|
const dominatorsAndRetainedSizes = await HeapSnapshot.calculateDominatorsAndRetainedSizes(args);
|
|
6910
6828
|
const dominatedNodesOutputs = HeapSnapshot.buildDominatedNodes({ ...args, ...dominatorsAndRetainedSizes });
|
|
@@ -6934,6 +6852,8 @@ const MIN_INTERFACE_PROPERTY_COUNT = 1;
|
|
|
6934
6852
|
const MAX_INTERFACE_NAME_LENGTH = 120;
|
|
6935
6853
|
const MIN_OBJECT_COUNT_PER_INTERFACE = 2;
|
|
6936
6854
|
const MIN_OBJECT_PROPORTION_PER_INTERFACE = 1000;
|
|
6855
|
+
const NO_NATIVE_CONTEXT = -1;
|
|
6856
|
+
const SHARED_NATIVE_CONTEXT = -2;
|
|
6937
6857
|
class HeapSnapshot {
|
|
6938
6858
|
nodes;
|
|
6939
6859
|
containmentEdges;
|
|
@@ -7006,6 +6926,9 @@ class HeapSnapshot {
|
|
|
7006
6926
|
#nodeDistancesForRetainersView;
|
|
7007
6927
|
#edgeNamesThatAreNotWeakMaps;
|
|
7008
6928
|
detachednessAndClassIndexArray;
|
|
6929
|
+
nodeNativeContextAttribution;
|
|
6930
|
+
#nativeContextSizes;
|
|
6931
|
+
#nativeContextOrdinals;
|
|
7009
6932
|
#interfaceNames = new Map();
|
|
7010
6933
|
#interfaceDefinitions;
|
|
7011
6934
|
constructor(profile, progress) {
|
|
@@ -7091,8 +7014,11 @@ class HeapSnapshot {
|
|
|
7091
7014
|
this.buildSamples();
|
|
7092
7015
|
this.#progress.updateStatus('Building locations…');
|
|
7093
7016
|
this.buildLocationMap();
|
|
7017
|
+
this.#progress.updateStatus('Calculating native context attribution…');
|
|
7018
|
+
this.calculateNativeContextAttribution();
|
|
7094
7019
|
this.#progress.updateStatus('Calculating retained sizes…');
|
|
7095
7020
|
await this.installResultsFromSecondThread(resultsFromSecondWorker);
|
|
7021
|
+
this.calculateNativeContextSizes();
|
|
7096
7022
|
this.#progress.updateStatus('Calculating statistics…');
|
|
7097
7023
|
this.calculateStatistics();
|
|
7098
7024
|
if (this.profile.snapshot.trace_function_count) {
|
|
@@ -7127,6 +7053,26 @@ class HeapSnapshot {
|
|
|
7127
7053
|
}
|
|
7128
7054
|
return undefined;
|
|
7129
7055
|
}
|
|
7056
|
+
getObjectInfo(nodeIndex) {
|
|
7057
|
+
const nodesLength = this.nodes.length;
|
|
7058
|
+
const nodeFieldCount = this.nodeFieldCount;
|
|
7059
|
+
if (!Number.isInteger(nodeIndex) || nodeIndex < 0 || nodeIndex >= nodesLength || nodeIndex % nodeFieldCount !== 0) {
|
|
7060
|
+
throw new Error('Invalid nodeIndex ' + nodeIndex);
|
|
7061
|
+
}
|
|
7062
|
+
const node = this.createNode(nodeIndex);
|
|
7063
|
+
return {
|
|
7064
|
+
id: node.id(),
|
|
7065
|
+
name: node.name(),
|
|
7066
|
+
type: node.type(),
|
|
7067
|
+
nodeIndex,
|
|
7068
|
+
detachedness: node.detachedness(),
|
|
7069
|
+
selfSize: node.selfSize(),
|
|
7070
|
+
retainedSize: node.retainedSize(),
|
|
7071
|
+
distance: node.distance(),
|
|
7072
|
+
edgeCount: node.edgesCount(),
|
|
7073
|
+
retainerCount: node.retainersCount(),
|
|
7074
|
+
};
|
|
7075
|
+
}
|
|
7130
7076
|
startInitStep1InSecondThread(secondWorker) {
|
|
7131
7077
|
const resultsFromSecondWorker = new Promise((resolve, reject) => {
|
|
7132
7078
|
const listener = (e) => {
|
|
@@ -7326,40 +7272,76 @@ class HeapSnapshot {
|
|
|
7326
7272
|
}
|
|
7327
7273
|
getDuplicateStrings() {
|
|
7328
7274
|
const filter = this.createNamedFilter('duplicatedStrings');
|
|
7329
|
-
const
|
|
7275
|
+
const untruncatedGroups = new Map();
|
|
7276
|
+
const truncatedGroups = new Map();
|
|
7330
7277
|
const node = this.createNode(0);
|
|
7331
7278
|
for (let i = 0; i < this.nodeCount; ++i) {
|
|
7332
7279
|
node.nodeIndex = i * this.nodeFieldCount;
|
|
7333
7280
|
if (filter(node)) {
|
|
7334
7281
|
const name = node.name();
|
|
7335
7282
|
const truncated = node.nodeIsTruncatedString();
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7283
|
+
if (truncated) {
|
|
7284
|
+
const length = node.nodeStringLength();
|
|
7285
|
+
const hash = node.nodeStringHash();
|
|
7286
|
+
let groups = truncatedGroups.get(name);
|
|
7287
|
+
if (!groups) {
|
|
7288
|
+
groups = [];
|
|
7289
|
+
truncatedGroups.set(name, groups);
|
|
7290
|
+
}
|
|
7291
|
+
let group = groups.find(g => g.length === length && g.hash === hash);
|
|
7292
|
+
if (!group) {
|
|
7293
|
+
group = {
|
|
7294
|
+
value: name,
|
|
7295
|
+
count: 0,
|
|
7296
|
+
totalSelfSize: 0,
|
|
7297
|
+
totalRetainedSize: 0,
|
|
7298
|
+
nodes: [],
|
|
7299
|
+
truncated: true,
|
|
7300
|
+
length,
|
|
7301
|
+
hash,
|
|
7302
|
+
};
|
|
7303
|
+
groups.push(group);
|
|
7304
|
+
}
|
|
7305
|
+
group.count++;
|
|
7306
|
+
group.totalSelfSize += node.selfSize();
|
|
7307
|
+
group.totalRetainedSize += node.retainedSize();
|
|
7308
|
+
group.nodes.push({
|
|
7309
|
+
id: node.id(),
|
|
7310
|
+
selfSize: node.selfSize(),
|
|
7311
|
+
retainedSize: node.retainedSize(),
|
|
7312
|
+
distance: node.distance(),
|
|
7313
|
+
});
|
|
7314
|
+
}
|
|
7315
|
+
else {
|
|
7316
|
+
let group = untruncatedGroups.get(name);
|
|
7317
|
+
if (!group) {
|
|
7318
|
+
group = {
|
|
7319
|
+
value: name,
|
|
7320
|
+
count: 0,
|
|
7321
|
+
totalSelfSize: 0,
|
|
7322
|
+
totalRetainedSize: 0,
|
|
7323
|
+
nodes: [],
|
|
7324
|
+
truncated: false,
|
|
7325
|
+
};
|
|
7326
|
+
untruncatedGroups.set(name, group);
|
|
7327
|
+
}
|
|
7328
|
+
group.count++;
|
|
7329
|
+
group.totalSelfSize += node.selfSize();
|
|
7330
|
+
group.totalRetainedSize += node.retainedSize();
|
|
7331
|
+
group.nodes.push({
|
|
7332
|
+
id: node.id(),
|
|
7333
|
+
selfSize: node.selfSize(),
|
|
7334
|
+
retainedSize: node.retainedSize(),
|
|
7335
|
+
distance: node.distance(),
|
|
7336
|
+
});
|
|
7337
|
+
}
|
|
7360
7338
|
}
|
|
7361
7339
|
}
|
|
7362
|
-
|
|
7340
|
+
const allGroups = [
|
|
7341
|
+
...untruncatedGroups.values(),
|
|
7342
|
+
...Array.from(truncatedGroups.values()).flat(),
|
|
7343
|
+
];
|
|
7344
|
+
return allGroups.sort((a, b) => b.totalRetainedSize - a.totalRetainedSize);
|
|
7363
7345
|
}
|
|
7364
7346
|
createNodeIdFilter(minNodeId, maxNodeId) {
|
|
7365
7347
|
function nodeIdFilter(node) {
|
|
@@ -7433,29 +7415,8 @@ class HeapSnapshot {
|
|
|
7433
7415
|
});
|
|
7434
7416
|
markUnreachableNodes();
|
|
7435
7417
|
return (node) => !getBit(node);
|
|
7436
|
-
case 'duplicatedStrings':
|
|
7437
|
-
|
|
7438
|
-
const node = this.createNode(0);
|
|
7439
|
-
for (let i = 0; i < this.nodeCount; ++i) {
|
|
7440
|
-
node.nodeIndex = i * this.nodeFieldCount;
|
|
7441
|
-
const rawType = node.rawType();
|
|
7442
|
-
if (rawType === this.nodeStringType || rawType === this.nodeConsStringType) {
|
|
7443
|
-
if (node.isFlatConsString()) {
|
|
7444
|
-
continue;
|
|
7445
|
-
}
|
|
7446
|
-
const name = node.name();
|
|
7447
|
-
const alreadyVisitedNodeIndex = stringToNodeIndexMap.get(name);
|
|
7448
|
-
if (alreadyVisitedNodeIndex === undefined) {
|
|
7449
|
-
stringToNodeIndexMap.set(name, node.nodeIndex);
|
|
7450
|
-
}
|
|
7451
|
-
else {
|
|
7452
|
-
bitmap.setBit(alreadyVisitedNodeIndex / this.nodeFieldCount);
|
|
7453
|
-
bitmap.setBit(node.nodeIndex / this.nodeFieldCount);
|
|
7454
|
-
}
|
|
7455
|
-
}
|
|
7456
|
-
}
|
|
7457
|
-
return getBit;
|
|
7458
|
-
}
|
|
7418
|
+
case 'duplicatedStrings':
|
|
7419
|
+
return this.createDuplicatedStringsFilter(bitmap);
|
|
7459
7420
|
case 'objectsRetainedByEventHandlers': {
|
|
7460
7421
|
const node = this.createNode(0);
|
|
7461
7422
|
const nodeFieldCount = this.nodeFieldCount;
|
|
@@ -7494,9 +7455,79 @@ class HeapSnapshot {
|
|
|
7494
7455
|
markUnreachableNodes();
|
|
7495
7456
|
return (node) => !getBit(node);
|
|
7496
7457
|
}
|
|
7458
|
+
case 'sharedNativeContext':
|
|
7459
|
+
return (node) => {
|
|
7460
|
+
const ordinal = node.nodeIndex / this.nodeFieldCount;
|
|
7461
|
+
return this.nodeNativeContextAttribution[ordinal] === SHARED_NATIVE_CONTEXT;
|
|
7462
|
+
};
|
|
7463
|
+
case 'noNativeContext':
|
|
7464
|
+
return (node) => {
|
|
7465
|
+
const ordinal = node.nodeIndex / this.nodeFieldCount;
|
|
7466
|
+
return this.nodeNativeContextAttribution[ordinal] === NO_NATIVE_CONTEXT;
|
|
7467
|
+
};
|
|
7468
|
+
default:
|
|
7469
|
+
if (filterName.startsWith('nativeContext_')) {
|
|
7470
|
+
const targetNodeIndex = Number(filterName.substring('nativeContext_'.length));
|
|
7471
|
+
const targetOrdinal = targetNodeIndex / this.nodeFieldCount;
|
|
7472
|
+
return (node) => {
|
|
7473
|
+
const ordinal = node.nodeIndex / this.nodeFieldCount;
|
|
7474
|
+
return this.nodeNativeContextAttribution[ordinal] === targetOrdinal;
|
|
7475
|
+
};
|
|
7476
|
+
}
|
|
7497
7477
|
}
|
|
7498
7478
|
throw new Error('Invalid filter name');
|
|
7499
7479
|
}
|
|
7480
|
+
createDuplicatedStringsFilter(bitmap) {
|
|
7481
|
+
const untruncatedStringToNodeIndexMap = new Map();
|
|
7482
|
+
const truncatedStringToNodeIndexesMap = new Map();
|
|
7483
|
+
const node = this.createNode(0);
|
|
7484
|
+
for (let i = 0; i < this.nodeCount; ++i) {
|
|
7485
|
+
node.nodeIndex = i * this.nodeFieldCount;
|
|
7486
|
+
const rawType = node.rawType();
|
|
7487
|
+
if (rawType !== this.nodeStringType && rawType !== this.nodeConsStringType) {
|
|
7488
|
+
continue;
|
|
7489
|
+
}
|
|
7490
|
+
if (node.isFlatConsString()) {
|
|
7491
|
+
continue;
|
|
7492
|
+
}
|
|
7493
|
+
if (node.selfSize() === 0) {
|
|
7494
|
+
continue;
|
|
7495
|
+
}
|
|
7496
|
+
const name = node.name();
|
|
7497
|
+
const truncated = node.nodeIsTruncatedString();
|
|
7498
|
+
if (truncated) {
|
|
7499
|
+
const length = node.nodeStringLength();
|
|
7500
|
+
const hash = node.nodeStringHash();
|
|
7501
|
+
let entries = truncatedStringToNodeIndexesMap.get(name);
|
|
7502
|
+
if (!entries) {
|
|
7503
|
+
entries = [];
|
|
7504
|
+
truncatedStringToNodeIndexesMap.set(name, entries);
|
|
7505
|
+
}
|
|
7506
|
+
const match = entries.find(e => e.length === length && e.hash === hash);
|
|
7507
|
+
if (match) {
|
|
7508
|
+
bitmap.setBit(match.nodeIndex / this.nodeFieldCount);
|
|
7509
|
+
bitmap.setBit(node.nodeIndex / this.nodeFieldCount);
|
|
7510
|
+
}
|
|
7511
|
+
else {
|
|
7512
|
+
entries.push({ nodeIndex: node.nodeIndex, length, hash });
|
|
7513
|
+
}
|
|
7514
|
+
}
|
|
7515
|
+
else {
|
|
7516
|
+
const alreadyVisitedNodeIndex = untruncatedStringToNodeIndexMap.get(name);
|
|
7517
|
+
if (alreadyVisitedNodeIndex === undefined) {
|
|
7518
|
+
untruncatedStringToNodeIndexMap.set(name, node.nodeIndex);
|
|
7519
|
+
}
|
|
7520
|
+
else {
|
|
7521
|
+
bitmap.setBit(alreadyVisitedNodeIndex / this.nodeFieldCount);
|
|
7522
|
+
bitmap.setBit(node.nodeIndex / this.nodeFieldCount);
|
|
7523
|
+
}
|
|
7524
|
+
}
|
|
7525
|
+
}
|
|
7526
|
+
return (node) => {
|
|
7527
|
+
const ordinal = node.nodeIndex / this.nodeFieldCount;
|
|
7528
|
+
return bitmap.getBit(ordinal);
|
|
7529
|
+
};
|
|
7530
|
+
}
|
|
7500
7531
|
getAggregatesByClassKey(sortedIndexes, key, filter) {
|
|
7501
7532
|
let aggregates;
|
|
7502
7533
|
if (key && this.#aggregates[key]) {
|
|
@@ -7815,7 +7846,7 @@ class HeapSnapshot {
|
|
|
7815
7846
|
return true;
|
|
7816
7847
|
}
|
|
7817
7848
|
static async calculateDominatorsAndRetainedSizes(inputs) {
|
|
7818
|
-
const { nodeCount, firstEdgeIndexes, edgeFieldsCount, nodeFieldCount, firstRetainerIndex, retainingEdges, retainingNodes, edgeToNodeOrdinals, rootNodeOrdinal, essentialEdges, nodeSelfSizesPromise, port } = inputs;
|
|
7849
|
+
const { nodeCount, firstEdgeIndexes, edgeFieldsCount, nodeFieldCount, firstRetainerIndex, retainingEdges, retainingNodes, edgeToNodeOrdinals, rootNodeOrdinal, essentialEdges, nodeSelfSizesPromise, port, } = inputs;
|
|
7819
7850
|
function isEssentialEdge(edgeIndex) {
|
|
7820
7851
|
return essentialEdges.getBit(edgeIndex / edgeFieldsCount);
|
|
7821
7852
|
}
|
|
@@ -8054,6 +8085,178 @@ class HeapSnapshot {
|
|
|
8054
8085
|
node.nodeIndex = node.nextNodeIndex();
|
|
8055
8086
|
}
|
|
8056
8087
|
}
|
|
8088
|
+
calculateNativeContextAttribution() {
|
|
8089
|
+
const attribution = new Int32Array(this.nodeCount).fill(NO_NATIVE_CONTEXT);
|
|
8090
|
+
const isFixed = createBitVector(this.nodeCount);
|
|
8091
|
+
const edgeTargets = this.buildInitEdgeTargets();
|
|
8092
|
+
this.#nativeContextOrdinals = [];
|
|
8093
|
+
for (let ordinal = 0; ordinal < this.nodeCount; ordinal++) {
|
|
8094
|
+
if (this.isNativeContext(ordinal)) {
|
|
8095
|
+
this.#nativeContextOrdinals.push(ordinal);
|
|
8096
|
+
attribution[ordinal] = ordinal;
|
|
8097
|
+
isFixed.setBit(ordinal);
|
|
8098
|
+
}
|
|
8099
|
+
else {
|
|
8100
|
+
const owner = this.inferFixedNativeContextForOrdinal(ordinal, edgeTargets);
|
|
8101
|
+
if (owner >= 0) {
|
|
8102
|
+
attribution[ordinal] = owner;
|
|
8103
|
+
isFixed.setBit(ordinal);
|
|
8104
|
+
}
|
|
8105
|
+
}
|
|
8106
|
+
}
|
|
8107
|
+
this.propagateNativeContextAttribution(attribution, isFixed);
|
|
8108
|
+
this.nodeNativeContextAttribution = attribution;
|
|
8109
|
+
}
|
|
8110
|
+
calculateNativeContextSizes() {
|
|
8111
|
+
const nodeFieldCount = this.nodeFieldCount;
|
|
8112
|
+
const node = this.createNode(0);
|
|
8113
|
+
const nativeContexts = [];
|
|
8114
|
+
const ordinalToInfo = new Map();
|
|
8115
|
+
for (const ordinal of this.#nativeContextOrdinals) {
|
|
8116
|
+
node.nodeIndex = ordinal * nodeFieldCount;
|
|
8117
|
+
const info = {
|
|
8118
|
+
nodeId: node.id(),
|
|
8119
|
+
nodeIndex: node.nodeIndex,
|
|
8120
|
+
nodeName: node.name(),
|
|
8121
|
+
attributedSize: 0,
|
|
8122
|
+
retainedSize: node.retainedSize(),
|
|
8123
|
+
selfSize: node.selfSize(),
|
|
8124
|
+
};
|
|
8125
|
+
nativeContexts.push(info);
|
|
8126
|
+
ordinalToInfo.set(ordinal, info);
|
|
8127
|
+
}
|
|
8128
|
+
let sharedSize = 0;
|
|
8129
|
+
let noAttributionSize = 0;
|
|
8130
|
+
const selfSizeOffset = this.nodeSelfSizeOffset;
|
|
8131
|
+
const nodes = this.nodes;
|
|
8132
|
+
for (let i = 0; i < this.nodeCount; ++i) {
|
|
8133
|
+
const ownerOrdinal = this.nodeNativeContextAttribution[i];
|
|
8134
|
+
const selfSize = nodes.getValue(i * nodeFieldCount + selfSizeOffset);
|
|
8135
|
+
if (ownerOrdinal === SHARED_NATIVE_CONTEXT) {
|
|
8136
|
+
sharedSize += selfSize;
|
|
8137
|
+
}
|
|
8138
|
+
else if (ownerOrdinal === NO_NATIVE_CONTEXT) {
|
|
8139
|
+
noAttributionSize += selfSize;
|
|
8140
|
+
}
|
|
8141
|
+
else {
|
|
8142
|
+
console.assert(ownerOrdinal >= 0, 'ownerOrdinal should be >= 0');
|
|
8143
|
+
const info = ordinalToInfo.get(ownerOrdinal);
|
|
8144
|
+
console.assert(info !== undefined, 'info should exist');
|
|
8145
|
+
if (info) {
|
|
8146
|
+
info.attributedSize += selfSize;
|
|
8147
|
+
}
|
|
8148
|
+
}
|
|
8149
|
+
}
|
|
8150
|
+
this.#nativeContextSizes = {
|
|
8151
|
+
nativeContexts,
|
|
8152
|
+
sharedSize,
|
|
8153
|
+
noAttributionSize,
|
|
8154
|
+
};
|
|
8155
|
+
}
|
|
8156
|
+
buildInitEdgeTargets() {
|
|
8157
|
+
const { nodeCount, nodeFieldCount, containmentEdges, edgeFieldsCount, edgeTypeOffset, edgeNameOffset, edgeToNodeOffset, edgeInternalType, firstEdgeIndexes, strings, } = this;
|
|
8158
|
+
const nativeContext = new Int32Array(nodeCount).fill(-1);
|
|
8159
|
+
const map = new Int32Array(nodeCount).fill(-1);
|
|
8160
|
+
const nativeContextIdx = strings.indexOf('native_context');
|
|
8161
|
+
const mapIdx = strings.indexOf('map');
|
|
8162
|
+
for (let ordinal = 0; ordinal < nodeCount; ordinal++) {
|
|
8163
|
+
const first = firstEdgeIndexes[ordinal];
|
|
8164
|
+
const last = firstEdgeIndexes[ordinal + 1];
|
|
8165
|
+
for (let edgeIndex = first; edgeIndex < last; edgeIndex += edgeFieldsCount) {
|
|
8166
|
+
const edgeType = containmentEdges.getValue(edgeIndex + edgeTypeOffset);
|
|
8167
|
+
if (edgeType !== edgeInternalType) {
|
|
8168
|
+
continue;
|
|
8169
|
+
}
|
|
8170
|
+
const nameIdx = containmentEdges.getValue(edgeIndex + edgeNameOffset);
|
|
8171
|
+
const childNodeIndex = containmentEdges.getValue(edgeIndex + edgeToNodeOffset);
|
|
8172
|
+
const childOrdinal = childNodeIndex / nodeFieldCount;
|
|
8173
|
+
if (nameIdx === nativeContextIdx && nativeContext[ordinal] === -1 && this.isNativeContext(childOrdinal)) {
|
|
8174
|
+
nativeContext[ordinal] = childOrdinal;
|
|
8175
|
+
}
|
|
8176
|
+
else if (nameIdx === mapIdx && map[ordinal] === -1) {
|
|
8177
|
+
map[ordinal] = childOrdinal;
|
|
8178
|
+
}
|
|
8179
|
+
}
|
|
8180
|
+
}
|
|
8181
|
+
return { nativeContext, map };
|
|
8182
|
+
}
|
|
8183
|
+
inferFixedNativeContextForOrdinal(ordinal, edgeTargets) {
|
|
8184
|
+
const mapOrdinal = edgeTargets.map[ordinal];
|
|
8185
|
+
if (mapOrdinal >= 0) {
|
|
8186
|
+
const metaMapOrdinal = edgeTargets.map[mapOrdinal];
|
|
8187
|
+
if (metaMapOrdinal >= 0) {
|
|
8188
|
+
const mapNativeContextOrdinal = edgeTargets.nativeContext[metaMapOrdinal];
|
|
8189
|
+
if (mapNativeContextOrdinal >= 0) {
|
|
8190
|
+
return mapNativeContextOrdinal;
|
|
8191
|
+
}
|
|
8192
|
+
}
|
|
8193
|
+
}
|
|
8194
|
+
return NO_NATIVE_CONTEXT;
|
|
8195
|
+
}
|
|
8196
|
+
mergeNativeContextOwner(current, incoming) {
|
|
8197
|
+
console.assert(incoming !== NO_NATIVE_CONTEXT, 'Incoming owner should not be NO_NATIVE_CONTEXT');
|
|
8198
|
+
if (current === SHARED_NATIVE_CONTEXT || incoming === SHARED_NATIVE_CONTEXT) {
|
|
8199
|
+
return SHARED_NATIVE_CONTEXT;
|
|
8200
|
+
}
|
|
8201
|
+
if (current === NO_NATIVE_CONTEXT) {
|
|
8202
|
+
return incoming;
|
|
8203
|
+
}
|
|
8204
|
+
if (current === incoming) {
|
|
8205
|
+
return current;
|
|
8206
|
+
}
|
|
8207
|
+
return SHARED_NATIVE_CONTEXT;
|
|
8208
|
+
}
|
|
8209
|
+
propagateNativeContextAttribution(attribution, isFixed) {
|
|
8210
|
+
const { nodeCount, containmentEdges, edgeFieldsCount, edgeTypeOffset, edgeToNodeOffset, edgeShortcutType, edgeWeakType, nodeFieldCount, firstEdgeIndexes, } = this;
|
|
8211
|
+
const queue = [];
|
|
8212
|
+
for (let ordinal = 0; ordinal < nodeCount; ordinal++) {
|
|
8213
|
+
if (isFixed.getBit(ordinal)) {
|
|
8214
|
+
queue.push(ordinal);
|
|
8215
|
+
}
|
|
8216
|
+
}
|
|
8217
|
+
let queueIndex = 0;
|
|
8218
|
+
while (queueIndex < queue.length) {
|
|
8219
|
+
const ordinal = queue[queueIndex];
|
|
8220
|
+
queueIndex++;
|
|
8221
|
+
const current = attribution[ordinal];
|
|
8222
|
+
console.assert(current !== NO_NATIVE_CONTEXT, 'Queue should not contain unattributed nodes');
|
|
8223
|
+
const first = firstEdgeIndexes[ordinal];
|
|
8224
|
+
const last = firstEdgeIndexes[ordinal + 1];
|
|
8225
|
+
for (let edgeIndex = first; edgeIndex < last; edgeIndex += edgeFieldsCount) {
|
|
8226
|
+
const edgeType = containmentEdges.getValue(edgeIndex + edgeTypeOffset);
|
|
8227
|
+
if (edgeType === edgeShortcutType || edgeType === edgeWeakType) {
|
|
8228
|
+
continue;
|
|
8229
|
+
}
|
|
8230
|
+
const childNodeIndex = containmentEdges.getValue(edgeIndex + edgeToNodeOffset);
|
|
8231
|
+
const childOrdinal = childNodeIndex / nodeFieldCount;
|
|
8232
|
+
if (childOrdinal === ordinal || isFixed.getBit(childOrdinal)) {
|
|
8233
|
+
continue;
|
|
8234
|
+
}
|
|
8235
|
+
const merged = this.mergeNativeContextOwner(attribution[childOrdinal], current);
|
|
8236
|
+
if (merged !== attribution[childOrdinal]) {
|
|
8237
|
+
attribution[childOrdinal] = merged;
|
|
8238
|
+
queue.push(childOrdinal);
|
|
8239
|
+
}
|
|
8240
|
+
}
|
|
8241
|
+
}
|
|
8242
|
+
}
|
|
8243
|
+
getNativeContextSizes() {
|
|
8244
|
+
return this.#nativeContextSizes;
|
|
8245
|
+
}
|
|
8246
|
+
nodeNativeContext(nodeIndex) {
|
|
8247
|
+
const ordinal = nodeIndex / this.nodeFieldCount;
|
|
8248
|
+
const nativeContextOrdinal = this.nodeNativeContextAttribution[ordinal];
|
|
8249
|
+
if (nativeContextOrdinal < 0) {
|
|
8250
|
+
return nativeContextOrdinal;
|
|
8251
|
+
}
|
|
8252
|
+
return nativeContextOrdinal * this.nodeFieldCount;
|
|
8253
|
+
}
|
|
8254
|
+
isNativeContext(nodeOrdinal) {
|
|
8255
|
+
const nameIdx = this.nodes.getValue(nodeOrdinal * this.nodeFieldCount + this.nodeNameOffset);
|
|
8256
|
+
const name = this.strings[nameIdx];
|
|
8257
|
+
return name === 'system / NativeContext' || name.startsWith('system / NativeContext / ') ||
|
|
8258
|
+
name === 'Detached system / NativeContext' || name.startsWith('Detached system / NativeContext / ');
|
|
8259
|
+
}
|
|
8057
8260
|
interfaceDefinitions() {
|
|
8058
8261
|
return JSON.stringify(this.#interfaceDefinitions ?? []);
|
|
8059
8262
|
}
|
|
@@ -8232,7 +8435,6 @@ class HeapSnapshot {
|
|
|
8232
8435
|
if (this.nodeDetachednessAndClassIndexOffset === -1) {
|
|
8233
8436
|
return;
|
|
8234
8437
|
}
|
|
8235
|
-
console.time('propagateDOMState');
|
|
8236
8438
|
const visited = new Uint8Array(this.nodeCount);
|
|
8237
8439
|
const attached = [];
|
|
8238
8440
|
const detached = [];
|
|
@@ -8291,7 +8493,6 @@ class HeapSnapshot {
|
|
|
8291
8493
|
}
|
|
8292
8494
|
propagateState(this, nodeOrdinal, 2 );
|
|
8293
8495
|
}
|
|
8294
|
-
console.timeEnd('propagateDOMState');
|
|
8295
8496
|
}
|
|
8296
8497
|
buildSamples() {
|
|
8297
8498
|
const samples = this.#rawSamples;
|
|
@@ -8481,7 +8682,7 @@ class HeapSnapshot {
|
|
|
8481
8682
|
return new HeapSnapshotEdgesProvider(this, filter, node.retainers(), indexProvider);
|
|
8482
8683
|
}
|
|
8483
8684
|
getRetainingPaths(nodeIndex, maxDepth = 30, maxNodes = 5000, maxSiblings = 100) {
|
|
8484
|
-
const { nodeFieldCount, firstRetainerIndex, retainingNodes, retainingEdges, edgeTypeOffset, edgeWeakType, containmentEdges } = this;
|
|
8685
|
+
const { nodeFieldCount, firstRetainerIndex, retainingNodes, retainingEdges, edgeTypeOffset, edgeWeakType, containmentEdges, } = this;
|
|
8485
8686
|
const distances = this.#nodeDistancesForRetainersView ?? this.nodeDistances;
|
|
8486
8687
|
let traversedNodesCount = 0;
|
|
8487
8688
|
const visiting = new Set();
|
|
@@ -9279,7 +9480,7 @@ class JSHeapSnapshot extends HeapSnapshot {
|
|
|
9279
9480
|
jsArrays: sizeJSArrays,
|
|
9280
9481
|
strings: sizeStrings,
|
|
9281
9482
|
system: sizeSystem,
|
|
9282
|
-
}
|
|
9483
|
+
},
|
|
9283
9484
|
};
|
|
9284
9485
|
}
|
|
9285
9486
|
calculateArraySize(node) {
|