[Qt] Use QEvent for dispatchFunctionsFromMainThread()
Created attachment 115767 [details] Patch
Created attachment 115795 [details] Patch
Comment on attachment 115795 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=115795&action=review r=me. QMetaObject::invokeMethod is implemented using posted events behind the scenes and this patch removes the unnecessary layer of indirection (which does things like setting the current QObject::sender, which we don't need). It would be nice if you could fix the nitpicks before landing :) > Source/JavaScriptCore/wtf/qt/MainThreadQt.cpp:36 > +#include <QtCore/QEvent> In general we don't need #include <ModuelName/ClassName> includes and we should just use #include <classname> or #include <header.h>. The only place where we _need_ to use this pattern is in header files used for the public API in Qt (ask me on IRC if you're curious :) > Source/JavaScriptCore/wtf/qt/MainThreadQt.cpp:52 > + s_mainThreadInvokerEventType = QEvent::registerEventType(); Nitpick: Technically it's QCoreEvent::registerEventType ;) > Source/JavaScriptCore/wtf/qt/MainThreadQt.cpp:58 > + if (e->type() == s_mainThreadInvokerEventType) > + dispatchFunctionsFromMainThread(); Nitpick: Missing {} with "return" in the body? (no need to call QObject::event for _our_ event type)
Created attachment 116441 [details] Patch
Comment on attachment 115795 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=115795&action=review >> Source/JavaScriptCore/wtf/qt/MainThreadQt.cpp:36 >> +#include <QtCore/QEvent> > > In general we don't need #include <ModuelName/ClassName> includes and we should just use #include <classname> or #include <header.h>. > The only place where we _need_ to use this pattern is in header files used for the public API in Qt (ask me on IRC if you're curious :) Copy&Paste ;-) >> Source/JavaScriptCore/wtf/qt/MainThreadQt.cpp:52 >> + s_mainThreadInvokerEventType = QEvent::registerEventType(); > > Nitpick: Technically it's QCoreEvent::registerEventType ;) I don't think so! ;-) It's defined in qcoreevent.h, but the class is still QEvent!
Comment on attachment 116441 [details] Patch Clearing flags on attachment: 116441 Committed r101131: <http://trac.webkit.org/changeset/101131>
All reviewed patches have been landed. Closing bug.
It broke _all_ http/tests/appcache test with "FAIL: Timed out waiting for notifyDone to be called" timeout. Could you check it please as soon as possible? (Now all of our tester bot is broken because of this regression.)
Fix landed in http://trac.webkit.org/changeset/101134