Skip to content

Commit e4fd8e9

Browse files
committed
Update isReachableFromOpaqueRoots to use ASCIILiteral
https://bugs.webkit.org/show_bug.cgi?id=273382 Reviewed by Darin Adler. * Source/JavaScriptCore/API/JSAPIWrapperObject.mm: (JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots): * Source/JavaScriptCore/API/JSManagedValue.mm: (JSManagedValueHandleOwner::isReachableFromOpaqueRoots): * Source/JavaScriptCore/API/glib/JSAPIWrapperObjectGLib.cpp: (JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots): * Source/JavaScriptCore/heap/HeapAnalyzer.h: * Source/JavaScriptCore/heap/HeapSnapshotBuilder.cpp: (JSC::HeapSnapshotBuilder::setOpaqueRootReachabilityReasonForCell): (JSC::HeapSnapshotBuilder::json): * Source/JavaScriptCore/heap/HeapSnapshotBuilder.h: * Source/JavaScriptCore/heap/WeakBlock.cpp: (JSC::WeakBlock::specializedVisit): * Source/JavaScriptCore/heap/WeakHandleOwner.cpp: (JSC::WeakHandleOwner::isReachableFromOpaqueRoots): * Source/JavaScriptCore/heap/WeakHandleOwner.h: * Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp: * Source/JavaScriptCore/runtime/SimpleTypedArrayController.cpp: (JSC::SimpleTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots): * Source/JavaScriptCore/runtime/SimpleTypedArrayController.h: * Source/JavaScriptCore/tools/JSDollarVM.cpp: * Source/WebCore/bindings/js/JSAbortSignalCustom.cpp: (WebCore::JSAbortSignalOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSCSSRuleListCustom.cpp: (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackDataWeak::WeakOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSCallbackData.h: * Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSDeprecatedCSSOMValueCustom.cpp: (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSIntersectionObserverCustom.cpp: (WebCore::JSIntersectionObserverOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSMutationObserverCustom.cpp: (WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSNodeCustom.cpp: (WebCore::JSNodeOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSOffscreenCanvasRenderingContext2DCustom.cpp: (WebCore::JSOffscreenCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSPaintRenderingContext2DCustom.cpp: (WebCore::JSPaintRenderingContext2DOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSPerformanceObserverCustom.cpp: (WebCore::JSPerformanceObserverOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSResizeObserverCustom.cpp: (WebCore::JSResizeObserverOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp: (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/JSUndoItemCustom.cpp: (WebCore::JSUndoItemOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/WebCoreTypedArrayController.cpp: (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/js/WebCoreTypedArrayController.h: * Source/WebCore/bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp: (WebCore::JSExposedToWorkerAndWindowOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.h: * Source/WebCore/bindings/scripts/test/JS/JSShadowRealmGlobalScope.cpp: (WebCore::JSShadowRealmGlobalScopeOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSShadowRealmGlobalScope.h: * Source/WebCore/bindings/scripts/test/JS/JSTestAsyncIterable.cpp: (WebCore::JSTestAsyncIterableOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestAsyncIterable.h: * Source/WebCore/bindings/scripts/test/JS/JSTestAsyncKeyValueIterable.cpp: (WebCore::JSTestAsyncKeyValueIterableOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestAsyncKeyValueIterable.h: * Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp: (WebCore::JSTestCEReactionsOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.h: * Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: (WebCore::JSTestCEReactionsStringifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::JSTestCallTracerOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.h: * Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::JSTestClassWithJSBuiltinConstructorOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h: * Source/WebCore/bindings/scripts/test/JS/JSTestConditionalIncludes.cpp: (WebCore::JSTestConditionalIncludesOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestConditionalIncludes.h: * Source/WebCore/bindings/scripts/test/JS/JSTestConditionallyReadWrite.cpp: (WebCore::JSTestConditionallyReadWriteOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestConditionallyReadWrite.h: * Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSON.cpp: (WebCore::JSTestDefaultToJSONOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSON.h: * Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.cpp: (WebCore::JSTestDefaultToJSONFilteredByExposedOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.h: * Source/WebCore/bindings/scripts/test/JS/JSTestDelegateToSharedSyntheticAttribute.cpp: (WebCore::JSTestDelegateToSharedSyntheticAttributeOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestDelegateToSharedSyntheticAttribute.h: * Source/WebCore/bindings/scripts/test/JS/JSTestDomainSecurity.cpp: (WebCore::JSTestDomainSecurityOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestDomainSecurity.h: * Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: (WebCore::JSTestEnabledBySettingOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.h: * Source/WebCore/bindings/scripts/test/JS/JSTestEnabledForContext.cpp: (WebCore::JSTestEnabledForContextOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestEnabledForContext.h: * Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp: (WebCore::JSTestExceptionOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestException.h: * Source/WebCore/bindings/scripts/test/JS/JSTestGenerateAddOpaqueRoot.cpp: (WebCore::JSTestGenerateAddOpaqueRootOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestGenerateAddOpaqueRoot.h: * Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h: * Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::JSTestGlobalObjectOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h: * Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::JSTestIndexedSetterNoIdentifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::JSTestIndexedSetterThrowingExceptionOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h: * Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::JSTestIndexedSetterWithIdentifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h: * Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: (WebCore::JSTestInterfaceLeadingUnderscoreOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h: * Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::JSTestIterableOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestIterable.h: * Source/WebCore/bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp: (WebCore::JSTestLegacyFactoryFunctionOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestLegacyFactoryFunction.h: * Source/WebCore/bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.cpp: (WebCore::JSTestLegacyNoInterfaceObjectOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.h: * Source/WebCore/bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.cpp: (WebCore::JSTestLegacyOverrideBuiltInsOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.h: * Source/WebCore/bindings/scripts/test/JS/JSTestMapLike.cpp: (WebCore::JSTestMapLikeOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestMapLike.h: * Source/WebCore/bindings/scripts/test/JS/JSTestMapLikeWithOverriddenOperations.cpp: (WebCore::JSTestMapLikeWithOverriddenOperationsOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestMapLikeWithOverriddenOperations.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::JSTestNamedAndIndexedSetterNoIdentifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::JSTestNamedAndIndexedSetterWithIdentifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::JSTestNamedDeleterNoIdentifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::JSTestNamedDeleterThrowingExceptionOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::JSTestNamedDeleterWithIdentifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::JSTestNamedDeleterWithIndexedGetterOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: (WebCore::JSTestNamedGetterCallWithOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: (WebCore::JSTestNamedGetterNoIdentifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: (WebCore::JSTestNamedGetterWithIdentifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::JSTestNamedSetterNoIdentifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::JSTestNamedSetterThrowingExceptionOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::JSTestNamedSetterWithIdentifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::JSTestNamedSetterWithIndexedGetterOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.cpp: (WebCore::JSTestNamedSetterWithLegacyOverrideBuiltInsOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp: (WebCore::JSTestNamedSetterWithLegacyUnforgeablePropertiesOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.h: * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp: (WebCore::JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltInsOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.h: * Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestObj.h: * Source/WebCore/bindings/scripts/test/JS/JSTestOperationConditional.cpp: (WebCore::JSTestOperationConditionalOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestOperationConditional.h: * Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::JSTestOverloadedConstructorsOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h: * Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::JSTestOverloadedConstructorsWithSequenceOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h: * Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::JSTestPluginInterfaceOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.h: * Source/WebCore/bindings/scripts/test/JS/JSTestReadOnlyMapLike.cpp: (WebCore::JSTestReadOnlyMapLikeOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestReadOnlyMapLike.h: * Source/WebCore/bindings/scripts/test/JS/JSTestReadOnlySetLike.cpp: (WebCore::JSTestReadOnlySetLikeOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestReadOnlySetLike.h: * Source/WebCore/bindings/scripts/test/JS/JSTestReportExtraMemoryCost.cpp: (WebCore::JSTestReportExtraMemoryCostOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestReportExtraMemoryCost.h: * Source/WebCore/bindings/scripts/test/JS/JSTestScheduledAction.cpp: (WebCore::JSTestScheduledActionOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestScheduledAction.h: * Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: * Source/WebCore/bindings/scripts/test/JS/JSTestSetLike.cpp: (WebCore::JSTestSetLikeOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestSetLike.h: * Source/WebCore/bindings/scripts/test/JS/JSTestSetLikeWithOverriddenOperations.cpp: (WebCore::JSTestSetLikeWithOverriddenOperationsOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestSetLikeWithOverriddenOperations.h: * Source/WebCore/bindings/scripts/test/JS/JSTestStringContext.cpp: (WebCore::JSTestStringContextOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestStringContext.h: * Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp: (WebCore::JSTestStringifierOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.h: * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: (WebCore::JSTestStringifierAnonymousOperationOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h: * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: (WebCore::JSTestStringifierNamedOperationOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.h: * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: (WebCore::JSTestStringifierOperationImplementedAsOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h: * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: (WebCore::JSTestStringifierOperationNamedToStringOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h: * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: (WebCore::JSTestStringifierReadOnlyAttributeOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h: * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: (WebCore::JSTestStringifierReadWriteAttributeOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h: * Source/WebCore/bindings/scripts/test/JS/JSTestTaggedWrapper.cpp: (WebCore::JSTestTaggedWrapperOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestTaggedWrapper.h: * Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots): * Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h: Canonical link: https://commits.webkit.org/278135@main
1 parent eedb530 commit e4fd8e9

