Bug 33393 - Remove unnecessary #include in FastMalloc.cpp
Summary: Remove unnecessary #include in FastMalloc.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-08 11:53 PST by Yong Li
Modified: 2010-01-08 14:09 PST (History)
1 user (show)

See Also:


Attachments
the patch (948 bytes, patch)
2010-01-08 12:01 PST, Yong Li
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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