RESOLVED FIXED 47097
Generate messages sent to the WebProcess class.
https://bugs.webkit.org/show_bug.cgi?id=47097
Summary Generate messages sent to the WebProcess class.
Sam Weinig
Reported 2010-10-04 11:25:46 PDT
Generate messages sent to the WebProcess class.
Attachments
Patch (32.88 KB, patch)
2010-10-04 11:30 PDT, Sam Weinig
aroben: review-
Patch (34.82 KB, patch)
2010-10-04 12:01 PDT, Sam Weinig
aroben: review+
Sam Weinig
Comment 1 2010-10-04 11:30:18 PDT
Early Warning System Bot
Comment 2 2010-10-04 11:39:39 PDT
Adam Roben (:aroben)
Comment 3 2010-10-04 11:42:11 PDT
Comment on attachment 69651 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=69651&action=review > WebKit2/WebKit2.pro:180 > HEADERS += \ > Shared/CoreIPCSupport/DrawingAreaMessageKinds.h \ > Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h \ > Shared/CoreIPCSupport/WebPageProxyMessageKinds.h \ > - Shared/CoreIPCSupport/WebProcessMessageKinds.h \ > Shared/CacheModel.h \ > Shared/DrawingAreaBase.h \ > Shared/ImmutableArray.h \ Seems like you need to add the new generated files. > WebKit2/Platform/CoreIPC/HandleMessage.h:48 > + // NOTE: Return value ignored. > + (object->*function)(firstArgument, secondArgument); > +} Why throw away the return value? Why not return it? > WebKit2/Scripts/webkit2/messages.py:232 > + if type.find("<") != -1: > + headers.update(headers_for_type(type)) > + continue Please use single quotes. Please add tests that show that your new code works. (And make sure you didn't break any existing tests.) > WebKit2/UIProcess/mac/WebProcessProxyMac.mm:42 > + send(Messages::WebProcess::SetupAcceleratedCompositingPort(CoreIPC::MachPort(renderServerPort, MACH_MSG_TYPE_COPY_SEND)), 0); Should be "SetUpAcceleratedCompositingPort", with a capital "U". > WebKit2/WebProcess/WebProcess.cpp:194 > -void WebProcess::setCacheModel(CacheModel cacheModel) > +void WebProcess::setCacheModel(uint32_t cacheModel) > { > - if (!m_hasSetCacheModel || cacheModel != m_cacheModel) { > + if (!m_hasSetCacheModel || static_cast<CacheModel>(cacheModel) != m_cacheModel) { > m_hasSetCacheModel = true; > - m_cacheModel = cacheModel; > - platformSetCacheModel(cacheModel); > + m_cacheModel = static_cast<CacheModel>(cacheModel); > + platformSetCacheModel(static_cast<CacheModel>(cacheModel)); > } > } Doing the cast once and storing the result in a local variable would be nicer. > WebKit2/win/WebKit2.vcproj:766 > > > </File> > <File > - RelativePath="..\Shared\CoreIPCSupport\WebProcessMessageKinds.h" > - > > - </File> > - <File > RelativePath="..\Shared\CoreIPCSupport\WebProcessProxyMessageKinds.h" > > > </File> > Seems like you need to add the new generated files.
Sam Weinig
Comment 4 2010-10-04 12:01:05 PDT
WebKit Review Bot
Comment 5 2010-10-04 12:02:37 PDT
Attachment 69660 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebKit2/Scripts/webkit2/messages.py:230: trailing whitespace [pep8/W291] [5] Total errors found: 1 in 17 files If any of these errors are false positives, please file a bug against check-webkit-style.
Early Warning System Bot
Comment 6 2010-10-04 12:20:56 PDT
Adam Roben (:aroben)
Comment 7 2010-10-04 13:02:46 PDT
Comment on attachment 69660 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=69660&action=review > WebKit2/ChangeLog:13 > + * Scripts/webkit2/messages.py: > + * Scripts/webkit2/messages_unittest.py: > + Make this script work for passing a templated type. It would be nice to add the names of functions you changed in messages.py. > WebKit2/WebProcess/WebProcess.cpp:194 > -void WebProcess::setCacheModel(CacheModel cacheModel) > +void WebProcess::setCacheModel(uint32_t cacheModel) > { > - if (!m_hasSetCacheModel || cacheModel != m_cacheModel) { > + if (!m_hasSetCacheModel || static_cast<CacheModel>(cacheModel) != m_cacheModel) { > m_hasSetCacheModel = true; > - m_cacheModel = cacheModel; > - platformSetCacheModel(cacheModel); > + m_cacheModel = static_cast<CacheModel>(cacheModel); > + platformSetCacheModel(static_cast<CacheModel>(cacheModel)); > } > } I still think a local variable with type CacheModel would be better.
Sam Weinig
Comment 8 2010-10-04 13:07:08 PDT
Landed in r69029.
Csaba Osztrogonác
Comment 9 2010-10-04 15:18:54 PDT
(In reply to comment #8) > Landed in r69029. Hey, you shouldn't have commit it, because Qt EWS bubble is red. It wasn't a fair play ...
Sam Weinig
Comment 10 2010-10-04 15:24:14 PDT
(In reply to comment #9) > (In reply to comment #8) > > Landed in r69029. > > Hey, you shouldn't have commit it, because Qt EWS bubble is red. > It wasn't a fair play ... Sorry, but I couldn't figure out how to make it work on Qt. We have a DerivedSources.make file that the Qt build does not seem to be using. If adding stuff to the project is prohibitively hard, it is likely that things will break.
Csaba Osztrogonác
Comment 11 2010-10-04 16:07:00 PDT
> Sorry, but I couldn't figure out how to make it work on Qt. We have a DerivedSources.make file that the Qt build does not seem to be using. If adding stuff to the project is prohibitively hard, it is likely that things will break. I prefer poking our WebKit2 guys and ask them to fix Qt build system instead of breaking Qt buildbots and EWS. Next time, please cc Zoltan (zoltan@webkit.org), Balazs (kbalazs@webkit.org) and Andras (abecsi@webkit.org), they can help you with fixing Qt-WebKit2 build system. Fix landed in http://trac.webkit.org/changeset/69046
Note You need to log in before you can comment on or make changes to this bug.