174 files changed

Lines changed: 223 additions & 223 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Source/JavaScriptCore/API/JSAPIWrapperObject.mm‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
class JSAPIWrapperObjectHandleOwner final : public JSC::WeakHandleOwner {
3838
public:
3939
void finalize(JSC::Handle<JSC::Unknown>, void*) final;
40-
bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::AbstractSlotVisitor&, const char**) final;
40+
bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::AbstractSlotVisitor&, ASCIILiteral*) final;
4141
};
4242

4343
static JSAPIWrapperObjectHandleOwner* jsAPIWrapperObjectHandleOwner()
@@ -56,7 +56,7 @@
5656
JSC::WeakSet::deallocate(JSC::WeakImpl::asWeakImpl(handle.slot()));
5757
}
5858

59-
bool JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, JSC::AbstractSlotVisitor& visitor, const char**)
59+
bool JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, JSC::AbstractSlotVisitor& visitor, ASCIILiteral*)
6060
{
6161
JSC::JSAPIWrapperObject* wrapperObject = JSC::jsCast<JSC::JSAPIWrapperObject*>(handle.get().asCell());
6262
// We use the JSGlobalObject when processing weak handles to prevent the situation where using

‎Source/JavaScriptCore/API/JSManagedValue.mm‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
class JSManagedValueHandleOwner final : public JSC::WeakHandleOwner {
4444
public:
4545
void finalize(JSC::Handle<JSC::Unknown>, void* context) final;
46-
bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::AbstractSlotVisitor&, const char**) final;
46+
bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::AbstractSlotVisitor&, ASCIILiteral*) final;
4747
};
4848

