RESOLVED FIXED 91511
[Mac] Make WebDataSourcePrivate lighter
https://bugs.webkit.org/show_bug.cgi?id=91511
Summary [Mac] Make WebDataSourcePrivate lighter
Benjamin Poulain
Reported 2012-07-17 10:00:34 PDT
Improving WebPreferencesPrivate initialization had a nice outcome. Should WebDataSourcePrivate follow the same path?
Attachments
Patch (8.72 KB, patch)
2012-07-17 10:24 PDT, Benjamin Poulain
no flags
Patch (10.00 KB, patch)
2012-07-17 15:40 PDT, Benjamin Poulain
no flags
Patch (10.00 KB, patch)
2012-07-17 16:32 PDT, Benjamin Poulain
no flags
Patch (10.07 KB, patch)
2012-07-17 18:41 PDT, Benjamin Poulain
no flags
Patch (16.60 KB, patch)
2012-07-18 16:37 PDT, Benjamin Poulain
andersca: review+
Benjamin Poulain
Comment 1 2012-07-17 10:24:17 PDT
Benjamin Poulain
Comment 2 2012-07-17 15:40:22 PDT
Build Bot
Comment 3 2012-07-17 15:49:30 PDT
Benjamin Poulain
Comment 4 2012-07-17 16:32:03 PDT
Build Bot
Comment 5 2012-07-17 17:00:34 PDT
Benjamin Poulain
Comment 6 2012-07-17 18:41:29 PDT
Benjamin Poulain
Comment 7 2012-07-17 22:47:46 PDT
Comment on attachment 152899 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152899&action=review > Source/WebKit/mac/WebView/WebDataSource.mm:129 > + JSC::initializeThreading(); > + WTF::initializeMainThreadToProcessMainThread(); > + WebCore::RunLoop::initializeMainRunLoop(); > + WebCoreObjCFinalizeOnMainThread(self); Joe: if (self != [XXX class]) return;
Anders Carlsson
Comment 8 2012-07-18 13:43:33 PDT
Comment on attachment 152899 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152899&action=review > Source/WebKit/mac/WebView/WebDataSource.h:40 > +typedef struct WebDataSourcePrivate WebDataSourcePrivate; I think other classes (in other frameworks) just use void * for internal classes. I like that better. > Source/WebKit/mac/WebView/WebDataSource.mm:70 > +struct WebDataSourcePrivate And then you could make this a proper class which is nicer :)
Benjamin Poulain
Comment 9 2012-07-18 16:37:01 PDT
Anders Carlsson
Comment 10 2012-07-18 16:54:29 PDT
Comment on attachment 153139 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=153139&action=review > Source/WebKit/mac/WebView/WebDataSource.mm:93 > +static inline WebDataSourcePrivate* castPrivate(void* privateAttribute) > { We usually call these cast functions "toFoo" so toPrivate(void* ptr) would be better here.
Benjamin Poulain
Comment 11 2012-07-18 18:19:56 PDT
Benjamin Poulain
Comment 12 2012-07-18 22:21:33 PDT
Joseph Pecoraro
Comment 13 2012-08-05 21:18:34 PDT
Comment on attachment 153139 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=153139&action=review > Source/WebKit/mac/WebView/WebDataSource.mm:77 > + WebDataSourcePrivate(PassRefPtr<WebDocumentLoaderMac> loader) > + : loader(loader) > + { > + ASSERT(this->loader); > + } Looks like this missed initializing the BOOL members.
Note You need to log in before you can comment on or make changes to this bug.