Currently, WorkerThread::WorkerThread copies some Strings and a KURL for use on the worker thread. After passing them off to other objects in side of the worker thread (where they get ref/deref'ed), its destructor runs on the main thread and does a deref on these string there. This should mostly work, but there is a potential for some subtle race conditions to occur, so it would be good to clean them up on the WorkerThread.
Created attachment 26548 [details] Patch for bug.
Created attachment 26561 [details] Changed to a static create method (instead of using new directly) and added a comment.
Created attachment 26562 [details] Diff form last version of the patch: I noticed a bad indentation in one place and fixed it.
Comment on attachment 26562 [details] Diff form last version of the patch: I noticed a bad indentation in one place and fixed it. r=me A general comment, not for this patch: the prevalent style is to have "using namespace std", and avoid explicit namespace qualifiers.
Committed revision 39740.