4949
static JSManagedValueHandleOwner& managedValueHandleOwner()
@@ -182,10 +182,10 @@ @interface JSManagedValue (PrivateMethods)
182182
- (void)disconnectValue;
183183
@end
184184

185-
bool JSManagedValueHandleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::AbstractSlotVisitor& visitor, const char** reason)
185+
bool JSManagedValueHandleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::AbstractSlotVisitor& visitor, ASCIILiteral* reason)
186186
{
187187
if (UNLIKELY(reason))
188-
*reason = "JSManagedValue is opaque root";
188+
*reason = "JSManagedValue is opaque root"_s;
189189
JSManagedValue *managedValue = (__bridge JSManagedValue *)context;
190190
return visitor.containsOpaqueRoot((__bridge void*)managedValue);
191191
}

‎Source/JavaScriptCore/API/glib/JSAPIWrapperObjectGLib.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
class JSAPIWrapperObjectHandleOwner final : public JSC::WeakHandleOwner {
3838
public:
3939
void finalize(JSC::Handle<JSC::Unknown>, void*) final;
40-
bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::AbstractSlotVisitor&, const char**) final;
40+
bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::AbstractSlotVisitor&, ASCIILiteral*) final;
4141
};
4242

4343
static JSAPIWrapperObjectHandleOwner* jsAPIWrapperObjectHandleOwner()
@@ -56,7 +56,7 @@ void JSAPIWrapperObjectHandleOwner::finalize(JSC::Handle<JSC::Unknown> handle, v
5656
JSC::WeakSet::deallocate(JSC::WeakImpl::asWeakImpl(handle.slot()));
5757
}
5858

