2016-02-24 21:41:51 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 Canon Inc.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted, provided that the following conditions
|
|
|
|
* are required to be met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. Neither the name of Canon Inc. nor the names of
|
|
|
|
* its contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS "AS IS" AND ANY
|
|
|
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
* DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
|
|
|
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
|
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
2016-04-30 19:16:00 +00:00
|
|
|
#pragma once
|
2016-02-24 21:41:51 +00:00
|
|
|
|
2016-03-08 18:09:40 +00:00
|
|
|
#include "FetchBodyOwner.h"
|
2017-07-28 17:29:12 +00:00
|
|
|
#include "FetchHeaders.h"
|
2018-01-29 23:39:21 +00:00
|
|
|
#include "ReadableStreamSink.h"
|
2016-02-24 21:41:51 +00:00
|
|
|
#include "ResourceResponse.h"
|
2018-02-07 05:20:34 +00:00
|
|
|
#include <JavaScriptCore/TypedArrays.h>
|
2021-06-10 18:53:20 +00:00
|
|
|
#include <wtf/Span.h>
|
2019-01-05 00:01:43 +00:00
|
|
|
#include <wtf/WeakPtr.h>
|
2016-02-24 21:41:51 +00:00
|
|
|
|
|
|
|
namespace JSC {
|
[JSC] Change signature of HostFunction to (JSGlobalObject*, CallFrame*)
https://bugs.webkit.org/show_bug.cgi?id=202569
Reviewed by Saam Barati.
Source/JavaScriptCore:
This patch changes JSC host-functions's signature from `CallFrame*` to `JSGlobalObject*, CallFrame*`.
We would like to replace the current `ExecState*` use with `JSGlobalObject*` to fix many issues, remove
globalExec() hack, and remove `ExecState::vm()` hack. This is important since this hack prevents us from
implementing scalable IsoSubspace optimization, which leads to putting all JS cells in each IsoSubspace.
To get lexical JSGlobalObject in a super fast way, we put it in JSFunction/InternalFunction's field.
And trampoline gets JSGlobalObject from callee, and passes it as its argument. Since this trampoline already
accesses to the field of callee to get executable address, getting another field is fairly cheap.
The memory increase does not matter in this case. The sizeof(JSFunction) is 40. Since our allocation size of
JSCells are rounded by 16, increasing one field does not change the actual allocation size. And # of InternalFunction
is very limited since it is only used for constructors in JSC.
This patch changes the signature. And for the ExecState* -> JSGlobalObject* preparation, we use `CallFrame*` name
instead of `ExecState*` in the host-functions. And use `callFrame` variable name instead of `state` or `exec`.
And we also get VM& from `JSGlobalObject*` instead of `CallFrame*` since it is faster.
* API/APICallbackFunction.h:
(JSC::APICallbackFunction::call):
(JSC::APICallbackFunction::construct):
* API/APICast.h:
* API/JSAPIGlobalObject.mm:
(JSC::JSAPIGlobalObject::moduleLoaderFetch):
* API/JSBaseInternal.h:
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject<Parent>::construct):
(JSC::JSCallbackObject<Parent>::call):
* bytecode/InlineCallFrame.h:
* debugger/Debugger.h:
* dfg/DFGArithMode.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleTypedArrayConstructor):
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
* dfg/DFGGraph.h:
* dfg/DFGOSREntry.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):
* ftl/FTLOSREntry.h:
* inspector/ConsoleMessage.h:
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::makeAsyncCall):
* inspector/InjectedScriptManager.h:
* inspector/JSGlobalObjectInspectorController.h:
* inspector/JSInjectedScriptHostPrototype.cpp:
(Inspector::jsInjectedScriptHostPrototypeAttributeEvaluate):
(Inspector::jsInjectedScriptHostPrototypeAttributeSavedResultAlias):
(Inspector::jsInjectedScriptHostPrototypeFunctionInternalConstructorName):
(Inspector::jsInjectedScriptHostPrototypeFunctionIsHTMLAllCollection):
(Inspector::jsInjectedScriptHostPrototypeFunctionIsPromiseRejectedWithNativeGetterTypeError):
(Inspector::jsInjectedScriptHostPrototypeFunctionProxyTargetValue):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakMapSize):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakMapEntries):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakSetSize):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakSetEntries):
(Inspector::jsInjectedScriptHostPrototypeFunctionIteratorEntries):
(Inspector::jsInjectedScriptHostPrototypeFunctionQueryInstances):
(Inspector::jsInjectedScriptHostPrototypeFunctionQueryHolders):
(Inspector::jsInjectedScriptHostPrototypeFunctionEvaluateWithScopeExtension):
(Inspector::jsInjectedScriptHostPrototypeFunctionSubtype):
(Inspector::jsInjectedScriptHostPrototypeFunctionFunctionDetails):
(Inspector::jsInjectedScriptHostPrototypeFunctionGetInternalProperties):
* inspector/JSJavaScriptCallFramePrototype.cpp:
(Inspector::jsJavaScriptCallFramePrototypeFunctionEvaluateWithScopeExtension):
(Inspector::jsJavaScriptCallFramePrototypeFunctionScopeDescriptions):
(Inspector::jsJavaScriptCallFrameAttributeCaller):
(Inspector::jsJavaScriptCallFrameAttributeSourceID):
(Inspector::jsJavaScriptCallFrameAttributeLine):
(Inspector::jsJavaScriptCallFrameAttributeColumn):
(Inspector::jsJavaScriptCallFrameAttributeFunctionName):
(Inspector::jsJavaScriptCallFrameAttributeScopeChain):
(Inspector::jsJavaScriptCallFrameAttributeThisObject):
(Inspector::jsJavaScriptCallFrameAttributeType):
(Inspector::jsJavaScriptCallFrameIsTailDeleted):
* inspector/ScriptArguments.h:
* inspector/ScriptCallStackFactory.h:
* inspector/ScriptDebugServer.h:
* inspector/agents/InspectorConsoleAgent.h:
* interpreter/AbstractPC.h:
* interpreter/CallFrame.h:
(JSC::ExecState::guaranteedJSValueCallee const): Deleted.
(JSC::ExecState::jsCallee const): Deleted.
(JSC::ExecState::callee const): Deleted.
(JSC::ExecState::unsafeCallee const): Deleted.
(JSC::ExecState::codeBlock const): Deleted.
(JSC::ExecState::addressOfCodeBlock const): Deleted.
(JSC::ExecState::unsafeCodeBlock const): Deleted.
(JSC::ExecState::scope const): Deleted.
(JSC::ExecState::create): Deleted.
(JSC::ExecState::registers): Deleted.
(JSC::ExecState::registers const): Deleted.
(JSC::ExecState::operator=): Deleted.
(JSC::ExecState::callerFrame const): Deleted.
(JSC::ExecState::callerFrameOrEntryFrame const): Deleted.
(JSC::ExecState::unsafeCallerFrameOrEntryFrame const): Deleted.
(JSC::ExecState::callerFrameOffset): Deleted.
(JSC::ExecState::returnPC const): Deleted.
(JSC::ExecState::hasReturnPC const): Deleted.
(JSC::ExecState::clearReturnPC): Deleted.
(JSC::ExecState::returnPCOffset): Deleted.
(JSC::ExecState::abstractReturnPC): Deleted.
(JSC::ExecState::topOfFrame): Deleted.
(JSC::ExecState::setCallerFrame): Deleted.
(JSC::ExecState::setScope): Deleted.
(JSC::ExecState::argumentCount const): Deleted.
(JSC::ExecState::argumentCountIncludingThis const): Deleted.
(JSC::ExecState::argumentOffset): Deleted.
(JSC::ExecState::argumentOffsetIncludingThis): Deleted.
(JSC::ExecState::addressOfArgumentsStart const): Deleted.
(JSC::ExecState::argument): Deleted.
(JSC::ExecState::uncheckedArgument): Deleted.
(JSC::ExecState::setArgument): Deleted.
(JSC::ExecState::getArgumentUnsafe): Deleted.
(JSC::ExecState::thisArgumentOffset): Deleted.
(JSC::ExecState::thisValue): Deleted.
(JSC::ExecState::setThisValue): Deleted.
(JSC::ExecState::newTarget): Deleted.
(JSC::ExecState::offsetFor): Deleted.
(JSC::ExecState::noCaller): Deleted.
(JSC::ExecState::isGlobalExec const): Deleted.
(JSC::ExecState::setArgumentCountIncludingThis): Deleted.
(JSC::ExecState::setCallee): Deleted.
(JSC::ExecState::setCodeBlock): Deleted.
(JSC::ExecState::setReturnPC): Deleted.
(JSC::ExecState::iterate): Deleted.
(JSC::ExecState::argIndexForRegister): Deleted.
(JSC::ExecState::callerFrameAndPC): Deleted.
(JSC::ExecState::callerFrameAndPC const): Deleted.
(JSC::ExecState::unsafeCallerFrameAndPC const): Deleted.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeProgram):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeModuleProgram):
* interpreter/ProtoCallFrame.h:
(JSC::ProtoCallFrame::init):
* interpreter/Register.h:
* interpreter/ShadowChicken.h:
* interpreter/StackVisitor.h:
* interpreter/VMEntryRecord.h:
(JSC::VMEntryRecord::prevTopCallFrame):
(JSC::VMEntryRecord::unsafePrevTopCallFrame):
* jit/CCallHelpers.h:
* jit/JITExceptions.h:
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/ThunkGenerators.cpp:
(JSC::nativeForGenerator):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionPrintStdOut):
(functionPrintStdErr):
(functionDebug):
(functionDescribe):
(functionDescribeArray):
(functionSleepSeconds):
(functionJSCStack):
(functionGCAndSweep):
(functionFullGC):
(functionEdenGC):
(functionHeapSize):
(functionResetMemoryPeak):
(functionAddressOf):
(functionVersion):
(functionRun):
(functionRunString):
(functionLoad):
(functionLoadString):
(functionReadFile):
(functionCheckSyntax):
(functionSetSamplingFlags):
(functionClearSamplingFlags):
(functionGetRandomSeed):
(functionSetRandomSeed):
(functionIsRope):
(functionCallerSourceOrigin):
(functionReadline):
(functionPreciseTime):
(functionNeverInlineFunction):
(functionNoDFG):
(functionNoFTL):
(functionNoOSRExitFuzzing):
(functionOptimizeNextInvocation):
(functionNumberOfDFGCompiles):
(functionCallerIsOMGCompiled):
(functionDollarCreateRealm):
(functionDollarEvalScript):
(functionDollarAgentStart):
(functionDollarAgentReceiveBroadcast):
(functionDollarAgentReport):
(functionDollarAgentSleep):
(functionDollarAgentBroadcast):
(functionDollarAgentGetReport):
(functionDollarAgentLeaving):
(functionDollarAgentMonotonicNow):
(functionWaitForReport):
(functionHeapCapacity):
(functionFlashHeapAccess):
(functionDisableRichSourceInfo):
(functionMallocInALoop):
(functionTotalCompileTime):
(functionJSCOptions):
(functionReoptimizationRetryCount):
(functionTransferArrayBuffer):
(functionFailNextNewCodeBlock):
(functionQuit):
(functionFalse):
(functionUndefined1):
(functionUndefined2):
(functionIsInt32):
(functionIsPureNaN):
(functionIdentity):
(functionEffectful42):
(functionMakeMasquerader):
(functionHasCustomProperties):
(functionDumpTypesForAllVariables):
(functionDrainMicrotasks):
(functionReleaseWeakRefs):
(functionIs32BitPlatform):
(functionCreateGlobalObject):
(functionCheckModuleSyntax):
(functionPlatformSupportsSamplingProfiler):
(functionGenerateHeapSnapshot):
(functionGenerateHeapSnapshotForGCDebugging):
(functionResetSuperSamplerState):
(functionEnsureArrayStorage):
(functionStartSamplingProfiler):
(functionSamplingProfilerStackTraces):
(functionMaxArguments):
(functionAsyncTestStart):
(functionAsyncTestPassed):
(functionWebAssemblyMemoryMode):
(functionSetUnhandledRejectionCallback):
(runWithOptions):
(functionDollarDetachArrayBuffer): Deleted.
* llint/LLIntExceptions.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::handleHostCall):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.cpp:
(JSC::CLoopRegister::callFrame const):
(JSC::CLoopRegister::execState const): Deleted.
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* offlineasm/cloop.rb:
* runtime/ArrayBufferView.h:
* runtime/ArrayConstructor.cpp:
(JSC::constructArrayWithSizeQuirk):
(JSC::constructWithArrayConstructor):
(JSC::callArrayConstructor):
(JSC::arrayConstructorPrivateFuncIsArraySlow):
* runtime/ArrayConstructor.h:
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSpeciesCreate):
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
(JSC::arrayProtoPrivateFuncConcatMemcpy):
(JSC::arrayProtoPrivateFuncAppendMemcpy):
* runtime/ArrayPrototype.h:
* runtime/AsyncFunctionConstructor.cpp:
(JSC::callAsyncFunctionConstructor):
(JSC::constructAsyncFunctionConstructor):
* runtime/AsyncGeneratorFunctionConstructor.cpp:
(JSC::callAsyncGeneratorFunctionConstructor):
(JSC::constructAsyncGeneratorFunctionConstructor):
* runtime/AtomicsObject.cpp:
(JSC::atomicsFuncAdd):
(JSC::atomicsFuncAnd):
(JSC::atomicsFuncCompareExchange):
(JSC::atomicsFuncExchange):
(JSC::atomicsFuncIsLockFree):
(JSC::atomicsFuncLoad):
(JSC::atomicsFuncOr):
(JSC::atomicsFuncStore):
(JSC::atomicsFuncSub):
(JSC::atomicsFuncWait):
(JSC::atomicsFuncWake):
(JSC::atomicsFuncXor):
* runtime/BigIntConstructor.cpp:
(JSC::callBigIntConstructor):
(JSC::bigIntConstructorFuncAsUintN):
(JSC::bigIntConstructorFuncAsIntN):
* runtime/BigIntPrototype.cpp:
(JSC::bigIntProtoFuncToStringImpl):
(JSC::bigIntProtoFuncToString):
(JSC::bigIntProtoFuncToLocaleString):
(JSC::bigIntProtoFuncValueOf):
* runtime/BooleanConstructor.cpp:
(JSC::callBooleanConstructor):
(JSC::constructWithBooleanConstructor):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):
* runtime/CallData.h:
* runtime/CommonSlowPaths.h:
* runtime/Completion.h:
* runtime/ConsoleClient.h:
* runtime/ConsoleObject.cpp:
(JSC::consoleLogWithLevel):
(JSC::consoleProtoFuncDebug):
(JSC::consoleProtoFuncError):
(JSC::consoleProtoFuncLog):
(JSC::consoleProtoFuncInfo):
(JSC::consoleProtoFuncWarn):
(JSC::consoleProtoFuncClear):
(JSC::consoleProtoFuncDir):
(JSC::consoleProtoFuncDirXML):
(JSC::consoleProtoFuncTable):
(JSC::consoleProtoFuncTrace):
(JSC::consoleProtoFuncAssert):
(JSC::consoleProtoFuncCount):
(JSC::consoleProtoFuncCountReset):
(JSC::consoleProtoFuncProfile):
(JSC::consoleProtoFuncProfileEnd):
(JSC::consoleProtoFuncTakeHeapSnapshot):
(JSC::consoleProtoFuncTime):
(JSC::consoleProtoFuncTimeLog):
(JSC::consoleProtoFuncTimeEnd):
(JSC::consoleProtoFuncTimeStamp):
(JSC::consoleProtoFuncGroup):
(JSC::consoleProtoFuncGroupCollapsed):
(JSC::consoleProtoFuncGroupEnd):
(JSC::consoleProtoFuncRecord):
(JSC::consoleProtoFuncRecordEnd):
(JSC::consoleProtoFuncScreenshot):
* runtime/ConstructData.h:
* runtime/DateConstructor.cpp:
(JSC::constructWithDateConstructor):
(JSC::callDate):
(JSC::dateParse):
(JSC::dateNowImpl):
(JSC::dateNow):
(JSC::dateUTC):
* runtime/DateConstructor.h:
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncToLocaleString):
(JSC::dateProtoFuncToLocaleDateString):
(JSC::dateProtoFuncToLocaleTimeString):
(JSC::dateProtoFuncToPrimitiveSymbol):
(JSC::dateProtoFuncGetTime):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
(JSC::dateProtoFuncToJSON):
* runtime/DatePrototype.h:
* runtime/ECMAScriptSpecInternalFunctions.cpp:
(JSC::esSpecIsConstructor):
* runtime/ECMAScriptSpecInternalFunctions.h:
* runtime/Error.h:
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::finishCreation):
(JSC::constructErrorConstructor):
(JSC::callErrorConstructor):
(JSC::ErrorConstructor::put):
(JSC::ErrorConstructor::deleteProperty):
* runtime/ErrorPrototype.cpp:
(JSC::errorProtoFuncToString):
* runtime/ExceptionFuzz.h:
* runtime/FunctionConstructor.cpp:
(JSC::constructWithFunctionConstructor):
(JSC::callFunctionConstructor):
(JSC::constructFunction):
* runtime/FunctionPrototype.cpp:
(JSC::callFunctionPrototype):
(JSC::functionProtoFuncToString):
* runtime/GeneratorFunctionConstructor.cpp:
(JSC::callGeneratorFunctionConstructor):
(JSC::constructGeneratorFunctionConstructor):
* runtime/Identifier.h:
* runtime/InspectorInstrumentationObject.cpp:
(JSC::inspectorInstrumentationObjectLog):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/InternalFunction.h:
(JSC::InternalFunction::offsetOfGlobalObject):
(JSC::InternalFunction::globalObject const):
* runtime/IntlCollatorConstructor.cpp:
(JSC::constructIntlCollator):
(JSC::callIntlCollator):
(JSC::IntlCollatorConstructorFuncSupportedLocalesOf):
* runtime/IntlCollatorConstructor.h:
* runtime/IntlCollatorPrototype.cpp:
(JSC::IntlCollatorFuncCompare):
(JSC::IntlCollatorPrototypeGetterCompare):
(JSC::IntlCollatorPrototypeFuncResolvedOptions):
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::constructIntlDateTimeFormat):
(JSC::callIntlDateTimeFormat):
(JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf):
* runtime/IntlDateTimeFormatConstructor.h:
* runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::IntlDateTimeFormatFuncFormatDateTime):
(JSC::IntlDateTimeFormatPrototypeGetterFormat):
(JSC::IntlDateTimeFormatPrototypeFuncFormatToParts):
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):
* runtime/IntlNumberFormatConstructor.cpp:
(JSC::constructIntlNumberFormat):
(JSC::callIntlNumberFormat):
(JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf):
* runtime/IntlNumberFormatConstructor.h:
* runtime/IntlNumberFormatPrototype.cpp:
(JSC::IntlNumberFormatFuncFormatNumber):
(JSC::IntlNumberFormatPrototypeGetterFormat):
(JSC::IntlNumberFormatPrototypeFuncFormatToParts):
(JSC::IntlNumberFormatPrototypeFuncResolvedOptions):
* runtime/IntlObject.cpp:
(JSC::intlObjectFuncGetCanonicalLocales):
* runtime/IntlPluralRulesConstructor.cpp:
(JSC::constructIntlPluralRules):
(JSC::callIntlPluralRules):
(JSC::IntlPluralRulesConstructorFuncSupportedLocalesOf):
* runtime/IntlPluralRulesConstructor.h:
* runtime/IntlPluralRulesPrototype.cpp:
(JSC::IntlPluralRulesPrototypeFuncSelect):
(JSC::IntlPluralRulesPrototypeFuncResolvedOptions):
* runtime/JSArrayBufferConstructor.cpp:
(JSC::JSGenericArrayBufferConstructor<sharingMode>::finishCreation):
(JSC::JSGenericArrayBufferConstructor<sharingMode>::constructArrayBuffer):
(JSC::callArrayBuffer):
(JSC::arrayBufferFuncIsView):
* runtime/JSArrayBufferConstructor.h:
* runtime/JSArrayBufferPrototype.cpp:
(JSC::arrayBufferProtoFuncSlice):
(JSC::arrayBufferProtoGetterFuncByteLength):
(JSC::sharedArrayBufferProtoGetterFuncByteLength):
* runtime/JSBoundFunction.cpp:
(JSC::boundThisNoArgsFunctionCall):
(JSC::boundFunctionCall):
(JSC::boundThisNoArgsFunctionConstruct):
(JSC::boundFunctionConstruct):
(JSC::isBoundFunction):
(JSC::hasInstanceBoundFunction):
(JSC::JSBoundFunction::boundArgsCopy):
* runtime/JSBoundFunction.h:
* runtime/JSCJSValue.h:
* runtime/JSCell.h:
* runtime/JSCustomGetterSetterFunction.cpp:
(JSC::JSCustomGetterSetterFunction::customGetterSetterFunctionCall):
* runtime/JSCustomGetterSetterFunction.h:
* runtime/JSDataViewPrototype.cpp:
(JSC::getData):
(JSC::setData):
(JSC::dataViewProtoGetterBuffer):
(JSC::dataViewProtoGetterByteLength):
(JSC::dataViewProtoGetterByteOffset):
(JSC::dataViewProtoFuncGetInt8):
(JSC::dataViewProtoFuncGetInt16):
(JSC::dataViewProtoFuncGetInt32):
(JSC::dataViewProtoFuncGetUint8):
(JSC::dataViewProtoFuncGetUint16):
(JSC::dataViewProtoFuncGetUint32):
(JSC::dataViewProtoFuncGetFloat32):
(JSC::dataViewProtoFuncGetFloat64):
(JSC::dataViewProtoFuncSetInt8):
(JSC::dataViewProtoFuncSetInt16):
(JSC::dataViewProtoFuncSetInt32):
(JSC::dataViewProtoFuncSetUint8):
(JSC::dataViewProtoFuncSetUint16):
(JSC::dataViewProtoFuncSetUint32):
(JSC::dataViewProtoFuncSetFloat32):
(JSC::dataViewProtoFuncSetFloat64):
* runtime/JSDateMath.h:
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::prototypeForConstruction):
(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::initializeRareData):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSFunction.h:
(JSC::JSFunction::offsetOfGlobalObject):
(JSC::JSFunction::globalObject const):
* runtime/JSFunctionInlines.h:
(JSC::JSFunction::JSFunction):
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayView):
(JSC::callGenericTypedArrayView):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):
* runtime/JSGlobalObject.cpp:
(JSC::makeBoundFunction):
(JSC::hasOwnLengthProperty):
(JSC::assertCall):
(JSC::enqueueJob):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
(JSC::globalFuncParseInt):
(JSC::globalFuncParseFloat):
(JSC::globalFuncDecodeURI):
(JSC::globalFuncDecodeURIComponent):
(JSC::globalFuncEncodeURI):
(JSC::globalFuncEncodeURIComponent):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
(JSC::globalFuncThrowTypeError):
(JSC::globalFuncThrowTypeErrorArgumentsCalleeAndCaller):
(JSC::globalFuncMakeTypeError):
(JSC::globalFuncProtoGetter):
(JSC::globalFuncProtoSetter):
(JSC::globalFuncHostPromiseRejectionTracker):
(JSC::globalFuncBuiltinLog):
(JSC::globalFuncBuiltinDescribe):
(JSC::globalFuncImportModule):
(JSC::globalFuncPropertyIsEnumerable):
(JSC::globalFuncOwnKeys):
(JSC::globalFuncDateTimeFormat):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSLock.h:
* runtime/JSModuleLoader.cpp:
(JSC::moduleLoaderParseModule):
(JSC::moduleLoaderRequestedModules):
(JSC::moduleLoaderModuleDeclarationInstantiation):
(JSC::moduleLoaderResolve):
(JSC::moduleLoaderResolveSync):
(JSC::moduleLoaderFetch):
(JSC::moduleLoaderGetModuleNamespaceObject):
(JSC::moduleLoaderEvaluate):
* runtime/JSNativeStdFunction.cpp:
(JSC::runStdFunction):
* runtime/JSNativeStdFunction.h:
* runtime/JSONObject.cpp:
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
* runtime/JSObject.cpp:
(JSC::objectPrivateFuncInstanceOf):
* runtime/JSObject.h:
* runtime/JSTypedArrayViewConstructor.cpp:
(JSC::constructTypedArrayView):
* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::typedArrayViewPrivateFuncIsTypedArrayView):
(JSC::typedArrayViewPrivateFuncLength):
(JSC::typedArrayViewPrivateFuncGetOriginalConstructor):
(JSC::typedArrayViewPrivateFuncSort):
(JSC::typedArrayViewProtoFuncSet):
(JSC::typedArrayViewProtoFuncCopyWithin):
(JSC::typedArrayViewProtoFuncIncludes):
(JSC::typedArrayViewProtoFuncLastIndexOf):
(JSC::typedArrayViewProtoFuncIndexOf):
(JSC::typedArrayViewProtoFuncJoin):
(JSC::typedArrayViewProtoGetterFuncBuffer):
(JSC::typedArrayViewProtoGetterFuncLength):
(JSC::typedArrayViewProtoGetterFuncByteLength):
(JSC::typedArrayViewProtoGetterFuncByteOffset):
(JSC::typedArrayViewProtoFuncReverse):
(JSC::typedArrayViewPrivateFuncSubarrayCreate):
(JSC::typedArrayViewProtoFuncSlice):
(JSC::typedArrayViewProtoGetterFuncToStringTag):
* runtime/JSTypedArrayViewPrototype.h:
* runtime/MapConstructor.cpp:
(JSC::callMap):
(JSC::constructMap):
(JSC::mapPrivateFuncMapBucketHead):
(JSC::mapPrivateFuncMapBucketNext):
(JSC::mapPrivateFuncMapBucketKey):
(JSC::mapPrivateFuncMapBucketValue):
* runtime/MapConstructor.h:
* runtime/MapPrototype.cpp:
(JSC::getMap):
(JSC::mapProtoFuncClear):
(JSC::mapProtoFuncDelete):
(JSC::mapProtoFuncGet):
(JSC::mapProtoFuncHas):
(JSC::mapProtoFuncSet):
(JSC::mapProtoFuncSize):
* runtime/MathObject.cpp:
(JSC::mathProtoFuncAbs):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncCeil):
(JSC::mathProtoFuncClz32):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncFloor):
(JSC::mathProtoFuncHypot):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
(JSC::mathProtoFuncRandom):
(JSC::mathProtoFuncRound):
(JSC::mathProtoFuncSign):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncSqrt):
(JSC::mathProtoFuncTan):
(JSC::mathProtoFuncIMul):
(JSC::mathProtoFuncACosh):
(JSC::mathProtoFuncASinh):
(JSC::mathProtoFuncATanh):
(JSC::mathProtoFuncCbrt):
(JSC::mathProtoFuncCosh):
(JSC::mathProtoFuncExpm1):
(JSC::mathProtoFuncFround):
(JSC::mathProtoFuncLog1p):
(JSC::mathProtoFuncLog10):
(JSC::mathProtoFuncLog2):
(JSC::mathProtoFuncSinh):
(JSC::mathProtoFuncTanh):
(JSC::mathProtoFuncTrunc):
* runtime/MathObject.h:
* runtime/Microtask.h:
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor<errorType>::constructNativeErrorConstructor):
(JSC::NativeErrorConstructor<errorType>::callNativeErrorConstructor):
* runtime/NativeErrorConstructor.h:
* runtime/NativeFunction.h:
(JSC::NativeFunction::operator()):
(JSC::TaggedNativeFunction::operator()):
* runtime/NullGetterFunction.cpp:
(JSC::NullGetterFunctionInternal::callReturnUndefined):
* runtime/NullSetterFunction.cpp:
(JSC::NullSetterFunctionInternal::callReturnUndefined):
* runtime/NumberConstructor.cpp:
(JSC::constructNumberConstructor):
(JSC::callNumberConstructor):
(JSC::numberConstructorFuncIsInteger):
(JSC::numberConstructorFuncIsSafeInteger):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
* runtime/NumberPrototype.h:
* runtime/ObjectConstructor.cpp:
(JSC::constructObjectWithNewTarget):
(JSC::constructWithObjectConstructor):
(JSC::callObjectConstructor):
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorSetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyDescriptors):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorGetOwnPropertySymbols):
(JSC::objectConstructorKeys):
(JSC::objectConstructorAssign):
(JSC::objectConstructorValues):
(JSC::objectConstructorDefineProperty):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):
(JSC::objectConstructorPreventExtensions):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
(JSC::objectConstructorIsExtensible):
(JSC::objectConstructorIs):
(JSC::constructObject): Deleted.
* runtime/ObjectConstructor.h:
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncIsPrototypeOf):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncPropertyIsEnumerable):
(JSC::objectProtoFuncToLocaleString):
(JSC::objectProtoFuncToString):
* runtime/ObjectPrototype.h:
* runtime/ProxyConstructor.cpp:
(JSC::makeRevocableProxy):
(JSC::proxyRevocableConstructorThrowError):
(JSC::constructProxyObject):
(JSC::callProxy):
* runtime/ProxyObject.cpp:
(JSC::performProxyCall):
(JSC::performProxyConstruct):
* runtime/ProxyRevoke.cpp:
(JSC::performProxyRevoke):
* runtime/ReflectObject.cpp:
(JSC::reflectObjectConstruct):
(JSC::reflectObjectDefineProperty):
(JSC::reflectObjectGet):
(JSC::reflectObjectGetOwnPropertyDescriptor):
(JSC::reflectObjectGetPrototypeOf):
(JSC::reflectObjectIsExtensible):
(JSC::reflectObjectOwnKeys):
(JSC::reflectObjectPreventExtensions):
(JSC::reflectObjectSet):
(JSC::reflectObjectSetPrototypeOf):
* runtime/RegExpConstructor.cpp:
(JSC::regExpConstructorDollar):
(JSC::regExpConstructorInput):
(JSC::regExpConstructorMultiline):
(JSC::regExpConstructorLastMatch):
(JSC::regExpConstructorLastParen):
(JSC::regExpConstructorLeftContext):
(JSC::regExpConstructorRightContext):
(JSC::setRegExpConstructorInput):
(JSC::setRegExpConstructorMultiline):
(JSC::esSpecRegExpCreate):
(JSC::constructWithRegExpConstructor):
(JSC::callRegExpConstructor):
* runtime/RegExpConstructor.h:
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTestFast):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncMatchFast):
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):
(JSC::regExpProtoGetterGlobal):
(JSC::regExpProtoGetterIgnoreCase):
(JSC::regExpProtoGetterMultiline):
(JSC::regExpProtoGetterDotAll):
(JSC::regExpProtoGetterSticky):
(JSC::regExpProtoGetterUnicode):
(JSC::regExpProtoGetterFlags):
(JSC::regExpProtoGetterSource):
(JSC::regExpProtoFuncSearchFast):
(JSC::regExpProtoFuncSplitFast):
* runtime/RegExpPrototype.h:
* runtime/SetConstructor.cpp:
(JSC::callSet):
(JSC::constructSet):
(JSC::setPrivateFuncSetBucketHead):
(JSC::setPrivateFuncSetBucketNext):
(JSC::setPrivateFuncSetBucketKey):
* runtime/SetConstructor.h:
* runtime/SetPrototype.cpp:
(JSC::getSet):
(JSC::setProtoFuncAdd):
(JSC::setProtoFuncClear):
(JSC::setProtoFuncDelete):
(JSC::setProtoFuncHas):
(JSC::setProtoFuncSize):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCode):
(JSC::stringFromCodePoint):
(JSC::constructWithStringConstructor):
(JSC::callStringConstructor):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncRepeatCharacter):
(JSC::stringProtoFuncReplaceUsingRegExp):
(JSC::stringProtoFuncReplaceUsingStringSearch):
(JSC::stringProtoFuncToString):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncCodePointAt):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplitFast):
(JSC::stringProtoFuncSubstrImpl):
(JSC::stringProtoFuncSubstr):
(JSC::builtinStringSubstrInternal):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncLocaleCompare):
(JSC::toLocaleCase):
(JSC::stringProtoFuncToLocaleLowerCase):
(JSC::stringProtoFuncToLocaleUpperCase):
(JSC::stringProtoFuncTrim):
(JSC::stringProtoFuncTrimStart):
(JSC::stringProtoFuncTrimEnd):
(JSC::stringProtoFuncStartsWith):
(JSC::stringProtoFuncEndsWith):
(JSC::stringIncludesImpl):
(JSC::stringProtoFuncIncludes):
(JSC::builtinStringIncludesInternal):
(JSC::stringProtoFuncIterator):
(JSC::stringProtoFuncNormalize):
* runtime/StringPrototype.h:
* runtime/SymbolConstructor.cpp:
(JSC::callSymbol):
(JSC::symbolConstructorFor):
(JSC::symbolConstructorKeyFor):
* runtime/SymbolPrototype.cpp:
(JSC::symbolProtoGetterDescription):
(JSC::symbolProtoFuncToString):
(JSC::symbolProtoFuncValueOf):
* runtime/ThrowScope.h:
* runtime/TypedArrayController.h:
* runtime/VM.h:
* runtime/VMTraps.h:
* runtime/Watchdog.h:
* runtime/WeakMapConstructor.cpp:
(JSC::callWeakMap):
(JSC::constructWeakMap):
* runtime/WeakMapPrototype.cpp:
(JSC::getWeakMap):
(JSC::protoFuncWeakMapDelete):
(JSC::protoFuncWeakMapGet):
(JSC::protoFuncWeakMapHas):
(JSC::protoFuncWeakMapSet):
* runtime/WeakObjectRefConstructor.cpp:
(JSC::callWeakRef):
(JSC::constructWeakRef):
* runtime/WeakObjectRefPrototype.cpp:
(JSC::getWeakRef):
(JSC::protoFuncWeakRefDeref):
* runtime/WeakSetConstructor.cpp:
(JSC::callWeakSet):
(JSC::constructWeakSet):
* runtime/WeakSetPrototype.cpp:
(JSC::getWeakSet):
(JSC::protoFuncWeakSetDelete):
(JSC::protoFuncWeakSetHas):
(JSC::protoFuncWeakSetAdd):
* tools/JSDollarVM.cpp:
(JSC::DOMJITGetterComplex::functionEnableException):
(JSC::DOMJITFunctionObject::functionWithTypeCheck):
(JSC::DOMJITCheckSubClassObject::functionWithTypeCheck):
(JSC::functionWasmStreamingParserAddBytes):
(JSC::functionWasmStreamingParserFinalize):
(JSC::functionCrash):
(JSC::functionBreakpoint):
(JSC::functionDFGTrue):
(JSC::functionFTLTrue):
(JSC::functionCpuMfence):
(JSC::functionCpuRdtsc):
(JSC::functionCpuCpuid):
(JSC::functionCpuPause):
(JSC::functionCpuClflush):
(JSC::functionLLintTrue):
(JSC::functionJITTrue):
(JSC::functionNoInline):
(JSC::functionGC):
(JSC::functionEdenGC):
(JSC::functionDumpSubspaceHashes):
(JSC::functionCallFrame):
(JSC::functionCodeBlockForFrame):
(JSC::codeBlockFromArg):
(JSC::functionCodeBlockFor):
(JSC::functionDumpSourceFor):
(JSC::functionDumpBytecodeFor):
(JSC::doPrint):
(JSC::functionDataLog):
(JSC::functionPrint):
(JSC::functionDumpCallFrame):
(JSC::functionDumpStack):
(JSC::functionDumpRegisters):
(JSC::functionDumpCell):
(JSC::functionIndexingMode):
(JSC::functionInlineCapacity):
(JSC::functionValue):
(JSC::functionGetPID):
(JSC::functionHaveABadTime):
(JSC::functionIsHavingABadTime):
(JSC::functionCreateGlobalObject):
(JSC::functionCreateProxy):
(JSC::functionCreateRuntimeArray):
(JSC::functionCreateNullRopeString):
(JSC::functionCreateImpureGetter):
(JSC::functionCreateCustomGetterObject):
(JSC::functionCreateDOMJITNodeObject):
(JSC::functionCreateDOMJITGetterObject):
(JSC::functionCreateDOMJITGetterComplexObject):
(JSC::functionCreateDOMJITFunctionObject):
(JSC::functionCreateDOMJITCheckSubClassObject):
(JSC::functionCreateDOMJITGetterBaseJSObject):
(JSC::functionCreateWasmStreamingParser):
(JSC::functionCreateStaticCustomAccessor):
(JSC::functionSetImpureGetterDelegate):
(JSC::functionCreateBuiltin):
(JSC::functionGetPrivateProperty):
(JSC::functionCreateRoot):
(JSC::functionCreateElement):
(JSC::functionGetElement):
(JSC::functionCreateSimpleObject):
(JSC::functionGetHiddenValue):
(JSC::functionSetHiddenValue):
(JSC::functionShadowChickenFunctionsOnStack):
(JSC::functionSetGlobalConstRedeclarationShouldNotThrow):
(JSC::functionFindTypeForExpression):
(JSC::functionReturnTypeFor):
(JSC::functionFlattenDictionaryObject):
(JSC::functionDumpBasicBlockExecutionRanges):
(JSC::functionHasBasicBlockExecuted):
(JSC::functionBasicBlockExecutionCount):
(JSC::functionEnableExceptionFuzz):
(JSC::functionEnableDebuggerModeWhenIdle):
(JSC::functionDisableDebuggerModeWhenIdle):
(JSC::functionDeleteAllCodeWhenIdle):
(JSC::functionGlobalObjectCount):
(JSC::functionGlobalObjectForObject):
(JSC::functionGetGetterSetter):
(JSC::functionLoadGetterFromGetterSetter):
(JSC::functionCreateCustomTestGetterSetter):
(JSC::functionDeltaBetweenButterflies):
(JSC::functionTotalGCTime):
(JSC::functionParseCount):
(JSC::functionIsWasmSupported):
* wasm/WasmEmbedder.h:
* wasm/js/JSWebAssembly.cpp:
(JSC::webAssemblyCompileFunc):
(JSC::webAssemblyInstantiateFunc):
(JSC::webAssemblyValidateFunc):
(JSC::webAssemblyCompileStreamingInternal):
(JSC::webAssemblyInstantiateStreamingInternal):
* wasm/js/JSWebAssembly.h:
* wasm/js/WebAssemblyCompileErrorConstructor.cpp:
(JSC::constructJSWebAssemblyCompileError):
(JSC::callJSWebAssemblyCompileError):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
(JSC::callJSWebAssemblyInstance):
* wasm/js/WebAssemblyInstancePrototype.cpp:
(JSC::webAssemblyInstanceProtoFuncExports):
* wasm/js/WebAssemblyLinkErrorConstructor.cpp:
(JSC::constructJSWebAssemblyLinkError):
(JSC::callJSWebAssemblyLinkError):
* wasm/js/WebAssemblyMemoryConstructor.cpp:
(JSC::constructJSWebAssemblyMemory):
(JSC::callJSWebAssemblyMemory):
* wasm/js/WebAssemblyMemoryPrototype.cpp:
(JSC::webAssemblyMemoryProtoFuncGrow):
(JSC::webAssemblyMemoryProtoFuncBuffer):
* wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::webAssemblyModuleCustomSections):
(JSC::webAssemblyModuleImports):
(JSC::webAssemblyModuleExports):
(JSC::constructJSWebAssemblyModule):
(JSC::callJSWebAssemblyModule):
* wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
(JSC::constructJSWebAssemblyRuntimeError):
(JSC::callJSWebAssemblyRuntimeError):
* wasm/js/WebAssemblyTableConstructor.cpp:
(JSC::constructJSWebAssemblyTable):
(JSC::callJSWebAssemblyTable):
* wasm/js/WebAssemblyTablePrototype.cpp:
(JSC::webAssemblyTableProtoFuncLength):
(JSC::webAssemblyTableProtoFuncGrow):
(JSC::webAssemblyTableProtoFuncGet):
(JSC::webAssemblyTableProtoFuncSet):
* wasm/js/WebAssemblyWrapperFunction.cpp:
(JSC::callWebAssemblyWrapperFunction):
* yarr/YarrErrorCode.h:
Source/WebCore:
No behavior change.
While signature is changed, we still use `state` name for CallFrame* variable since changing this involves massive channge in
CodeGeneratorJS.pm. When replacing `ExecState*` to `JSGlobalObject*`, we just remove these `state` variable and use `globalObject`
instead.
* Modules/applepay/ApplePaySession.h:
* Modules/applepay/PaymentMerchantSession.h:
* Modules/fetch/FetchResponse.h:
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBKeyRange.h:
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/server/IDBSerializationContext.h:
* bindings/js/IDBBindingUtilities.h:
* bindings/js/JSDOMBindingSecurity.h:
* bindings/js/JSDOMBuiltinConstructor.h:
(WebCore::JSDOMBuiltinConstructor<JSClass>::construct):
* bindings/js/JSDOMConstructor.h:
* bindings/js/JSDOMConstructorBase.cpp:
(WebCore::callThrowTypeError):
* bindings/js/JSDOMConstructorNotConstructable.h:
(WebCore::JSDOMConstructorNotConstructable::callThrowTypeError):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::makeThisTypeErrorForBuiltins):
(WebCore::makeGetterTypeErrorForBuiltins):
(WebCore::isReadableByteStreamAPIEnabled):
* bindings/js/JSDOMIterator.h:
(WebCore::IteratorTraits>::next):
* bindings/js/JSDOMNamedConstructor.h:
* bindings/js/JSDOMPromise.cpp:
(WebCore::DOMPromise::whenPromiseIsSettled):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::jsDOMWindowInstanceFunctionOpenDatabase):
* bindings/js/JSExtendableMessageEventCustom.cpp:
(WebCore::constructJSExtendableMessageEvent):
* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::callPlugin):
* bindings/js/JSWebAnimationCustom.cpp:
(WebCore::constructJSWebAnimation):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::setupModuleScriptHandlers):
* bindings/js/ScriptController.h:
* bindings/js/ScriptModuleLoader.h:
* bindings/js/ScriptState.h:
* bindings/js/StructuredClone.cpp:
(WebCore::cloneArrayBufferImpl):
(WebCore::cloneArrayBuffer):
(WebCore::structuredCloneArrayBuffer):
(WebCore::structuredCloneArrayBufferView):
* bindings/js/StructuredClone.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateOperationTrampolineDefinition):
(GenerateSerializerDefinition):
(GenerateLegacyCallerDefinitions):
(GenerateLegacyCallerDefinition):
(GenerateIterableDefinition):
(GenerateConstructorDefinitions):
(GenerateConstructorDefinition):
* bindings/scripts/test/JS/JSMapLike.cpp:
(WebCore::jsMapLikePrototypeFunctionGet):
(WebCore::jsMapLikePrototypeFunctionHas):
(WebCore::jsMapLikePrototypeFunctionEntries):
(WebCore::jsMapLikePrototypeFunctionKeys):
(WebCore::jsMapLikePrototypeFunctionValues):
(WebCore::jsMapLikePrototypeFunctionForEach):
(WebCore::jsMapLikePrototypeFunctionAdd):
(WebCore::jsMapLikePrototypeFunctionClear):
(WebCore::jsMapLikePrototypeFunctionDelete):
* bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
(WebCore::jsReadOnlyMapLikePrototypeFunctionGet):
(WebCore::jsReadOnlyMapLikePrototypeFunctionHas):
(WebCore::jsReadOnlyMapLikePrototypeFunctionEntries):
(WebCore::jsReadOnlyMapLikePrototypeFunctionKeys):
(WebCore::jsReadOnlyMapLikePrototypeFunctionValues):
(WebCore::jsReadOnlyMapLikePrototypeFunctionForEach):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
* bindings/scripts/test/JS/JSTestCEReactions.cpp:
(WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactions):
(WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsNotNeeded):
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
(WebCore::jsTestCEReactionsStringifierPrototypeFunctionToString):
* bindings/scripts/test/JS/JSTestCallTracer.cpp:
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationInterface):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationSpecified):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArguments):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgument):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgument):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgument):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgument):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgument):
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::jsTestDOMJITPrototypeFunctionGetAttribute):
(WebCore::jsTestDOMJITPrototypeFunctionItem):
(WebCore::jsTestDOMJITPrototypeFunctionHasAttribute):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementById):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementsByName):
* bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
(WebCore::jsTestEnabledBySettingPrototypeFunctionEnabledBySettingOperation):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::construct):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
(WebCore::jsTestGlobalObjectInstanceFunctionRegularOperation):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation):
(WebCore::jsTestGlobalObjectConstructorFunctionEnabledAtRuntimeOperationStatic):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorld):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabled):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeaturesEnabled):
(WebCore::jsTestGlobalObjectInstanceFunctionTestPrivateFunction):
(WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResult):
(WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBoolean):
(WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBoolean):
* bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
(WebCore::jsTestIndexedSetterWithIdentifierPrototypeFunctionIndexedSetter):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::construct):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
(WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4):
(WebCore::jsTestInterfacePrototypeFunctionTakeNodes):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
(WebCore::jsTestInterfaceConstructorFunctionSupplementalMethod4):
* bindings/scripts/test/JS/JSTestIterable.cpp:
(WebCore::jsTestIterablePrototypeFunctionEntries):
(WebCore::jsTestIterablePrototypeFunctionKeys):
(WebCore::jsTestIterablePrototypeFunctionValues):
(WebCore::jsTestIterablePrototypeFunctionForEach):
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
(WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
(WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionNamedSetter):
(WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionIndexedSetter):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::construct):
* bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
(WebCore::jsTestNamedDeleterWithIdentifierPrototypeFunctionNamedDeleter):
* bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
(WebCore::jsTestNamedGetterWithIdentifierPrototypeFunctionGetterName):
* bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
(WebCore::jsTestNamedSetterWithIdentifierPrototypeFunctionNamedSetter):
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
(WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionNamedSetter):
(WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionIndexedSetter):
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
(WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionNamedSetter):
(WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter):
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
(WebCore::jsTestNamedSetterWithUnforgablePropertiesInstanceFunctionUnforgeableOperation):
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
(WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsInstanceFunctionUnforgeableOperation):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodeConstructor::construct):
(WebCore::jsTestNodePrototypeFunctionTestWorkerPromise):
(WebCore::jsTestNodePrototypeFunctionCalculateSecretResult):
(WebCore::jsTestNodePrototypeFunctionGetSecretBoolean):
(WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBoolean):
(WebCore::jsTestNodePrototypeFunctionEntries):
(WebCore::jsTestNodePrototypeFunctionKeys):
(WebCore::jsTestNodePrototypeFunctionValues):
(WebCore::jsTestNodePrototypeFunctionForEach):
(WebCore::jsTestNodePrototypeFunctionToJSON):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::construct):
(WebCore::callJSTestObj1):
(WebCore::callJSTestObj2):
(WebCore::callJSTestObj3):
(WebCore::callJSTestObj):
(WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation):
(WebCore::jsTestObjConstructorFunctionEnabledAtRuntimeOperationStatic):
(WebCore::jsTestObjPrototypeFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabled):
(WebCore::jsTestObjPrototypeFunctionWorldSpecificMethod):
(WebCore::jsTestObjPrototypeFunctionCalculateSecretResult):
(WebCore::jsTestObjPrototypeFunctionGetSecretBoolean):
(WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBoolean):
(WebCore::jsTestObjPrototypeFunctionVoidMethod):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionByteMethod):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionOctetMethod):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionLongMethod):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethod):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjInstanceFunctionUnforgeableMethod):
(WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyString):
(WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter):
(WebCore::jsTestObjPrototypeFunctionNullableStringMethod):
(WebCore::jsTestObjConstructorFunctionNullableStringStaticMethod):
(WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
(WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyString):
(WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNullableByteStringArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyString):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionMethodWithRecord):
(WebCore::jsTestObjPrototypeFunctionMethodWithException):
(WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningLong):
(WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningObject):
(WebCore::jsTestObjPrototypeFunctionCustomMethod):
(WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionPrivateMethod):
(WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethod):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
(WebCore::jsTestObjPrototypeFunctionWithExecStateVoid):
(WebCore::jsTestObjPrototypeFunctionWithExecStateObj):
(WebCore::jsTestObjPrototypeFunctionWithExecStateVoidException):
(WebCore::jsTestObjPrototypeFunctionWithExecStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecState):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateWithSpaces):
(WebCore::jsTestObjPrototypeFunctionWithDocumentArgument):
(WebCore::jsTestObjPrototypeFunctionWithCallerDocumentArgument):
(WebCore::jsTestObjPrototypeFunctionWithCallerWindowArgument):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVString):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomString):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValue):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNull):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyString):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyString):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLong):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZero):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLong):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZero):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequence):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmpty):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBoolean):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAny):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalObject):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecord):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromise):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter):
(WebCore::jsTestObjConstructorFunctionClassMethod):
(WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
(WebCore::jsTestObjConstructorFunctionClassMethod2):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptional):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRange):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptional):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
(WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
(WebCore::jsTestObjPrototypeFunctionOperationWithOptionalUnionParameter):
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
(WebCore::jsTestObjPrototypeFunctionGetElementById):
(WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert3):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionOrange):
(WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicUnionMethod):
(WebCore::jsTestObjPrototypeFunctionAny):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunction):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException):
(WebCore::jsTestObjPrototypeFunctionTestCustomPromiseFunction):
(WebCore::jsTestObjConstructorFunctionTestStaticCustomPromiseFunction):
(WebCore::jsTestObjPrototypeFunctionTestCustomReturnsOwnPromiseFunction):
(WebCore::jsTestObjPrototypeFunctionTestReturnsOwnPromiseAndPromiseProxyFunction):
(WebCore::jsTestObjPrototypeFunctionConditionalOverload):
(WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload):
(WebCore::jsTestObjPrototypeFunctionAttachShadowRoot):
(WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameter):
(WebCore::jsTestObjPrototypeFunctionBufferSourceParameter):
(WebCore::jsTestObjPrototypeFunctionLegacyCallerNamed):
(WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimization):
(WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithException):
(WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWindowFunction):
(WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWorkerFunction):
(WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWindowAndWorkerFunction):
(WebCore::jsTestObjPrototypeFunctionToString):
(WebCore::jsTestObjPrototypeFunctionToJSON):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::constructJSTestOverloadedConstructors1):
(WebCore::constructJSTestOverloadedConstructors2):
(WebCore::constructJSTestOverloadedConstructors3):
(WebCore::constructJSTestOverloadedConstructors4):
(WebCore::constructJSTestOverloadedConstructors5):
(WebCore::JSTestOverloadedConstructorsConstructor::construct):
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
(WebCore::constructJSTestOverloadedConstructorsWithSequence1):
(WebCore::constructJSTestOverloadedConstructorsWithSequence2):
(WebCore::JSTestOverloadedConstructorsWithSequenceConstructor::construct):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
(WebCore::JSTestPromiseRejectionEventConstructor::construct):
* bindings/scripts/test/JS/JSTestSerialization.cpp:
(WebCore::jsTestSerializationPrototypeFunctionToJSON):
* bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
(WebCore::jsTestSerializationInheritPrototypeFunctionToJSON):
* bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
(WebCore::jsTestSerializationInheritFinalPrototypeFunctionToJSON):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunction):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionReturning):
* bindings/scripts/test/JS/JSTestStringifier.cpp:
(WebCore::jsTestStringifierPrototypeFunctionToString):
* bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
(WebCore::jsTestStringifierAnonymousOperationPrototypeFunctionToString):
* bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
(WebCore::jsTestStringifierNamedOperationPrototypeFunctionIdentifier):
(WebCore::jsTestStringifierNamedOperationPrototypeFunctionToString):
* bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
(WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionIdentifier):
(WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionToString):
* bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
(WebCore::jsTestStringifierOperationNamedToStringPrototypeFunctionToString):
* bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
(WebCore::jsTestStringifierReadOnlyAttributePrototypeFunctionToString):
* bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
(WebCore::jsTestStringifierReadWriteAttributePrototypeFunctionToString):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::construct):
(WebCore::jsTestTypedefsPrototypeFunctionFunc):
(WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArg):
(WebCore::jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg):
(WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg):
(WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArg):
(WebCore::jsTestTypedefsPrototypeFunctionUnionArg):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef):
(WebCore::jsTestTypedefsPrototypeFunctionPointFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2):
(WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
* bridge/c/c_utility.h:
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::callObjCFallbackObject):
* bridge/runtime_method.cpp:
(JSC::callRuntimeMethod):
* bridge/runtime_object.cpp:
(JSC::Bindings::callRuntimeObject):
(JSC::Bindings::callRuntimeConstructor):
* crypto/SubtleCrypto.h:
* css/CSSFontFace.h:
* dom/CustomElementReactionQueue.h:
* dom/Document.h:
* dom/MessagePort.h:
* dom/MouseEvent.h:
* dom/ScriptExecutionContext.h:
* html/HTMLFrameElementBase.h:
* html/canvas/WebGLAny.h:
* inspector/agents/InspectorDOMAgent.h:
* inspector/agents/page/PageRuntimeAgent.h:
* page/DOMWindow.h:
* page/PageConsoleClient.h:
* page/RemoteDOMWindow.h:
* page/csp/ContentSecurityPolicy.h:
* platform/ThreadGlobalData.h:
* plugins/PluginViewBase.h:
* workers/DedicatedWorkerGlobalScope.h:
* workers/Worker.h:
* workers/WorkerConsoleClient.h:
* workers/service/ExtendableMessageEvent.h:
* worklets/WorkletConsoleClient.h:
Source/WebKit:
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::callMethod):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::callNPJSObject):
(WebKit::constructWithConstructor):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
Source/WebKitLegacy/mac:
* WebView/WebScriptDebugger.h:
Canonical link: https://commits.webkit.org/216126@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-07 23:13:45 +00:00
|
|
|
class CallFrame;
|
2016-07-20 06:23:13 +00:00
|
|
|
class JSValue;
|
2016-02-24 21:41:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
namespace WebCore {
|
|
|
|
|
2019-01-05 00:01:43 +00:00
|
|
|
class AbortSignal;
|
2016-03-25 14:19:31 +00:00
|
|
|
class FetchRequest;
|
2016-04-17 18:04:20 +00:00
|
|
|
class ReadableStreamSource;
|
2016-02-24 21:41:51 +00:00
|
|
|
|
2021-07-16 22:59:36 +00:00
|
|
|
class FetchResponse final : public FetchBodyOwner {
|
2016-02-24 21:41:51 +00:00
|
|
|
public:
|
2016-05-24 07:35:09 +00:00
|
|
|
using Type = ResourceResponse::Type;
|
2016-05-03 05:47:34 +00:00
|
|
|
|
2017-07-28 17:29:12 +00:00
|
|
|
struct Init {
|
|
|
|
unsigned short status { 200 };
|
2019-10-07 20:41:59 +00:00
|
|
|
String statusText;
|
2021-05-30 16:11:40 +00:00
|
|
|
std::optional<FetchHeaders::Init> headers;
|
2017-07-28 17:29:12 +00:00
|
|
|
};
|
|
|
|
|
2021-05-30 16:11:40 +00:00
|
|
|
WEBCORE_EXPORT static Ref<FetchResponse> create(ScriptExecutionContext&, std::optional<FetchBody>&&, FetchHeaders::Guard, ResourceResponse&&);
|
2017-09-09 03:32:59 +00:00
|
|
|
|
2021-05-30 16:11:40 +00:00
|
|
|
static ExceptionOr<Ref<FetchResponse>> create(ScriptExecutionContext&, std::optional<FetchBody::Init>&&, Init&&);
|
2016-03-11 09:44:53 +00:00
|
|
|
static Ref<FetchResponse> error(ScriptExecutionContext&);
|
2016-10-11 02:21:58 +00:00
|
|
|
static ExceptionOr<Ref<FetchResponse>> redirect(ScriptExecutionContext&, const String& url, int status);
|
2016-02-24 21:41:51 +00:00
|
|
|
|
2017-08-18 19:32:17 +00:00
|
|
|
using NotificationCallback = WTF::Function<void(ExceptionOr<FetchResponse&>&&)>;
|
|
|
|
static void fetch(ScriptExecutionContext&, FetchRequest&, NotificationCallback&&);
|
2016-07-20 06:23:13 +00:00
|
|
|
|
[Fetch API] Response constructor should be able to take a ReadableStream as body
https://bugs.webkit.org/show_bug.cgi?id=159804
Patch by Youenn Fablet <youenn@apple.com> on 2016-07-26
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
* web-platform-tests/fetch/api/response/response-consume-empty-expected.txt:
* web-platform-tests/fetch/api/response/response-consume-expected.txt:
* web-platform-tests/fetch/api/response/response-consume.html: Updating test to exercice Response coonstructor with a ReadableStream.
Source/WebCore:
Covered by existing and updated tests.
Introduced FetchBodyConsumer to encapsulate the code responsible to adapt FetchBody internal data to the requests made by user scripts.
This refactoring eases the handling of internal data coming from ReadableStream.
FetchLoader is now delegating conversion from the data to its m_consumer field.
If m_consumer is null, FetchLoader calls FetchLoaderClient::didReceiveData (streaming reception mode).
Clients of FetchLoader needs to pass a FetchBodyConsumer to the FetchLoader to do the data adaptation at loader creation time.
Added support for body data passed as a ReadableStream to Response.
This requires to set @body internal slot of the Response object in the constructor initialization JS built-in.
To actually use that data, Body accessors are also implemented as JS built-in for Response.
Since there is no need to do so for Request, FetchResponse is no longer marked as implementing FetchBody but all
FetchBody IDL description is inlined in FetchResponse.idl.
For each body accessor (arrayBuffer, blob, json, text), the corresponding JS built-in checks whether @body internal slot is set.
If that is not the case, regular handling is done through a new private method called @consume.
If @body internal slot is set, chunks are pumped from the ReadableStream using ReadableStream internal built-ins functions.
Data handling is done in C++ through the private methods @startConsumingStream, @consumeChunk and @finishConsumingStream.
To support cloning of Response with bodies, clone method is also implemented as a JS built-in.
Main clone is done through @cloneFoJS private method implemented in C++.
JS built-in clone code does the teeing of the ReadableStream using ReadableStream JS built-in internal functions.
Introducing a new ReadableStream type for FetchBody to cope with body being stored in a ReadableStream.
Introducing a new Loaded type for FetchBody to cope with body being stored in the FetchBodyConsumer owned by FetchBody.
This allows removing the conversion of data to JSC::ArrayBuffer which was done by defaut at the end of Fetch loading if user script did not request data before.
At the end of a load, the data remains in FetchBodyConsumer and the body is marked as Loaded.
If the user wants to get the data after data finished being loaded, FetchBodyConsumer will do the required conversions.
Introducing DeferredWrapper::resolveWithNewValue to handle the case of resolving promises with new objects.
This allows directly using toJSNewlyCreated instead of toJS.
* CMakeLists.txt: Adding FetchBodyConsumer.cpp. Removing WebCoreJSBuiltins.cpp from CMake list as it is not needed.
* Modules/fetch/FetchBody.cpp: Moving data adaptation code to FetchBodyConsumer.
(WebCore::FetchBody::extract):
(WebCore::FetchBody::arrayBuffer):
(WebCore::FetchBody::blob): Setting contentType in FetchBodyConsumer to handle proper creation of blob.
(WebCore::FetchBody::json):
(WebCore::FetchBody::text):
(WebCore::FetchBody::consume): Refactoring and added case of Loaded bodies.
(WebCore::FetchBody::consumeAsStream): Ditto.
(WebCore::FetchBody::consumeArrayBuffer):
(WebCore::FetchBody::consumeText):
(WebCore::FetchBody::consumeBlob):
(WebCore::FetchBody::loadingFailed):
(WebCore::FetchBody::loadingSucceeded):
(WebCore::FetchBody::loadingType): Deleted.
(WebCore::blobFromArrayBuffer): Deleted.
(WebCore::FetchBody::fulfillTextPromise): Deleted.
(WebCore::FetchBody::loadedAsArrayBuffer): Deleted.
(WebCore::FetchBody::loadedAsText): Deleted.
* Modules/fetch/FetchBody.h:
(WebCore::FetchBody::consumer):
* Modules/fetch/FetchBodyConsumer.cpp: Added, responsible of data adaptation.
(WebCore::blobFromData):
(WebCore::FetchBodyConsumer::resolveWithData):
(WebCore::FetchBodyConsumer::resolve):
(WebCore::FetchBodyConsumer::append):
(WebCore::FetchBodyConsumer::takeData):
(WebCore::FetchBodyConsumer::takeAsArrayBuffer):
(WebCore::FetchBodyConsumer::takeAsBlob):
(WebCore::FetchBodyConsumer::takeAsText):
* Modules/fetch/FetchBodyConsumer.h: Added.
(WebCore::FetchBodyConsumer::FetchBodyConsumer):
(WebCore::FetchBodyConsumer::setContentType):
(WebCore::FetchBodyConsumer::setType):
(WebCore::FetchBodyConsumer::type):
(WebCore::FetchBodyConsumer::clean):
(WebCore::FetchBodyConsumer::hasData):
* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::loadBlob):
(WebCore::FetchBodyOwner::blobLoadingSucceeded):
(WebCore::FetchBodyOwner::loadedBlobAsText): Deleted.
* Modules/fetch/FetchBodyOwner.h:
(WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer): Deleted.
* Modules/fetch/FetchInternals.js:
(consumeStream): Pump ReadableStream data and send it to FetchResponse to be converted according user need.
* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::FetchLoader): FetchLoader is simplified as it has two nodes: consumer mode in which case
data is sent to the consumer and no-consumer mode in which case data is passed to loader client. The second mode
is used to conveyy data to ReadableStream source.
(WebCore::FetchLoader::stop):
(WebCore::FetchLoader::startStreaming):
(WebCore::FetchLoader::didReceiveData):
(WebCore::FetchLoader::didFinishLoading): Deleted.
* Modules/fetch/FetchLoader.h:
* Modules/fetch/FetchLoaderClient.h:
(WebCore::FetchLoaderClient::didFinishLoadingAsText): Deleted.
(WebCore::FetchLoaderClient::didFinishLoadingAsArrayBuffer): Deleted.
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::cloneForJS):
(WebCore::FetchResponse::BodyLoader::didSucceed):
(WebCore::FetchResponse::BodyLoader::start):
(WebCore::FetchResponse::consume): Introduced to consume data stored in body and not in ReadableStream.
(WebCore::FetchResponse::startConsumingStream): Introduced to start process of consuming data stored in the ReadableStream.
(WebCore::FetchResponse::consumeChunk): Reception of ReadableStream data.
(WebCore::FetchResponse::finishConsumingStream): Doing the final conversion.
(WebCore::FetchResponse::clone): Deleted.
(WebCore::FetchResponse::BodyLoader::didFinishLoadingAsArrayBuffer): Deleted.
* Modules/fetch/FetchResponse.h:
* Modules/fetch/FetchResponse.idl: Inlining of FetchBody methods/attributes and adding private methods.
* Modules/fetch/FetchResponse.js:
(initializeFetchResponse):
(clone):
(arrayBuffer):
(blob):
(formData):
(json):
(text):
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMPromise.h:
(WebCore::DeferredWrapper::resolveWithNewValue):
* bindings/js/WebCoreBuiltinNames.h:
Canonical link: https://commits.webkit.org/178396@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-07-27 06:38:15 +00:00
|
|
|
void startConsumingStream(unsigned);
|
|
|
|
void consumeChunk(Ref<JSC::Uint8Array>&&);
|
2016-09-22 07:35:46 +00:00
|
|
|
void finishConsumingStream(Ref<DeferredPromise>&&);
|
[Fetch API] Response constructor should be able to take a ReadableStream as body
https://bugs.webkit.org/show_bug.cgi?id=159804
Patch by Youenn Fablet <youenn@apple.com> on 2016-07-26
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
* web-platform-tests/fetch/api/response/response-consume-empty-expected.txt:
* web-platform-tests/fetch/api/response/response-consume-expected.txt:
* web-platform-tests/fetch/api/response/response-consume.html: Updating test to exercice Response coonstructor with a ReadableStream.
Source/WebCore:
Covered by existing and updated tests.
Introduced FetchBodyConsumer to encapsulate the code responsible to adapt FetchBody internal data to the requests made by user scripts.
This refactoring eases the handling of internal data coming from ReadableStream.
FetchLoader is now delegating conversion from the data to its m_consumer field.
If m_consumer is null, FetchLoader calls FetchLoaderClient::didReceiveData (streaming reception mode).
Clients of FetchLoader needs to pass a FetchBodyConsumer to the FetchLoader to do the data adaptation at loader creation time.
Added support for body data passed as a ReadableStream to Response.
This requires to set @body internal slot of the Response object in the constructor initialization JS built-in.
To actually use that data, Body accessors are also implemented as JS built-in for Response.
Since there is no need to do so for Request, FetchResponse is no longer marked as implementing FetchBody but all
FetchBody IDL description is inlined in FetchResponse.idl.
For each body accessor (arrayBuffer, blob, json, text), the corresponding JS built-in checks whether @body internal slot is set.
If that is not the case, regular handling is done through a new private method called @consume.
If @body internal slot is set, chunks are pumped from the ReadableStream using ReadableStream internal built-ins functions.
Data handling is done in C++ through the private methods @startConsumingStream, @consumeChunk and @finishConsumingStream.
To support cloning of Response with bodies, clone method is also implemented as a JS built-in.
Main clone is done through @cloneFoJS private method implemented in C++.
JS built-in clone code does the teeing of the ReadableStream using ReadableStream JS built-in internal functions.
Introducing a new ReadableStream type for FetchBody to cope with body being stored in a ReadableStream.
Introducing a new Loaded type for FetchBody to cope with body being stored in the FetchBodyConsumer owned by FetchBody.
This allows removing the conversion of data to JSC::ArrayBuffer which was done by defaut at the end of Fetch loading if user script did not request data before.
At the end of a load, the data remains in FetchBodyConsumer and the body is marked as Loaded.
If the user wants to get the data after data finished being loaded, FetchBodyConsumer will do the required conversions.
Introducing DeferredWrapper::resolveWithNewValue to handle the case of resolving promises with new objects.
This allows directly using toJSNewlyCreated instead of toJS.
* CMakeLists.txt: Adding FetchBodyConsumer.cpp. Removing WebCoreJSBuiltins.cpp from CMake list as it is not needed.
* Modules/fetch/FetchBody.cpp: Moving data adaptation code to FetchBodyConsumer.
(WebCore::FetchBody::extract):
(WebCore::FetchBody::arrayBuffer):
(WebCore::FetchBody::blob): Setting contentType in FetchBodyConsumer to handle proper creation of blob.
(WebCore::FetchBody::json):
(WebCore::FetchBody::text):
(WebCore::FetchBody::consume): Refactoring and added case of Loaded bodies.
(WebCore::FetchBody::consumeAsStream): Ditto.
(WebCore::FetchBody::consumeArrayBuffer):
(WebCore::FetchBody::consumeText):
(WebCore::FetchBody::consumeBlob):
(WebCore::FetchBody::loadingFailed):
(WebCore::FetchBody::loadingSucceeded):
(WebCore::FetchBody::loadingType): Deleted.
(WebCore::blobFromArrayBuffer): Deleted.
(WebCore::FetchBody::fulfillTextPromise): Deleted.
(WebCore::FetchBody::loadedAsArrayBuffer): Deleted.
(WebCore::FetchBody::loadedAsText): Deleted.
* Modules/fetch/FetchBody.h:
(WebCore::FetchBody::consumer):
* Modules/fetch/FetchBodyConsumer.cpp: Added, responsible of data adaptation.
(WebCore::blobFromData):
(WebCore::FetchBodyConsumer::resolveWithData):
(WebCore::FetchBodyConsumer::resolve):
(WebCore::FetchBodyConsumer::append):
(WebCore::FetchBodyConsumer::takeData):
(WebCore::FetchBodyConsumer::takeAsArrayBuffer):
(WebCore::FetchBodyConsumer::takeAsBlob):
(WebCore::FetchBodyConsumer::takeAsText):
* Modules/fetch/FetchBodyConsumer.h: Added.
(WebCore::FetchBodyConsumer::FetchBodyConsumer):
(WebCore::FetchBodyConsumer::setContentType):
(WebCore::FetchBodyConsumer::setType):
(WebCore::FetchBodyConsumer::type):
(WebCore::FetchBodyConsumer::clean):
(WebCore::FetchBodyConsumer::hasData):
* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::loadBlob):
(WebCore::FetchBodyOwner::blobLoadingSucceeded):
(WebCore::FetchBodyOwner::loadedBlobAsText): Deleted.
* Modules/fetch/FetchBodyOwner.h:
(WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer): Deleted.
* Modules/fetch/FetchInternals.js:
(consumeStream): Pump ReadableStream data and send it to FetchResponse to be converted according user need.
* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::FetchLoader): FetchLoader is simplified as it has two nodes: consumer mode in which case
data is sent to the consumer and no-consumer mode in which case data is passed to loader client. The second mode
is used to conveyy data to ReadableStream source.
(WebCore::FetchLoader::stop):
(WebCore::FetchLoader::startStreaming):
(WebCore::FetchLoader::didReceiveData):
(WebCore::FetchLoader::didFinishLoading): Deleted.
* Modules/fetch/FetchLoader.h:
* Modules/fetch/FetchLoaderClient.h:
(WebCore::FetchLoaderClient::didFinishLoadingAsText): Deleted.
(WebCore::FetchLoaderClient::didFinishLoadingAsArrayBuffer): Deleted.
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::cloneForJS):
(WebCore::FetchResponse::BodyLoader::didSucceed):
(WebCore::FetchResponse::BodyLoader::start):
(WebCore::FetchResponse::consume): Introduced to consume data stored in body and not in ReadableStream.
(WebCore::FetchResponse::startConsumingStream): Introduced to start process of consuming data stored in the ReadableStream.
(WebCore::FetchResponse::consumeChunk): Reception of ReadableStream data.
(WebCore::FetchResponse::finishConsumingStream): Doing the final conversion.
(WebCore::FetchResponse::clone): Deleted.
(WebCore::FetchResponse::BodyLoader::didFinishLoadingAsArrayBuffer): Deleted.
* Modules/fetch/FetchResponse.h:
* Modules/fetch/FetchResponse.idl: Inlining of FetchBody methods/attributes and adding private methods.
* Modules/fetch/FetchResponse.js:
(initializeFetchResponse):
(clone):
(arrayBuffer):
(blob):
(formData):
(json):
(text):
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMPromise.h:
(WebCore::DeferredWrapper::resolveWithNewValue):
* bindings/js/WebCoreBuiltinNames.h:
Canonical link: https://commits.webkit.org/178396@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-07-27 06:38:15 +00:00
|
|
|
|
2017-12-08 22:41:48 +00:00
|
|
|
Type type() const { return filteredResponse().type(); }
|
2016-07-14 10:14:53 +00:00
|
|
|
const String& url() const;
|
2017-12-08 22:41:48 +00:00
|
|
|
bool redirected() const { return filteredResponse().isRedirected(); }
|
|
|
|
int status() const { return filteredResponse().httpStatusCode(); }
|
|
|
|
bool ok() const { return filteredResponse().isSuccessful(); }
|
|
|
|
const String& statusText() const { return filteredResponse().httpStatusText(); }
|
2016-02-24 21:41:51 +00:00
|
|
|
|
2017-08-15 21:04:38 +00:00
|
|
|
const FetchHeaders& headers() const { return m_headers; }
|
2016-02-24 21:41:51 +00:00
|
|
|
FetchHeaders& headers() { return m_headers; }
|
2017-09-07 23:23:57 +00:00
|
|
|
ExceptionOr<Ref<FetchResponse>> clone(ScriptExecutionContext&);
|
2016-02-24 21:41:51 +00:00
|
|
|
|
2017-08-31 20:03:42 +00:00
|
|
|
void consumeBodyAsStream() final;
|
|
|
|
void feedStream() final;
|
|
|
|
void cancel() final;
|
2016-10-11 02:21:58 +00:00
|
|
|
|
2017-08-18 19:32:48 +00:00
|
|
|
using ResponseData = Variant<std::nullptr_t, Ref<FormData>, Ref<SharedBuffer>>;
|
|
|
|
ResponseData consumeBody();
|
2017-10-09 22:17:05 +00:00
|
|
|
void setBodyData(ResponseData&&, uint64_t bodySizeWithPadding);
|
2017-08-19 01:29:50 +00:00
|
|
|
|
2016-10-01 16:31:44 +00:00
|
|
|
bool isLoading() const { return !!m_bodyLoader; }
|
2018-01-31 04:23:50 +00:00
|
|
|
bool isBodyReceivedByChunk() const { return isLoading() || hasReadableStreamBody(); }
|
2018-02-09 18:27:13 +00:00
|
|
|
bool isBlobBody() const { return !isBodyNull() && body().isBlob(); }
|
|
|
|
bool isBlobFormData() const { return !isBodyNull() && body().isFormData(); }
|
2018-01-29 23:39:21 +00:00
|
|
|
|
2021-06-10 18:53:20 +00:00
|
|
|
using ConsumeDataByChunkCallback = Function<void(ExceptionOr<Span<const uint8_t>*>&&)>;
|
2018-01-31 04:23:50 +00:00
|
|
|
void consumeBodyReceivedByChunk(ConsumeDataByChunkCallback&&);
|
2017-08-19 01:29:50 +00:00
|
|
|
|
2017-11-02 17:46:48 +00:00
|
|
|
WEBCORE_EXPORT ResourceResponse resourceResponse() const;
|
2019-05-03 20:36:39 +00:00
|
|
|
ResourceResponse::Tainting tainting() const { return m_internalResponse.tainting(); }
|
2017-08-15 21:04:38 +00:00
|
|
|
|
2017-10-09 22:17:05 +00:00
|
|
|
uint64_t bodySizeWithPadding() const { return m_bodySizeWithPadding; }
|
|
|
|
void setBodySizeWithPadding(uint64_t size) { m_bodySizeWithPadding = size; }
|
|
|
|
uint64_t opaqueLoadIdentifier() const { return m_opaqueLoadIdentifier; }
|
|
|
|
|
2018-01-12 20:41:55 +00:00
|
|
|
void initializeOpaqueLoadIdentifierForTesting() { m_opaqueLoadIdentifier = 1; }
|
|
|
|
|
2018-04-07 03:48:55 +00:00
|
|
|
const HTTPHeaderMap& internalResponseHeaders() const { return m_internalResponse.httpHeaderFields(); }
|
|
|
|
|
WebAssembly: add support for stream APIs
https://bugs.webkit.org/show_bug.cgi?id=173105
Reviewed by Keith Miller.
.:
* Source/cmake/OptionsFTW.cmake:
* Source/cmake/WebKitFeatures.cmake:
JSTests:
* wasm/stress/resources/tsf.wasm: Added.
* wasm/stress/wasm-streaming-compiler-compile.js: Added.
(shouldBe):
(slice):
(async main):
(main.catch):
* wasm/stress/wasm-streaming-compiler-instantiate.js: Added.
(shouldBe):
(slice):
(async main.):
(async main):
(main.catch):
LayoutTests/imported/w3c:
* web-platform-tests/wasm/wasm_stream_compile_test-expected.txt:
* web-platform-tests/wasm/wasm_stream_compile_test.html:
* web-platform-tests/wasm/wasm_stream_instantiate_test-expected.txt:
* web-platform-tests/wasm/wasm_stream_instantiate_test.html:
* web-platform-tests/wasm/webapi/abort.any-expected.txt:
* web-platform-tests/wasm/webapi/abort.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/body.any-expected.txt:
* web-platform-tests/wasm/webapi/body.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/contenttype.any-expected.txt:
* web-platform-tests/wasm/webapi/contenttype.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/empty-body.any-expected.txt:
* web-platform-tests/wasm/webapi/empty-body.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/historical.any-expected.txt:
* web-platform-tests/wasm/webapi/historical.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/idlharness.any-expected.txt:
* web-platform-tests/wasm/webapi/idlharness.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/instantiateStreaming-bad-imports.any-expected.txt:
* web-platform-tests/wasm/webapi/instantiateStreaming-bad-imports.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/instantiateStreaming.any-expected.txt:
* web-platform-tests/wasm/webapi/instantiateStreaming.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/invalid-args.any-expected.txt:
* web-platform-tests/wasm/webapi/invalid-args.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/invalid-code.any-expected.txt:
* web-platform-tests/wasm/webapi/invalid-code.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/modified-contenttype.any-expected.txt:
* web-platform-tests/wasm/webapi/modified-contenttype.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/origin.sub.any-expected.txt:
* web-platform-tests/wasm/webapi/origin.sub.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/rejected-arg.any-expected.txt:
* web-platform-tests/wasm/webapi/rejected-arg.any.worker-expected.txt:
* web-platform-tests/wasm/webapi/status.any-expected.txt:
* web-platform-tests/wasm/webapi/status.any.worker-expected.txt:
Source/JavaScriptCore:
This patch implements WebAssembly.{compileStreaming,instantiateStreaming}. JavaScriptCore offers Wasm::StreamingCompiler interface to WebCore,
so that WebCore can feed FetchResponse and compile wasm code in a streaming fashion.
Wasm::StreamingCompiler drives Wasm::LLIntPlan while it does not use Wasm::Worklist since currently Wasm::Worklist is not suitable abstraction for
streaming compilation which generates compilation tasks incrementally. Instead, Wasm::StreamingCompiler generates Wasm::StreamingPlan and enqueues
them to Wasm::Worklist, and each StreamingPlan compiles one function at a time. And we gather these compiled functions into the one LLIntPlan and
finally Wasm::StreamingCompiler completes Wasm::LLIntPlan.
We already have Wasm::StreamingParser, which is designed for streaming compilation. We can pass bytes to this parser, and this parser invokes a callback
when a new wasm function is found. Then, Wasm::StreamingCompiler generates Wasm::StreamingPlan for that.
We add WasmStreamingCompiler JS objects to JSC shell to test streaming compilation easily.
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* builtins/WebAssembly.js:
(compileStreaming):
(instantiateStreaming):
* runtime/DeferredWorkTimer.cpp:
(JSC::DeferredWorkTimer::cancelPendingWork):
* runtime/DeferredWorkTimer.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
* runtime/OptionsList.h:
* tools/JSDollarVM.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSDollarVM::finishCreation):
* wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::BBQPlan):
* wasm/WasmBBQPlan.h:
* wasm/WasmCodeBlock.cpp:
(JSC::Wasm::CodeBlock::CodeBlock):
* wasm/WasmEntryPlan.cpp:
(JSC::Wasm::EntryPlan::EntryPlan):
* wasm/WasmEntryPlan.h:
* wasm/WasmLLIntPlan.cpp:
(JSC::Wasm::LLIntPlan::LLIntPlan):
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
(JSC::Wasm::LLIntPlan::completeInStreaming):
(JSC::Wasm::LLIntPlan::didCompileFunctionInStreaming):
(JSC::Wasm::LLIntPlan::didFailInStreaming):
* wasm/WasmLLIntPlan.h:
* wasm/WasmModule.cpp:
(JSC::Wasm::Module::validateSync):
(JSC::Wasm::Module::validateAsync):
* wasm/WasmStreamingCompiler.cpp: Added.
(JSC::Wasm::StreamingCompiler::StreamingCompiler):
(JSC::Wasm::StreamingCompiler::~StreamingCompiler):
(JSC::Wasm::StreamingCompiler::create):
(JSC::Wasm::StreamingCompiler::didReceiveFunctionData):
(JSC::Wasm::StreamingCompiler::didCompileFunction):
(JSC::Wasm::StreamingCompiler::didFinishParsing):
(JSC::Wasm::StreamingCompiler::completeIfNecessary):
(JSC::Wasm::StreamingCompiler::didComplete):
(JSC::Wasm::StreamingCompiler::finalize):
(JSC::Wasm::StreamingCompiler::fail):
(JSC::Wasm::StreamingCompiler::cancel):
* wasm/WasmStreamingCompiler.h: Added.
* wasm/WasmStreamingParser.cpp:
* wasm/WasmStreamingParser.h:
* wasm/WasmStreamingPlan.cpp: Copied from Source/JavaScriptCore/builtins/WebAssembly.js.
(JSC::Wasm::StreamingPlan::StreamingPlan):
(JSC::Wasm::StreamingPlan::work):
* wasm/WasmStreamingPlan.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssembly.h.
* wasm/js/JSWebAssembly.cpp:
(JSC::JSWebAssembly::finishCreation):
(JSC::JSWebAssembly::instantiateForStreaming):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* wasm/js/JSWebAssembly.h:
Source/WebCore:
Since WebAssembly.{compileStreaming,instantiateStreaming} needs to handle FetchResponse which is WebCore type, they need to be implemented in WebCore side.
To achieve that, JSC offers callback to JSGlobalObject, and WebCore JSDOMGlobalObject can implement them to offer WebAssembly.{compileStreaming,instantiateStreaming} features.
We use JSC's Wasm::StreamingCompiler to implement them. WebCore feeds bytes from FetchResponse and drives Wasm::StreamingCompiler.
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::handleResponseOnStreamingAction):
(WebCore::JSDOMGlobalObject::compileStreaming):
(WebCore::JSDOMGlobalObject::instantiateStreaming):
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMPromiseDeferred.cpp:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::tryAllocate): Deleted.
(WebCore::isResponseCorrect): Deleted.
(WebCore::handleResponseOnStreamingAction): Deleted.
(WebCore::JSDOMWindowBase::compileStreaming): Deleted.
(WebCore::JSDOMWindowBase::instantiateStreaming): Deleted.
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
* bindings/js/JSWorkletGlobalScopeBase.cpp:
Source/WTF:
* wtf/PlatformEnable.h:
Canonical link: https://commits.webkit.org/233426@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-28 01:31:34 +00:00
|
|
|
bool isCORSSameOrigin() const;
|
|
|
|
bool hasWasmMIMEType() const;
|
|
|
|
|
2016-02-24 21:41:51 +00:00
|
|
|
private:
|
2021-05-30 16:11:40 +00:00
|
|
|
FetchResponse(ScriptExecutionContext&, std::optional<FetchBody>&&, Ref<FetchHeaders>&&, ResourceResponse&&);
|
2016-03-08 09:10:09 +00:00
|
|
|
|
2016-03-25 14:19:31 +00:00
|
|
|
void stop() final;
|
2016-03-08 09:10:09 +00:00
|
|
|
const char* activeDOMObjectName() const final;
|
2016-02-24 21:41:51 +00:00
|
|
|
|
2017-12-08 22:41:48 +00:00
|
|
|
const ResourceResponse& filteredResponse() const;
|
|
|
|
|
[Fetch API] Use ReadableStream pull to transfer binary data to stream when application needs it
https://bugs.webkit.org/show_bug.cgi?id=162892
Patch by Youenn Fablet <youenn@apple.com> on 2016-10-06
Reviewed by Alex Christensen.
Covered by existing tests.
Before this patch, FetchResponse was never resolving the start promise.
This way, it could enqueue data, error or close the stream whenever desired.
With this patch, FetchResponse will feed the stream when being asked to.
This allows keeping the data in WebCore until the application needs it.
This is only implemented for network data.
For other data owned by response (blob, text...), data will be enqueued like previously as fast as possible.
Note that FetchResponse can enqueue/error/close the stream at any time since JSFetchResponse has a reference to the stream.
And the stream has a reference to the controller.
In addition to transfer binary chunks to ReadableStream only when needed, WebCore is now aware of the data
stored in the response, which may allow applying backpressure to the network source in the future.
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::BodyLoader::didSucceed):
(WebCore::FetchResponse::BodyLoader::didReceiveData): Enqueuing only if stream is pulling.
Otherwise, storing in FetchBodyConsumer. If stream is pulling, we enqueue both buffered data and received chunk.
(WebCore::FetchResponse::consumeBodyAsStream): Resolving pull promise if we enqueued some buffered data.
(WebCore::FetchResponse::closeStream):
(WebCore::FetchResponse::feedStream): If we have some buffered data, we enqueue it. If there is no loader, the stream can be closed.
* Modules/fetch/FetchResponse.h:
* Modules/fetch/FetchResponseSource.cpp:
(WebCore::FetchResponseSource::doPull):
(WebCore::FetchResponseSource::close):
(WebCore::FetchResponseSource::error):
* Modules/fetch/FetchResponseSource.h:
* Modules/streams/ReadableStreamSource.h:
(WebCore::ReadableStreamSource::isPulling): Renamed from isStarting.
(WebCore::ReadableStreamSource::isStarting): Deleted.
Canonical link: https://commits.webkit.org/180910@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-06 09:43:52 +00:00
|
|
|
void closeStream();
|
|
|
|
|
2019-01-05 00:01:43 +00:00
|
|
|
void addAbortSteps(Ref<AbortSignal>&&);
|
|
|
|
|
2016-03-25 14:19:31 +00:00
|
|
|
class BodyLoader final : public FetchLoaderClient {
|
2019-07-03 05:43:11 +00:00
|
|
|
WTF_MAKE_FAST_ALLOCATED;
|
2016-03-25 14:19:31 +00:00
|
|
|
public:
|
2017-08-18 19:32:17 +00:00
|
|
|
BodyLoader(FetchResponse&, NotificationCallback&&);
|
2017-02-14 00:16:10 +00:00
|
|
|
~BodyLoader();
|
2016-03-25 14:19:31 +00:00
|
|
|
|
|
|
|
bool start(ScriptExecutionContext&, const FetchRequest&);
|
|
|
|
void stop();
|
|
|
|
|
2018-01-31 04:23:50 +00:00
|
|
|
void consumeDataByChunk(ConsumeDataByChunkCallback&&);
|
2017-08-19 01:29:50 +00:00
|
|
|
|
2016-04-17 18:04:20 +00:00
|
|
|
RefPtr<SharedBuffer> startStreaming();
|
2019-01-05 00:01:43 +00:00
|
|
|
NotificationCallback takeNotificationCallback() { return WTFMove(m_responseCallback); }
|
2019-04-22 22:12:03 +00:00
|
|
|
ConsumeDataByChunkCallback takeConsumeDataCallback() { return WTFMove(m_consumeDataCallback); }
|
2016-04-17 18:04:20 +00:00
|
|
|
|
2016-03-25 14:19:31 +00:00
|
|
|
private:
|
|
|
|
// FetchLoaderClient API
|
|
|
|
void didSucceed() final;
|
2017-08-15 19:35:11 +00:00
|
|
|
void didFail(const ResourceError&) final;
|
2016-05-24 07:35:09 +00:00
|
|
|
void didReceiveResponse(const ResourceResponse&) final;
|
2021-06-05 01:16:43 +00:00
|
|
|
void didReceiveData(const uint8_t*, size_t) final;
|
2016-03-25 14:19:31 +00:00
|
|
|
|
|
|
|
FetchResponse& m_response;
|
2017-08-18 19:32:17 +00:00
|
|
|
NotificationCallback m_responseCallback;
|
2018-01-31 04:23:50 +00:00
|
|
|
ConsumeDataByChunkCallback m_consumeDataCallback;
|
2016-03-25 14:19:31 +00:00
|
|
|
std::unique_ptr<FetchLoader> m_loader;
|
2019-04-22 22:12:03 +00:00
|
|
|
Ref<PendingActivity<FetchResponse>> m_pendingActivity;
|
2020-03-12 15:38:01 +00:00
|
|
|
FetchOptions::Credentials m_credentials;
|
2016-03-25 14:19:31 +00:00
|
|
|
};
|
|
|
|
|
2021-05-30 16:11:40 +00:00
|
|
|
mutable std::optional<ResourceResponse> m_filteredResponse;
|
2017-12-08 22:41:48 +00:00
|
|
|
ResourceResponse m_internalResponse;
|
2019-07-03 05:43:11 +00:00
|
|
|
std::unique_ptr<BodyLoader> m_bodyLoader;
|
2016-07-14 10:14:53 +00:00
|
|
|
mutable String m_responseURL;
|
2017-10-09 22:17:05 +00:00
|
|
|
// Opaque responses will padd their body size when used with Cache API.
|
|
|
|
uint64_t m_bodySizeWithPadding { 0 };
|
|
|
|
uint64_t m_opaqueLoadIdentifier { 0 };
|
2019-01-05 00:01:43 +00:00
|
|
|
RefPtr<AbortSignal> m_abortSignal;
|
2016-02-24 21:41:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace WebCore
|