Bug 33393

Summary: Remove unnecessary #include in FastMalloc.cpp
Product: WebKit Reporter: Yong Li <yong.li.webkit>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch darin: review+

Description Yong Li 2010-01-08 11:53:32 PST
#if FORCE_SYSTEM_MALLOC

#include <stdlib.h>
#if !OS(WINDOWS)
    #include <pthread.h>
#else
    #include "windows.h"
#endif

Not sure if <stdlib.h> is needed, but <pthread.h> or "windows.h" is definitely unnecessary.
Comment 1 Yong Li 2010-01-08 12:01:40 PST
Created attachment 46150 [details]
the patch
Comment 2 WebKit Review Bot 2010-01-08 12:05:41 PST
style-queue ran check-webkit-style on attachment 46150 [details] without any errors.
Comment 3 Eric Seidel (no email) 2010-01-08 12:37:39 PST
Comment on attachment 46150 [details]
the patch

OK.  Which platforms use FORCE_SYSTEM_MALLOC at the moment?
Comment 4 Darin Adler 2010-01-08 13:38:37 PST
Comment on attachment 46150 [details]
the patch

It's clear that the <stdlib.h> include is not needed because FastMalloc.h includes it. There is no use of pthread down here and there is an include of pthread.h above for the case where we need it. But how did you determine the windows.h include was not needed? I'll take your word for it.
Comment 5 Yong Li 2010-01-08 13:47:28 PST
(In reply to comment #4)
> (From update of attachment 46150 [details])
> It's clear that the <stdlib.h> include is not needed because FastMalloc.h
> includes it. There is no use of pthread down here and there is an include of
> pthread.h above for the case where we need it. But how did you determine the
> windows.h include was not needed? I'll take your word for it.

I cannot see any #if OS(WINOS) or something similar inside #ifdef FORCE_SYSTEM_MALLOC block. Also, I successfully made FastMalloc build for win32 with forcing FORCE_SYSTEM_MALLOC=1 :) Will commit it soon and monitor the buildbots.
Comment 6 Yong Li 2010-01-08 14:09:50 PST
landed @ r53008

bug closed