JSC special function forward declarations (e.g. JSC_DECLARE_HOST_FUNCTION) that are internal to a cpp file should be declared with static to avoid external linkage
https://bugs.webkit.org/show_bug.cgi?id=218159

Reviewed by Darin Adler.

Add static prefix when declarations are constrained to the cpp file. This should help out the linker
by using the correct linkage type.

Source/JavaScriptCore:

* runtime/ArrayPrototype.cpp:
* runtime/AsyncGeneratorFunctionConstructor.cpp:
* runtime/AtomicsObject.cpp:
* runtime/DateConstructor.cpp:
* runtime/DatePrototype.cpp:
* runtime/InspectorInstrumentationObject.cpp:
* runtime/JSDataViewPrototype.cpp:
* runtime/JSONObject.cpp:
* runtime/MathObject.cpp:
* runtime/ObjectConstructor.cpp:
* runtime/RegExpObject.cpp:
* runtime/StringPrototype.cpp:

Source/WebCore:

* page/DOMWindow.idl:
* bindings/js/JSDOMWindowCustom.cpp:
Add ForwardDeclareInHeader to showModalDialog to allow it to be access from JSDOMWindowCustom.cpp. This
also means we can remove the redundant forward declaration.

* bindings/scripts/CodeGeneratorJS.pm:
Prefix declarations that are constrained to the cpp files with static.

* bindings/scripts/test/JS/JSDOMWindow.cpp:
* bindings/scripts/test/JS/JSDedicatedWorkerGlobalScope.cpp:
* bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp:
* bindings/scripts/test/JS/JSPaintWorkletGlobalScope.cpp:
* bindings/scripts/test/JS/JSServiceWorkerGlobalScope.cpp:
* bindings/scripts/test/JS/JSTestCEReactions.cpp:
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
* bindings/scripts/test/JS/JSTestCallTracer.cpp:
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestConditionalIncludes.cpp:
* bindings/scripts/test/JS/JSTestConditionallyReadWrite.cpp:
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
* bindings/scripts/test/JS/JSTestDefaultToJSON.cpp:
* bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.cpp:
* bindings/scripts/test/JS/JSTestDefaultToJSONIndirectInheritance.cpp:
* bindings/scripts/test/JS/JSTestDefaultToJSONInherit.cpp:
* bindings/scripts/test/JS/JSTestDefaultToJSONInheritFinal.cpp:
* bindings/scripts/test/JS/JSTestDomainSecurity.cpp:
* bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
* bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
* bindings/scripts/test/JS/JSTestIterable.cpp:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp:
* bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.cpp:
* bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.cpp:
* bindings/scripts/test/JS/JSTestMapLike.cpp:
* bindings/scripts/test/JS/JSTestMapLikeWithOverriddenOperations.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
* bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
* bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOperationConditional.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
* bindings/scripts/test/JS/JSTestPluginInterface.cpp:
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
* bindings/scripts/test/JS/JSTestReadOnlyMapLike.cpp:
* bindings/scripts/test/JS/JSTestReadOnlySetLike.cpp:
* bindings/scripts/test/JS/JSTestReportExtraMemoryCost.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSetLike.cpp:
* bindings/scripts/test/JS/JSTestSetLikeWithOverriddenOperations.cpp:
* bindings/scripts/test/JS/JSTestStringifier.cpp:
* bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
* bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
* bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
* bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
* bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
* bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSWorkerGlobalScope.cpp:
* bindings/scripts/test/JS/JSWorkletGlobalScope.cpp:
Update tests with new output.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMapLikeWithOverriddenOperations.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestMapLikeWithOverriddenOperations.cpp
index 8d96dc4..f7237ae 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestMapLikeWithOverriddenOperations.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMapLikeWithOverriddenOperations.cpp
@@ -51,21 +51,21 @@
 
 // Functions
 
-JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_clear);
-JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_get);
-JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_has);
-JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_entries);
-JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_keys);
-JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_values);
-JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_forEach);
-JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_delete);
+static JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_clear);
+static JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_get);
+static JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_has);
+static JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_entries);
+static JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_keys);
+static JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_values);
+static JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_forEach);
+static JSC_DECLARE_HOST_FUNCTION(jsTestMapLikeWithOverriddenOperationsPrototypeFunction_delete);
 
 // Attributes
 
-JSC_DECLARE_CUSTOM_GETTER(jsTestMapLikeWithOverriddenOperationsConstructor);
-JSC_DECLARE_CUSTOM_GETTER(jsTestMapLikeWithOverriddenOperations_set);
-JSC_DECLARE_CUSTOM_SETTER(setJSTestMapLikeWithOverriddenOperations_set);
-JSC_DECLARE_CUSTOM_GETTER(jsTestMapLikeWithOverriddenOperations_size);
+static JSC_DECLARE_CUSTOM_GETTER(jsTestMapLikeWithOverriddenOperationsConstructor);
+static JSC_DECLARE_CUSTOM_GETTER(jsTestMapLikeWithOverriddenOperations_set);
+static JSC_DECLARE_CUSTOM_SETTER(setJSTestMapLikeWithOverriddenOperations_set);
+static JSC_DECLARE_CUSTOM_GETTER(jsTestMapLikeWithOverriddenOperations_size);
 
 class JSTestMapLikeWithOverriddenOperationsPrototype final : public JSC::JSNonFinalObject {
 public: