Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[Qt] REGRESSION(r125428): fast/profiler/nested-start-and-stop-profile…
…r.html fails https://bugs.webkit.org/show_bug.cgi?id=93897 Reviewed by Kenneth Rohde Christiansen. Source/WebCore: Before r125428 run-time methods (wrapped signals, slots or invokable functions) were subclasses of JSInternalFunction and therefore real function objects in the JavaScript sense. r125428 changed them to be just callable objects, but they did not have Function.prototype as prototype anymore for example nor was their name correct (resulting in a layout test failure). This patch changes run-time methods back to being real function objects that have a correct name and have Function.prototype in their prototype change The objects returned by JSObjectMakeFunctionWithCallbackInjected are light-weight internal function objects that do not support JSObject{Set/Get}Private. Therefore we inject our own prototype right before the Function.prototype prototype, which uses private data to store a pointer to our C++ QtRuntimeMethod object. This complicates the retrieval of the pointer to that instance slightly, which is why this patch introduces the toRuntimeMethod convenience function that looks up our prototype first and does a check for type-safety. At the same time the patch removes the length properties from the run-time method itself as well as connect/disconnect. The length property on a function signifies the number of arguments, but in all three cases that number is actually variable, because of overloading. That is why we choose not to expose it in the first place. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::prototypeForSignalsAndSlots): (JSC::Bindings::QtRuntimeMethod::call): (JSC::Bindings::QtRuntimeMethod::jsObjectRef): (JSC::Bindings::QtRuntimeMethod::toRuntimeMethod): (Bindings): (JSC::Bindings::QtRuntimeMethod::connectOrDisconnect): * bridge/qt/qt_runtime.h: (QtRuntimeMethod): Remove unused member variables. Source/WebKit/qt: Fixed some test expectations. * tests/qobjectbridge/tst_qobjectbridge.cpp: (tst_QObjectBridge::objectDeleted): Since runtime methods are real function objects again, we can go back to testing Function.prototype.call, as it was done before r125428. (tst_QObjectBridge::introspectQtMethods_data): Removed tests for the length property. (tst_QObjectBridge::introspectQtMethods): Changed test expectation of the properties of run-time methods back to being non-configurable, as before r125428. LayoutTests: * platform/qt/Skipped: Unskip test that is now passing. Canonical link: https://commits.webkit.org/112383@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
7 changed files
with
105 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters