Replace static_cast with jsCast when casting JSCell subclasses in JSC
https://bugs.webkit.org/show_bug.cgi?id=83307
Reviewed by Gavin Barraclough.
Replace all usage of static_cast<JSCell subtype*> with jsCast<> in JavaScriptCore.
This results in assertions when unsafe casts are performed, but simply leaves
a static_cast<> in release builds.
(toJS):
- API/JSCallbackConstructor.cpp:
(JSC::constructJSCallback):
- API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::call):
- API/JSCallbackObjectFunctions.h:
(JSC::::asCallbackObject):
(JSC::::finishCreation):
(JSC::::construct):
(JSC::::call):
(JSObjectGetPrivate):
(JSObjectSetPrivate):
(JSObjectGetPrivateProperty):
(JSObjectSetPrivateProperty):
(JSObjectDeletePrivateProperty):
(JSValueIsObjectOfClass):
- API/JSWeakObjectMapRefPrivate.cpp:
- bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::resolve):
(JSC::BytecodeGenerator::resolveConstDecl):
- debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::finishCreation):
- dfg/DFGOperations.cpp:
- interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::privateExecute):
(JSC::DEFINE_STUB_FUNCTION):
(JSC::isHostFunction):
(JSC::asActivation):
(JSC::JSArray::defineOwnProperty):
(JSC::asArray):
- runtime/JSBoundFunction.cpp:
(JSC::boundFunctionCall):
(JSC::boundFunctionConstruct):
(JSC::asByteArray):
(JSC::JSCell::toObject):
(JSC::jsCast):
- runtime/JSGlobalObject.h:
(JSC::asGlobalObject):
- runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::allowsAccessFrom):
(JSC::JSObject::toThisObject):
(JSC::JSObject::unwrappedObject):
(JSC::asObject):
- runtime/JSPropertyNameIterator.h:
(JSC::Register::propertyNameIterator):
(JSC::asString):
(JSC::JSValue::toString):
- runtime/StringPrototype.cpp:
(JSC::stringProtoFuncSubstr):