Bug 37399 - Remove use of STL data structures from CoreIPC code
Summary: Remove use of STL data structures from CoreIPC code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-10 19:52 PDT by Sam Weinig
Modified: 2010-04-11 13:23 PDT (History)
1 user (show)

See Also:


Attachments
Patch (18.30 KB, patch)
2010-04-10 19:55 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Updated patch (19.59 KB, patch)
2010-04-10 22:15 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Take 3 (19.51 KB, patch)
2010-04-11 13:14 PDT, Sam Weinig
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2010-04-10 19:52:07 PDT
No reason to keep these STL.
Comment 1 Sam Weinig 2010-04-10 19:55:25 PDT
Created attachment 53066 [details]
Patch
Comment 2 Sam Weinig 2010-04-10 19:56:33 PDT
Please ignore the NotImplemented.h bits. That should not be there.
Comment 3 Sam Weinig 2010-04-10 22:15:31 PDT
Created attachment 53074 [details]
Updated patch

This updates the patch to use a Vector instead of a Deque in Connection as per Anders' request. It also changes some uses of malloc/free with fastMalloc/fastFree.
Comment 4 Darin Adler 2010-04-10 23:35:11 PDT
Comment on attachment 53074 [details]
Updated patch

> -    queue<WorkItem*> workItemQueue;
> +    Deque<WorkItem*> workItemQueue;

You said this updates the patch to use a Vector instead of a Deque. But this is a Deque.
Comment 5 Sam Weinig 2010-04-11 09:59:07 PDT
(In reply to comment #4)
> (From update of attachment 53074 [details])
> > -    queue<WorkItem*> workItemQueue;
> > +    Deque<WorkItem*> workItemQueue;
> 
> You said this updates the patch to use a Vector instead of a Deque. But this is
> a Deque.

Only in Connection for the incomming/outgoing message queues.
Comment 6 Anders Carlsson 2010-04-11 13:07:59 PDT
Comment on attachment 53074 [details]
Updated patch

> Index: WebKit2/Platform/RunLoop.h
> ===================================================================
> --- WebKit2/Platform/RunLoop.h	(revision 57421)
> +++ WebKit2/Platform/RunLoop.h	(working copy)
> @@ -27,7 +27,7 @@
>  #define RunLoop_h
>  
>  #include <memory>
> -#include <queue>
> +#include <wtf/Deque.h>
>  #include <wtf/HashMap.h>
>  #include <wtf/Threading.h>
>  
> @@ -99,7 +99,7 @@ private:
>      void wakeUp();
>  
>      Mutex m_workItemQueueLock;
> -    std::queue<WorkItem*> m_workItemQueue;
> +    Deque<WorkItem*> m_workItemQueue;

This can actually be a Vector.
Comment 7 Sam Weinig 2010-04-11 13:14:20 PDT
Created attachment 53099 [details]
Take 3
Comment 8 Anders Carlsson 2010-04-11 13:17:33 PDT
Comment on attachment 53099 [details]
Take 3

Great, r=me!
Comment 9 Sam Weinig 2010-04-11 13:23:55 PDT
Fixed in r57454.