59-
bool JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, JSC::AbstractSlotVisitor& visitor, const char**)
59+
bool JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, JSC::AbstractSlotVisitor& visitor, ASCIILiteral*)
6060
{
6161
JSC::JSAPIWrapperObject* wrapperObject = JSC::jsCast<JSC::JSAPIWrapperObject*>(handle.get().asCell());
6262
// We use the JSGlobalObject when processing weak handles to prevent the situation where using

‎Source/JavaScriptCore/heap/HeapAnalyzer.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class JS_EXPORT_PRIVATE HeapAnalyzer {
4646
virtual void analyzeVariableNameEdge(JSCell* from, JSCell* to, UniquedStringImpl* variableName) = 0;
4747
virtual void analyzeIndexEdge(JSCell* from, JSCell* to, uint32_t index) = 0;
4848

49-
virtual void setOpaqueRootReachabilityReasonForCell(JSCell*, const char*) = 0;
49+
virtual void setOpaqueRootReachabilityReasonForCell(JSCell*, ASCIILiteral) = 0;
5050
virtual void setWrappedObjectForCell(JSCell*, void*) = 0;
5151
virtual void setLabelForCell(JSCell*, const String&) = 0;
5252
};

‎Source/JavaScriptCore/heap/HeapSnapshotBuilder.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ void HeapSnapshotBuilder::analyzeIndexEdge(JSCell* from, JSCell* to, uint32_t in
155155
m_edges.append(HeapSnapshotEdge(from, to, index));
156156
}
157157

158-
void HeapSnapshotBuilder::setOpaqueRootReachabilityReasonForCell(JSCell* cell, const char* reason)
158+
void HeapSnapshotBuilder::setOpaqueRootReachabilityReasonForCell(JSCell* cell, ASCIILiteral reason)
159159
{
160-
if (!reason || !*reason || m_snapshotType != SnapshotType::GCDebuggingSnapshot)
160+
if (reason.isEmpty() || m_snapshotType != SnapshotType::GCDebuggingSnapshot)
161161
return;
162162

163163
Locker locker { m_buildingEdgeMutex };
@@ -591,8 +591,8 @@ String HeapSnapshotBuilder::json(Function<bool (const HeapSnapshotNode&)> allowN
591591
json.append(',', result.iterator->value);
592592

593593
unsigned reachabilityReasonIndex = 0;
594-
if (it.value.reachabilityFromOpaqueRootReasons) {
595-
auto result = labelIndexes.add(String::fromLatin1(it.value.reachabilityFromOpaqueRootReasons), nextLabelIndex);
594+
if (!it.value.reachabilityFromOpaqueRootReasons.isNull()) {
595+
auto result = labelIndexes.add(it.value.reachabilityFromOpaqueRootReasons, nextLabelIndex);
596596
if (result.isNewEntry)
597597
nextLabelIndex++;
598598
reachabilityReasonIndex = result.iterator->value;

‎Source/JavaScriptCore/heap/HeapSnapshotBuilder.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class JS_EXPORT_PRIVATE HeapSnapshotBuilder final : public HeapAnalyzer {
125125
void analyzeVariableNameEdge(JSCell* from, JSCell* to, UniquedStringImpl* variableName) final;
126126
void analyzeIndexEdge(JSCell* from, JSCell* to, uint32_t index) final;
127127

128-
void setOpaqueRootReachabilityReasonForCell(JSCell*, const char*) final;
128+
void setOpaqueRootReachabilityReasonForCell(JSCell*, ASCIILiteral) final;
129129
void setWrappedObjectForCell(JSCell*, void*) final;
130130
void setLabelForCell(JSCell*, const String&) final;
131131

@@ -143,7 +143,7 @@ class JS_EXPORT_PRIVATE HeapSnapshotBuilder final : public HeapAnalyzer {
143143
String descriptionForCell(JSCell*) const;
144144

145145
struct RootData {
146-
const char* reachabilityFromOpaqueRootReasons { nullptr };
146+
ASCIILiteral reachabilityFromOpaqueRootReasons;
147147
RootMarkReason markReason { RootMarkReason::None };
148148
};
149149

‎Source/JavaScriptCore/heap/WeakBlock.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ void WeakBlock::specializedVisit(ContainerType& container, Visitor& visitor)
116116
if (visitor.isMarked(container, jsValue.asCell()))
117117
continue;
118118

119-
const char* reason = "";
120-
const char** reasonPtr = nullptr;
119+
ASCIILiteral reason = ""_s;
120+
ASCIILiteral* reasonPtr = nullptr;
121121
if (UNLIKELY(heapAnalyzer))
122122
reasonPtr = &reason;
123123

‎Source/JavaScriptCore/heap/WeakHandleOwner.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ WeakHandleOwner::~WeakHandleOwner()
3535
{
3636
}
3737

38-
bool WeakHandleOwner::isReachableFromOpaqueRoots(Handle<Unknown>, void*, AbstractSlotVisitor&, const char**)
38+
bool WeakHandleOwner::isReachableFromOpaqueRoots(Handle<Unknown>, void*, AbstractSlotVisitor&, ASCIILiteral*)
3939
{
4040
return false;
4141
}

‎Source/JavaScriptCore/heap/WeakHandleOwner.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class JS_EXPORT_PRIVATE WeakHandleOwner {
3535
public:
3636
virtual ~WeakHandleOwner();
3737
// reason will only be non-null when generating a debug GC heap snapshot.
38-
virtual bool isReachableFromOpaqueRoots(Handle<Unknown>, void* context, AbstractSlotVisitor&, char const** reason = nullptr);
38+
virtual bool isReachableFromOpaqueRoots(Handle<Unknown>, void* context, AbstractSlotVisitor&, ASCIILiteral* reason = nullptr);
3939
virtual void finalize(Handle<Unknown>, void* context);
4040
};
4141

‎Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ class HeapHolderFinder final : public HeapAnalyzer {
850850
void analyzeIndexEdge(JSCell* from, JSCell* to, uint32_t) final { analyzeEdge(from, to, RootMarkReason::None); }
851851

852852
void analyzeNode(JSCell*) final { }
853-
void setOpaqueRootReachabilityReasonForCell(JSCell*, const char*) final { }
853+
void setOpaqueRootReachabilityReasonForCell(JSCell*, ASCIILiteral) final { }
854854
void setWrappedObjectForCell(JSCell*, void*) final { }
855855
void setLabelForCell(JSCell*, const String&) final { }
856856

0 commit comments

Comments
 (0)