Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Web Inspector: should not include injected script host hooks in stack…
… traces https://bugs.webkit.org/show_bug.cgi?id=243319 Reviewed by Yusuke Suzuki. * Source/JavaScriptCore/interpreter/StackVisitor.h: * Source/JavaScriptCore/interpreter/StackVisitor.cpp: (JSC::StackVisitor::Frame::isImplementationVisibilityPrivate const): Added. * Source/JavaScriptCore/inspector/ScriptCallStackFactory.cpp: (Inspector::CreateScriptCallStackFunctor::operator() const): * Source/JavaScriptCore/interpreter/Interpreter.cpp: (JSC::GetStackTraceFunctor::operator() const): (JSC::Interpreter::getStackTrace): * Source/JavaScriptCore/runtime/Error.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator() const): If the `StackVisitor::Frame` doesn't have a `CodeBlock`, look at the `CalleeBits` to see if it has an `ExecutableBase`, which can then be used to get the `ImplementationVisibility`. * Source/JavaScriptCore/runtime/ExecutableBaseInlines.h: (JSC::ExecutableBase::implementationVisibility const): * Source/JavaScriptCore/runtime/NativeExecutable.h: * Source/JavaScriptCore/runtime/NativeExecutable.cpp: (JSC::NativeExecutable::create): (JSC::NativeExecutable::NativeExecutable): * Source/JavaScriptCore/jit/JITThunks.h: * Source/JavaScriptCore/jit/JITThunks.cpp: (JSC::JITThunks::WeakNativeExecutableHash::hash): (JSC::JITThunks::WeakNativeExecutableHash::equal): (JSC::JITThunks::finalize): (JSC::JITThunks::hostFunctionStub): * Source/JavaScriptCore/runtime/VM.h: * Source/JavaScriptCore/runtime/VM.cpp: (JSC::VM::getHostFunction): (JSC::VM::getBoundFunction): (JSC::VM::getRemoteFunction): * Source/JavaScriptCore/runtime/JSFunction.h: * Source/JavaScriptCore/runtime/JSFunction.cpp: (JSC::JSFunction::create): * Source/JavaScriptCore/runtime/JSObject.h: * Source/JavaScriptCore/runtime/JSObject.cpp: (JSC::JSObject::putDirectNativeIntrinsicGetter): (JSC::JSObject::putDirectNativeIntrinsicGetterWithoutTransition): (JSC::JSObject::putDirectNativeFunction): (JSC::JSObject::putDirectNativeFunctionWithoutTransition): Require an `ImplementationVisibility` to create a `JSFunction`, which is passed along to the `NativeExecutable`. * Source/JavaScriptCore/inspector/JSInjectedScriptHostPrototype.cpp: (Inspector::JSInjectedScriptHostPrototype::finishCreation): * Source/JavaScriptCore/inspector/JSJavaScriptCallFramePrototype.cpp: (Inspector::JSJavaScriptCallFramePrototype::finishCreation): Provide `ImplementationVisibility::Private` (new behavior) when creating any `JSFunction`. * Source/JavaScriptCore/API/JSCallbackObjectFunctions.h: (JSC::JSCallbackObject<Parent>::init): * Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generate_combined_implementation.py: (BuiltinsCombinedImplementationGenerator.generate_secondary_header_includes): * Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generate_separate_implementation.py: (BuiltinsSeparateImplementationGenerator.generate_secondary_header_includes): * Source/JavaScriptCore/jsc.cpp: (GlobalObject::finishCreation): * Source/JavaScriptCore/runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::finishCreation): * Source/JavaScriptCore/runtime/AtomicsObject.cpp: (JSC::AtomicsObject::finishCreation): * Source/JavaScriptCore/runtime/ConsoleObject.cpp: (JSC::ConsoleObject::finishCreation): * Source/JavaScriptCore/runtime/DatePrototype.cpp: (JSC::DatePrototype::finishCreation): * Source/JavaScriptCore/runtime/FinalizationRegistryPrototype.cpp: (JSC::FinalizationRegistryPrototype::finishCreation): * Source/JavaScriptCore/runtime/FunctionPrototype.cpp: (JSC::FunctionPrototype::addFunctionProperties): * Source/JavaScriptCore/runtime/IntlCollatorPrototype.cpp: (JSC::intlCollatorPrototypeGetterCompare): * Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp: (JSC::IntlDateTimeFormatPrototype::finishCreation): (JSC::intlDateTimeFormatPrototypeGetterFormat): * Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp: (JSC::IntlNumberFormatPrototype::finishCreation): (JSC::intlNumberFormatPrototypeGetterFormat): * Source/JavaScriptCore/runtime/IntlObject.cpp: (JSC::IntlObject::finishCreation): * Source/JavaScriptCore/runtime/IntlPluralRulesPrototype.cpp: (JSC::IntlPluralRulesPrototype::finishCreation): * Source/JavaScriptCore/runtime/IntlSegmentsPrototype.cpp: (JSC::IntlSegmentsPrototype::finishCreation): * Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp: (JSC::JSGenericArrayBufferConstructor<sharingMode>::finishCreation): * Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp: (JSC::JSArrayBufferPrototype::finishCreation): * Source/JavaScriptCore/runtime/JSCustomGetterFunction.cpp: (JSC::JSCustomGetterFunction::create): * Source/JavaScriptCore/runtime/JSCustomSetterFunction.cpp: (JSC::JSCustomSetterFunction::create): * Source/JavaScriptCore/runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::initStaticGlobals): (JSC::JSGlobalObject::init): * Source/JavaScriptCore/runtime/JSNativeStdFunction.cpp: (JSC::JSNativeStdFunction::create): * Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp: (JSC::JSTypedArrayViewPrototype::finishCreation): * Source/JavaScriptCore/runtime/Lookup.h: (JSC::reifyStaticProperty): * Source/JavaScriptCore/runtime/Lookup.cpp: (JSC::reifyStaticAccessor): * Source/JavaScriptCore/runtime/MapPrototype.cpp: (JSC::MapPrototype::finishCreation): * Source/JavaScriptCore/runtime/MathObject.cpp: (JSC::MathObject::finishCreation): * Source/JavaScriptCore/runtime/NumberConstructor.cpp: (JSC::NumberConstructor::finishCreation): * Source/JavaScriptCore/runtime/ObjectConstructor.cpp: (JSC::ObjectConstructor::finishCreation): * Source/JavaScriptCore/runtime/ObjectPrototype.cpp: (JSC::ObjectPrototype::finishCreation): * Source/JavaScriptCore/runtime/ProxyConstructor.cpp: (JSC::ProxyConstructor::finishCreation): * Source/JavaScriptCore/runtime/RegExpPrototype.cpp: (JSC::RegExpPrototype::finishCreation): * Source/JavaScriptCore/runtime/SetPrototype.cpp: (JSC::SetPrototype::finishCreation): * Source/JavaScriptCore/runtime/StringPrototype.cpp: (JSC::StringPrototype::finishCreation): * Source/JavaScriptCore/runtime/SymbolPrototype.cpp: (JSC::SymbolPrototype::finishCreation): * Source/JavaScriptCore/runtime/WeakMapPrototype.cpp: (JSC::WeakMapPrototype::finishCreation): * Source/JavaScriptCore/runtime/WeakObjectRefPrototype.cpp: (JSC::WeakObjectRefPrototype::finishCreation): * Source/JavaScriptCore/runtime/WeakSetPrototype.cpp: (JSC::WeakSetPrototype::finishCreation): * Source/JavaScriptCore/tools/JSDollarVM.cpp: (JSC::DOMJITGetterComplex::finishCreation): (JSC::DOMJITFunctionObject::finishCreation): (JSC::DOMJITCheckJSCastObject::finishCreation): (JSC::WasmStreamingParser::finishCreation): (JSC::WasmStreamingCompiler::finishCreation): (JSC::functionCreateEmptyFunctionWithName): (JSC::functionCreateBuiltin): (JSC::JSDollarVM::finishCreation): (JSC::JSDollarVM::addFunction): (JSC::JSDollarVM::addConstructibleFunction): * Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp: (JSC::WebAssemblyFunction::create): * Source/JavaScriptCore/wasm/js/WebAssemblyGlobalPrototype.cpp: (JSC::WebAssemblyGlobalPrototype::finishCreation): * Source/JavaScriptCore/wasm/js/WebAssemblyWrapperFunction.cpp: (JSC::WebAssemblyWrapperFunction::create): * Source/WebCore/bindings/js/JSDOMAsyncIterator.h: (WebCore::JSIterator>::finishCreation): * Source/WebCore/bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::addBuiltinGlobals): (WebCore::JSDOMGlobalObject::createCrossOriginFunction): * Source/WebCore/bindings/js/JSDOMIterator.h: (WebCore::IteratorTraits>::finishCreation): * Source/WebCore/bindings/js/JSDOMWindowCustom.cpp: (WebCore::showModalDialogGetter): (WebCore::JSDOMWindow::openDatabase const): * Source/WebCore/bindings/js/JSFileSystemDirectoryHandleIterator.cpp: (WebCore::JSFileSystemDirectoryHandleIterator::createOnSettledFunction): (WebCore::JSFileSystemDirectoryHandleIterator::createOnFulfilledFunction): (WebCore::JSFileSystemDirectoryHandleIterator::createOnRejectedFunction): * Source/WebCore/bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::JSTestGlobalObject::finishCreation): * Source/WebCore/bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::finishCreation): * Source/WebCore/bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::finishCreation): Provide `ImplementationVisibility::Public` (existing behavior) when creating any `JSFunction`. * Source/WebInspectorUI/UserInterface/Controllers/StackTraceTreeController.js: (WI.StackTraceTreeController.prototype._groupBlackboxedCallFrames): Always display at least one call frame (or blackboxed group). * Source/JavaScriptCore/runtime/NativeFunction.h: (JSC::NativeFunctionHash::hash): (JSC::TaggedNativeFunctionHash::hash): (WTF::add): Added. Allow `TaggedNativeFunctionHash` (and `NativeFunctionHash`) to work with `Hasher`. * LayoutTests/inspector/animation/lifecycle-web-animation-expected.txt: * LayoutTests/inspector/canvas/create-context-2d-expected.txt: * LayoutTests/inspector/canvas/create-context-bitmaprenderer-expected.txt: * LayoutTests/inspector/canvas/create-context-webgl-expected.txt: * LayoutTests/inspector/canvas/create-context-webgl2-expected.txt: * LayoutTests/inspector/canvas/recording-2d-frameCount-expected.txt: * LayoutTests/inspector/canvas/recording-2d-full-expected.txt: * LayoutTests/inspector/canvas/recording-2d-memoryLimit-expected.txt: * LayoutTests/inspector/canvas/recording-webgl-frameCount-expected.txt: * LayoutTests/inspector/canvas/recording-webgl-full-expected.txt: * LayoutTests/inspector/canvas/recording-webgl-memoryLimit-expected.txt: * LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt: * LayoutTests/inspector/canvas/recording-webgl2-frameCount-expected.txt: * LayoutTests/inspector/canvas/recording-webgl2-full-expected.txt: * LayoutTests/inspector/canvas/recording-webgl2-memoryLimit-expected.txt: * LayoutTests/inspector/canvas/recording-webgl2-snapshots-expected.txt: * LayoutTests/inspector/model/remote-object/error-expected.txt: * LayoutTests/inspector/model/stack-trace-expected.txt: * LayoutTests/inspector/timeline/line-column-expected.txt: * LayoutTests/platform/gtk/inspector/timeline/line-column-expected.txt: * LayoutTests/platform/mac-wk1/inspector/canvas/recording-webgl-frameCount-expected.txt: * LayoutTests/platform/mac-wk1/inspector/canvas/recording-webgl-full-expected.txt: * LayoutTests/platform/mac-wk1/inspector/canvas/recording-webgl-memoryLimit-expected.txt: * LayoutTests/platform/mac-wk1/inspector/canvas/recording-webgl-snapshots-expected.txt: * LayoutTests/platform/mac-wk1/inspector/canvas/recording-webgl2-frameCount-expected.txt: * LayoutTests/platform/mac-wk1/inspector/canvas/recording-webgl2-full-expected.txt: * LayoutTests/platform/mac-wk1/inspector/canvas/recording-webgl2-memoryLimit-expected.txt: * LayoutTests/platform/mac-wk1/inspector/canvas/recording-webgl2-snapshots-expected.txt: Canonical link: https://commits.webkit.org/253022@main
- Loading branch information