Changeset 260848 in webkit
- Timestamp:
- Apr 28, 2020 2:51:37 PM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 43 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSContextRef.cpp
r259676 r260848 263 263 264 264 JSObject* object = toJS(function); 265 if (!object->is Function(vm)) {265 if (!object->isCallable(vm)) { 266 266 *exception = toRef(createTypeError(globalObject)); 267 267 return; -
trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
r260744 r260848 707 707 JSLockHolder locker(vm); 708 708 JSCell* cell = toJS(object); 709 return cell->is Function(vm);709 return cell->isCallable(vm); 710 710 } 711 711 -
trunk/Source/JavaScriptCore/ChangeLog
r260834 r260848 1 2020-04-28 Ross Kirsling <ross.kirsling@sony.com> 2 3 [JSC] Align upon the name isCallable instead of isFunction 4 https://bugs.webkit.org/show_bug.cgi?id=211140 5 6 Reviewed by Darin Adler. 7 8 Follow-up to r260722. Usage is now cleanly separated between isFunction / getCallData, 9 but the name isCallable is still clearer than isFunction so let's flip that after all. 10 11 * API/JSContextRef.cpp: 12 (JSGlobalContextSetUnhandledRejectionCallback): 13 * API/JSObjectRef.cpp: 14 (JSObjectIsFunction): 15 * dfg/DFGOperations.cpp: 16 * ftl/FTLLowerDFGToB3.cpp: 17 (JSC::FTL::DFG::LowerDFGToB3::compileCreateThis): 18 (JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise): 19 (JSC::FTL::DFG::LowerDFGToB3::compileCreateInternalFieldObject): 20 (JSC::FTL::DFG::LowerDFGToB3::compileIsObjectOrNull): 21 (JSC::FTL::DFG::LowerDFGToB3::compileIsFunction): 22 (JSC::FTL::DFG::LowerDFGToB3::buildTypeOf): 23 (JSC::FTL::DFG::LowerDFGToB3::isCallable): 24 (JSC::FTL::DFG::LowerDFGToB3::isFunction): Deleted. 25 * ftl/FTLOperations.cpp: 26 (JSC::FTL::operationTypeOfObjectAsTypeofType): 27 * jsc.cpp: 28 (functionSetUnhandledRejectionCallback): 29 * runtime/CommonSlowPaths.cpp: 30 (JSC::SLOW_PATH_DECL): 31 * runtime/ExceptionHelpers.cpp: 32 (JSC::errorDescriptionForValue): 33 * runtime/FunctionPrototype.cpp: 34 (JSC::functionProtoFuncToString): 35 * runtime/InternalFunction.cpp: 36 (JSC::getFunctionRealm): 37 * runtime/JSCJSValue.h: 38 * runtime/JSCJSValueInlines.h: 39 (JSC::JSValue::isCallable const): 40 (JSC::JSValue::isFunction const): Deleted. 41 * runtime/JSCell.h: 42 * runtime/JSCellInlines.h: 43 (JSC::JSCell::isCallable): 44 (JSC::JSCell::isFunction): Deleted. 45 * runtime/JSONObject.cpp: 46 (JSC::Stringifier::appendStringifiedValue): 47 * runtime/ObjectConstructor.cpp: 48 (JSC::toPropertyDescriptor): 49 * runtime/ObjectPrototype.cpp: 50 (JSC::objectProtoFuncDefineGetter): 51 (JSC::objectProtoFuncDefineSetter): 52 * runtime/Operations.cpp: 53 (JSC::jsTypeStringForValue): 54 (JSC::jsIsObjectTypeOrNull): 55 * runtime/ProxyObject.cpp: 56 (JSC::ProxyObject::structureForTarget): 57 (JSC::ProxyObject::finishCreation): 58 * runtime/RuntimeType.cpp: 59 (JSC::runtimeTypeForValue): 60 * tools/JSDollarVM.cpp: 61 (JSC::functionCallWithStackSize): 62 (JSC::functionFindTypeForExpression): 63 (JSC::functionReturnTypeFor): 64 (JSC::functionHasBasicBlockExecuted): 65 (JSC::functionBasicBlockExecutionCount): 66 * wasm/WasmInstance.cpp: 67 (JSC::Wasm::Instance::setFunctionWrapper): 68 * wasm/WasmOperations.cpp: 69 (JSC::Wasm::operationIterateResults): 70 (JSC::Wasm::operationWasmRefFunc): 71 * wasm/js/WebAssemblyModuleRecord.cpp: 72 (JSC::WebAssemblyModuleRecord::link): 73 * wasm/js/WebAssemblyWrapperFunction.cpp: 74 (JSC::WebAssemblyWrapperFunction::finishCreation): 75 1 76 2020-04-28 Yusuke Suzuki <ysuzuki@apple.com> 2 77 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r260834 r260848 2144 2144 if (object->structure(vm)->masqueradesAsUndefined(globalObject)) 2145 2145 return false; 2146 if (object->is Function(vm))2146 if (object->isCallable(vm)) 2147 2147 return false; 2148 2148 return true; … … 2159 2159 if (object->structure(vm)->masqueradesAsUndefined(globalObject)) 2160 2160 return false; 2161 if (object->is Function(vm))2161 if (object->isCallable(vm)) 2162 2162 return true; 2163 2163 return false; … … 2174 2174 if (object->structure(vm)->masqueradesAsUndefined(globalObject)) 2175 2175 return vm.smallStrings.undefinedString(); 2176 if (object->is Function(vm))2176 if (object->isCallable(vm)) 2177 2177 return vm.smallStrings.functionString(); 2178 2178 return vm.smallStrings.objectString(); -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r260834 r260848 6973 6973 LBasicBlock continuation = m_out.newBlock(); 6974 6974 6975 m_out.branch(is Function(callee, provenType(m_node->child1())), usually(isFunctionBlock), rarely(slowPath));6975 m_out.branch(isCallable(callee, provenType(m_node->child1())), usually(isFunctionBlock), rarely(slowPath)); 6976 6976 6977 6977 LBasicBlock lastNext = m_out.appendTo(isFunctionBlock, hasRareData); … … 7018 7018 7019 7019 LBasicBlock lastNext = m_out.appendTo(derivedCase, isFunctionBlock); 7020 m_out.branch(is Function(callee, provenType(m_node->child1())), usually(isFunctionBlock), rarely(slowCase));7020 m_out.branch(isCallable(callee, provenType(m_node->child1())), usually(isFunctionBlock), rarely(slowCase)); 7021 7021 7022 7022 m_out.appendTo(isFunctionBlock, hasRareData); … … 7073 7073 LBasicBlock continuation = m_out.newBlock(); 7074 7074 7075 m_out.branch(is Function(callee, provenType(m_node->child1())), usually(isFunctionBlock), rarely(slowCase));7075 m_out.branch(isCallable(callee, provenType(m_node->child1())), usually(isFunctionBlock), rarely(slowCase)); 7076 7076 7077 7077 LBasicBlock lastNext = m_out.appendTo(isFunctionBlock, hasRareData); … … 11569 11569 ValueFromBlock isFunctionResult = m_out.anchor(m_out.booleanFalse); 11570 11570 m_out.branch( 11571 is Function(value, provenType(child)),11571 isCallable(value, provenType(child)), 11572 11572 unsure(continuation), unsure(notFunctionCase)); 11573 11573 … … 11626 11626 ValueFromBlock functionResult = m_out.anchor(m_out.booleanTrue); 11627 11627 m_out.branch( 11628 is Function(value, provenType(child)),11628 isCallable(value, provenType(child)), 11629 11629 unsure(continuation), unsure(notFunctionCase)); 11630 11630 … … 16195 16195 m_out.appendTo(objectCase, functionCase); 16196 16196 m_out.branch( 16197 is Function(value, provenType(child) & SpecObject),16197 isCallable(value, provenType(child) & SpecObject), 16198 16198 unsure(functionCase), unsure(notFunctionCase)); 16199 16199 … … 17900 17900 } 17901 17901 17902 LValue is Function(LValue cell, SpeculatedType type = SpecFullTop)17902 LValue isCallable(LValue cell, SpeculatedType type = SpecFullTop) 17903 17903 { 17904 17904 if (LValue proven = isProvenValue(type & SpecCell, SpecFunction)) -
trunk/Source/JavaScriptCore/ftl/FTLOperations.cpp
r260321 r260848 722 722 if (object->structure(vm)->masqueradesAsUndefined(globalObject)) 723 723 return static_cast<int32_t>(TypeofType::Undefined); 724 if (object->is Function(vm))724 if (object->isCallable(vm)) 725 725 return static_cast<int32_t>(TypeofType::Function); 726 726 return static_cast<int32_t>(TypeofType::Object); -
trunk/Source/JavaScriptCore/jsc.cpp
r260744 r260848 2486 2486 auto scope = DECLARE_THROW_SCOPE(vm); 2487 2487 2488 if (!object || !object->is Function(vm))2488 if (!object || !object->isCallable(vm)) 2489 2489 return throwVMTypeError(globalObject, scope); 2490 2490 -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r260809 r260848 833 833 BEGIN(); 834 834 auto bytecode = pc->as<OpIsFunction>(); 835 RETURN(jsBoolean(GET_C(bytecode.m_operand).jsValue().is Function(vm)));835 RETURN(jsBoolean(GET_C(bytecode.m_operand).jsValue().isCallable(vm))); 836 836 } 837 837 -
trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
r260810 r260848 96 96 VM& vm = globalObject->vm(); 97 97 JSObject* object = asObject(v); 98 if (object->is Function(vm))98 if (object->isCallable(vm)) 99 99 return vm.smallStrings.functionString()->value(globalObject); 100 100 return JSObject::calculatedClassName(object); -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp
r259547 r260848 150 150 JSObject* object = asObject(thisValue); 151 151 Integrity::auditStructureID(vm, object->structureID()); 152 if (object->is Function(vm))152 if (object->isCallable(vm)) 153 153 RELEASE_AND_RETURN(scope, JSValue::encode(jsMakeNontrivialString(globalObject, "function ", object->classInfo(vm)->className, "() {\n [native code]\n}"))); 154 154 } -
trunk/Source/JavaScriptCore/runtime/InternalFunction.cpp
r260744 r260848 158 158 JSGlobalObject* getFunctionRealm(VM& vm, JSObject* object) 159 159 { 160 ASSERT(object->is Function(vm));160 ASSERT(object->isCallable(vm)); 161 161 162 162 if (object->inherits<JSBoundFunction>(vm)) -
trunk/Source/JavaScriptCore/runtime/JSCJSValue.h
r260805 r260848 231 231 // Querying the type. 232 232 bool isEmpty() const; 233 bool is Function(VM&) const;233 bool isCallable(VM&) const; 234 234 bool isConstructor(VM&) const; 235 235 bool isUndefined() const; -
trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h
r260805 r260848 888 888 } 889 889 890 inline bool JSValue::isFunction(VM& vm) const 891 { 892 if (!isCell()) 893 return false; 894 return asCell()->isFunction(vm); 890 inline bool JSValue::isCallable(VM& vm) const 891 { 892 return isCell() && asCell()->isCallable(vm); 895 893 } 896 894 897 895 inline bool JSValue::isConstructor(VM& vm) const 898 896 { 899 if (!isCell()) 900 return false; 901 return asCell()->isConstructor(vm); 897 return isCell() && asCell()->isConstructor(vm); 902 898 } 903 899 -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r260744 r260848 108 108 bool isCustomGetterSetter() const; 109 109 bool isProxy() const; 110 bool is Function(VM&);110 bool isCallable(VM&); 111 111 bool isConstructor(VM&); 112 112 bool inherits(VM&, const ClassInfo*) const; -
trunk/Source/JavaScriptCore/runtime/JSCellInlines.h
r260744 r260848 230 230 } 231 231 232 ALWAYS_INLINE bool JSCell::is Function(VM& vm)232 ALWAYS_INLINE bool JSCell::isCallable(VM& vm) 233 233 { 234 234 if (type() == JSFunctionType) -
trunk/Source/JavaScriptCore/runtime/JSONObject.cpp
r260744 r260848 385 385 386 386 JSObject* object = asObject(value); 387 if (object->is Function(vm)) {387 if (object->isCallable(vm)) { 388 388 if (holder.isArray()) { 389 389 builder.appendLiteral("null"); -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
r260732 r260848 533 533 JSValue get = description->get(globalObject, vm.propertyNames->get); 534 534 RETURN_IF_EXCEPTION(scope, false); 535 if (!get.isUndefined() && !get.is Function(vm)) {535 if (!get.isUndefined() && !get.isCallable(vm)) { 536 536 throwTypeError(globalObject, scope, "Getter must be a function."_s); 537 537 return false; … … 546 546 JSValue set = description->get(globalObject, vm.propertyNames->set); 547 547 RETURN_IF_EXCEPTION(scope, false); 548 if (!set.isUndefined() && !set.is Function(vm)) {548 if (!set.isUndefined() && !set.isCallable(vm)) { 549 549 throwTypeError(globalObject, scope, "Setter must be a function."_s); 550 550 return false; -
trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp
r260744 r260848 155 155 156 156 JSValue get = callFrame->argument(1); 157 if (!get.is Function(vm))157 if (!get.isCallable(vm)) 158 158 return throwVMTypeError(globalObject, scope, "invalid getter usage"_s); 159 159 … … 182 182 183 183 JSValue set = callFrame->argument(1); 184 if (!set.is Function(vm))184 if (!set.isCallable(vm)) 185 185 return throwVMTypeError(globalObject, scope, "invalid setter usage"_s); 186 186 -
trunk/Source/JavaScriptCore/runtime/Operations.cpp
r260809 r260848 100 100 if (object->structure(vm)->masqueradesAsUndefined(globalObject)) 101 101 return vm.smallStrings.undefinedString(); 102 if (object->is Function(vm))102 if (object->isCallable(vm)) 103 103 return vm.smallStrings.functionString(); 104 104 } … … 124 124 return false; 125 125 JSObject* object = asObject(v); 126 if (object->is Function(vm))126 if (object->isCallable(vm)) 127 127 return false; 128 128 } -
trunk/Source/JavaScriptCore/runtime/ProxyObject.cpp
r260744 r260848 73 73 { 74 74 VM& vm = globalObject->vm(); 75 return target.is Function(vm) ? globalObject->callableProxyObjectStructure() : globalObject->proxyObjectStructure();75 return target.isCallable(vm) ? globalObject->callableProxyObjectStructure() : globalObject->proxyObjectStructure(); 76 76 } 77 77 … … 92 92 JSObject* targetAsObject = jsCast<JSObject*>(target); 93 93 94 m_isCallable = targetAsObject->is Function(vm);94 m_isCallable = targetAsObject->isCallable(vm); 95 95 if (m_isCallable) { 96 96 TypeInfo info = structure(vm)->typeInfo(); -
trunk/Source/JavaScriptCore/runtime/RuntimeType.cpp
r248898 r260848 52 52 if (value.isObject()) 53 53 return TypeObject; 54 if (value.is Function(vm))54 if (value.isCallable(vm)) 55 55 return TypeFunction; 56 56 if (value.isSymbol()) -
trunk/Source/JavaScriptCore/tools/JSDollarVM.cpp
r260784 r260848 2179 2179 JSValue arg0 = callFrame->argument(0); 2180 2180 JSValue arg1 = callFrame->argument(1); 2181 if (!arg0.is Function(vm))2181 if (!arg0.isCallable(vm)) 2182 2182 return throwVMError(globalObject, throwScope, "arg0 should be a function"); 2183 2183 if (!arg1.isNumber()) … … 2592 2592 2593 2593 JSValue functionValue = callFrame->argument(0); 2594 RELEASE_ASSERT(functionValue.is Function(vm));2594 RELEASE_ASSERT(functionValue.isCallable(vm)); 2595 2595 FunctionExecutable* executable = (jsDynamicCast<JSFunction*>(vm, functionValue.asCell()->getObject()))->jsExecutable(); 2596 2596 … … 2612 2612 2613 2613 JSValue functionValue = callFrame->argument(0); 2614 RELEASE_ASSERT(functionValue.is Function(vm));2614 RELEASE_ASSERT(functionValue.isCallable(vm)); 2615 2615 FunctionExecutable* executable = (jsDynamicCast<JSFunction*>(vm, functionValue.asCell()->getObject()))->jsExecutable(); 2616 2616 … … 2646 2646 2647 2647 JSValue functionValue = callFrame->argument(0); 2648 RELEASE_ASSERT(functionValue.is Function(vm));2648 RELEASE_ASSERT(functionValue.isCallable(vm)); 2649 2649 FunctionExecutable* executable = (jsDynamicCast<JSFunction*>(vm, functionValue.asCell()->getObject()))->jsExecutable(); 2650 2650 … … 2666 2666 2667 2667 JSValue functionValue = callFrame->argument(0); 2668 RELEASE_ASSERT(functionValue.is Function(vm));2668 RELEASE_ASSERT(functionValue.isCallable(vm)); 2669 2669 FunctionExecutable* executable = (jsDynamicCast<JSFunction*>(vm, functionValue.asCell()->getObject()))->jsExecutable(); 2670 2670 -
trunk/Source/JavaScriptCore/wasm/WasmInstance.cpp
r253987 r260848 109 109 { 110 110 ASSERT(m_owner); 111 ASSERT(value.is Function(owner<JSWebAssemblyInstance>()->vm()));111 ASSERT(value.isCallable(owner<JSWebAssemblyInstance>()->vm())); 112 112 ASSERT(!m_functionWrappers.contains(i)); 113 113 auto locker = holdLock(owner<JSWebAssemblyInstance>()->cellLock()); -
trunk/Source/JavaScriptCore/wasm/WasmOperations.cpp
r256500 r260848 540 540 break; 541 541 case Funcref: 542 if (!value.is Function(vm)) {542 if (!value.isCallable(vm)) { 543 543 throwTypeError(globalObject, scope, "Funcref value is not a function"_s); 544 544 return; … … 729 729 { 730 730 JSValue value = instance->getFunctionWrapper(index); 731 ASSERT(value.is Function(instance->owner<JSObject>()->vm()));731 ASSERT(value.isCallable(instance->owner<JSObject>()->vm())); 732 732 return JSValue::encode(value); 733 733 } -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp
r260744 r260848 189 189 // 4. If i is a function import: 190 190 // i. If IsCallable(v) is false, throw a WebAssembly.LinkError. 191 if (!value.is Function(vm))191 if (!value.isCallable(vm)) 192 192 return exception(createJSWebAssemblyLinkError(globalObject, vm, importFailMessage(import, "import function", "must be callable"))); 193 193 … … 393 393 } 394 394 395 ASSERT(wrapper.is Function(vm));395 ASSERT(wrapper.isCallable(vm)); 396 396 m_instance->instance().setFunctionWrapper(index, wrapper); 397 397 … … 413 413 } else if (global.initializationType == Wasm::GlobalInformation::FromRefFunc) { 414 414 ASSERT(global.initialBitsOrImportNumber < moduleInformation.functionIndexSpaceSize()); 415 ASSERT(makeFunctionWrapper("Global init expr", global.initialBitsOrImportNumber).is Function(vm));415 ASSERT(makeFunctionWrapper("Global init expr", global.initialBitsOrImportNumber).isCallable(vm)); 416 416 initialBits = JSValue::encode(makeFunctionWrapper("Global init expr", global.initialBitsOrImportNumber)); 417 417 } else … … 445 445 case Wasm::ExternalKind::Function: { 446 446 exportedValue = makeFunctionWrapper(String::fromUTF8(exp.field), exp.kindIndex); 447 ASSERT(exportedValue.is Function(vm));447 ASSERT(exportedValue.isCallable(vm)); 448 448 ASSERT(makeFunctionWrapper(String::fromUTF8(exp.field), exp.kindIndex) == exportedValue); 449 449 break; -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyWrapperFunction.cpp
r260744 r260848 69 69 { 70 70 Base::finishCreation(vm, executable, length, name, instance); 71 RELEASE_ASSERT(JSValue(function).is Function(vm));71 RELEASE_ASSERT(JSValue(function).isCallable(vm)); 72 72 m_function.set(vm, this, function); 73 73 } -
trunk/Source/WebCore/ChangeLog
r260845 r260848 1 2020-04-28 Ross Kirsling <ross.kirsling@sony.com> 2 3 [JSC] Align upon the name isCallable instead of isFunction 4 https://bugs.webkit.org/show_bug.cgi?id=211140 5 6 Reviewed by Darin Adler. 7 8 * Modules/plugins/QuickTimePluginReplacement.mm: 9 (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): 10 * bindings/js/JSCustomElementRegistryCustom.cpp: 11 (WebCore::getCustomElementCallback): 12 * bindings/js/JSDOMConvertCallbacks.h: 13 (WebCore::Converter<IDLCallbackFunction<T>>::convert): 14 * bindings/js/JSDOMConvertScheduledAction.h: 15 (WebCore::Converter<IDLScheduledAction>::convert): 16 * bindings/js/JSDOMPromise.cpp: 17 (WebCore::DOMPromise::whenPromiseIsSettled): 18 * bindings/js/JSDOMWindowCustom.cpp: 19 (WebCore::JSDOMWindow::queueMicrotask): 20 * bindings/js/JSWorkerGlobalScopeCustom.cpp: 21 (WebCore::JSWorkerGlobalScope::queueMicrotask): 22 * bindings/js/ReadableStream.cpp: 23 (WebCore::ReadableStream::pipeTo): 24 (WebCore::ReadableStream::tee): 25 * bindings/js/ReadableStreamDefaultController.cpp: 26 (WebCore::ReadableStreamDefaultController::invoke): 27 * bindings/js/ScriptController.cpp: 28 (WebCore::ScriptController::callInWorld): 29 * bindings/scripts/CodeGeneratorJS.pm: 30 (GenerateOverloadDispatcher): 31 * html/HTMLMediaElement.cpp: 32 (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): 33 * testing/Internals.cpp: 34 (WebCore::Internals::parserMetaData): 35 (WebCore::Internals::cloneArrayBuffer): 36 * worklets/PaintWorkletGlobalScope.cpp: 37 (WebCore::PaintWorkletGlobalScope::registerPaint): 38 1 39 2020-04-28 Simon Fraser <simon.fraser@apple.com> 2 40 -
trunk/Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm
r260744 r260848 154 154 155 155 JSC::JSValue replacementFunction = globalObject->get(lexicalGlobalObject, JSC::Identifier::fromString(vm, "createPluginReplacement")); 156 if (replacementFunction.is Function(vm))156 if (replacementFunction.isCallable(vm)) 157 157 return true; 158 158 -
trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp
r251691 r260848 50 50 if (callback.isUndefined()) 51 51 return nullptr; 52 if (!callback.is Function(vm)) {52 if (!callback.isCallable(vm)) { 53 53 throwTypeError(&lexicalGlobalObject, scope, "A custom element callback must be a function"_s); 54 54 return nullptr; -
trunk/Source/WebCore/bindings/js/JSDOMConvertCallbacks.h
r251425 r260848 41 41 auto scope = DECLARE_THROW_SCOPE(vm); 42 42 43 if (!value.is Function(vm)) {43 if (!value.isCallable(vm)) { 44 44 exceptionThrower(lexicalGlobalObject, scope); 45 45 return nullptr; -
trunk/Source/WebCore/bindings/js/JSDOMConvertScheduledAction.h
r260722 r260848 39 39 auto scope = DECLARE_THROW_SCOPE(vm); 40 40 41 if (!value.is Function(vm)) {41 if (!value.isCallable(vm)) { 42 42 auto code = Converter<IDLDOMString>::convert(lexicalGlobalObject, value); 43 43 RETURN_IF_EXCEPTION(scope, nullptr); -
trunk/Source/WebCore/bindings/js/JSDOMPromise.cpp
r260744 r260848 62 62 return; 63 63 64 ASSERT(thenFunction.is Function(vm));64 ASSERT(thenFunction.isCallable(vm)); 65 65 66 66 JSC::MarkedArgumentBuffer arguments; -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r260597 r260848 541 541 542 542 JSValue functionValue = callFrame.uncheckedArgument(0); 543 if (UNLIKELY(!functionValue.is Function(vm)))543 if (UNLIKELY(!functionValue.isCallable(vm))) 544 544 return JSValue::decode(throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 0, "callback", "Window", "queueMicrotask")); 545 545 -
trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp
r251425 r260848 58 58 59 59 JSValue functionValue = callFrame.uncheckedArgument(0); 60 if (UNLIKELY(!functionValue.is Function(vm)))60 if (UNLIKELY(!functionValue.isCallable(vm))) 61 61 return JSValue::decode(throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 0, "callback", "WorkerGlobalScope", "queueMicrotask")); 62 62 -
trunk/Source/WebCore/bindings/js/ReadableStream.cpp
r260744 r260848 79 79 80 80 auto readableStreamPipeTo = m_globalObject->get(&lexicalGlobalObject, privateName); 81 ASSERT(readableStreamPipeTo.is Function(lexicalGlobalObject.vm()));81 ASSERT(readableStreamPipeTo.isCallable(lexicalGlobalObject.vm())); 82 82 83 83 MarkedArgumentBuffer arguments; … … 95 95 96 96 auto readableStreamTee = m_globalObject->get(&lexicalGlobalObject, privateName); 97 ASSERT(readableStreamTee.is Function(lexicalGlobalObject.vm()));97 ASSERT(readableStreamTee.isCallable(lexicalGlobalObject.vm())); 98 98 99 99 MarkedArgumentBuffer arguments; -
trunk/Source/WebCore/bindings/js/ReadableStreamDefaultController.cpp
r260744 r260848 57 57 RETURN_IF_EXCEPTION(scope, JSC::JSValue()); 58 58 59 if (!function.is Function(vm)) {59 if (!function.isCallable(vm)) { 60 60 if (!function.isUndefined()) 61 61 throwTypeError(&lexicalGlobalObject, scope, "ReadableStream trying to call a property that is not callable"_s); -
trunk/Source/WebCore/bindings/js/ScriptController.cpp
r260744 r260848 660 660 break; 661 661 662 if (!functionObject || !functionObject.is Function(world.vm())) {662 if (!functionObject || !functionObject.isCallable(world.vm())) { 663 663 optionalDetails = { { "Unable to create JavaScript async function to call"_s } }; 664 664 break; -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r260744 r260848 3514 3514 3515 3515 $overload = GetOverloadThatMatches($S, $d, \&$isObjectOrCallbackFunctionParameter); 3516 &$generateOverloadCallIfNecessary($overload, "distinguishingArg.is Function(vm)");3516 &$generateOverloadCallIfNecessary($overload, "distinguishingArg.isCallable(vm)"); 3517 3517 3518 3518 # FIXME: Avoid invoking GetMethod(object, Symbol.iterator) again in convert<IDLSequence<T>>(...). -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r260744 r260848 7148 7148 7149 7149 auto functionValue = globalObject.get(&lexicalGlobalObject, JSC::Identifier::fromString(vm, "createControls")); 7150 if (functionValue.is Function(vm))7150 if (functionValue.isCallable(vm)) 7151 7151 return true; 7152 7152 -
trunk/Source/WebCore/testing/Internals.cpp
r260822 r260848 2274 2274 CodeBlock* codeBlock = iter.codeBlock(); 2275 2275 executable = codeBlock->ownerExecutable(); 2276 } else if (code.is Function(vm)) {2276 } else if (code.isCallable(vm)) { 2277 2277 JSFunction* funcObj = JSC::jsCast<JSFunction*>(code.toObject(globalObject)); 2278 2278 executable = funcObj->jsExecutable(); … … 4647 4647 lexicalGlobalObject.methodTable(vm)->getOwnPropertySlot(&lexicalGlobalObject, &lexicalGlobalObject, privateName, propertySlot); 4648 4648 value = propertySlot.getValue(&lexicalGlobalObject, privateName); 4649 ASSERT(value.is Function(vm));4649 ASSERT(value.isCallable(vm)); 4650 4650 4651 4651 JSObject* function = value.getObject(); -
trunk/Source/WebCore/worklets/PaintWorkletGlobalScope.cpp
r260722 r260848 76 76 77 77 // Validate that paintConstructor is a VoidFunction 78 if (!paintConstructor->is Function(vm))78 if (!paintConstructor->isCallable(vm)) 79 79 return Exception { TypeError, "paintConstructor must be callable" }; 80 80 -
trunk/Source/WebKit/ChangeLog
r260847 r260848 1 2020-04-28 Ross Kirsling <ross.kirsling@sony.com> 2 3 [JSC] Align upon the name isCallable instead of isFunction 4 https://bugs.webkit.org/show_bug.cgi?id=211140 5 6 Reviewed by Darin Adler. 7 8 * WebProcess/Plugins/Netscape/NPJSObject.cpp: 9 (WebKit::NPJSObject::hasMethod): 10 1 11 2020-04-28 Devin Rousso <drousso@apple.com> 2 12 -
trunk/Source/WebKit/WebProcess/Plugins/Netscape/NPJSObject.cpp
r260744 r260848 110 110 scope.clearException(); 111 111 112 return value.is Function(vm);112 return value.isCallable(vm); 113 113 } 114 114
Note: See TracChangeset
for help on using the changeset viewer.