| Summary: | ScriptExecutionContext tasks, cross-thread data and copiers should use std::unique_ptr | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | BJ Burg <bburg> | ||||||
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | RESOLVED WONTFIX | ||||||||
| Severity: | Normal | CC: | andersca, darin, joepeck, zan | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 128007 | ||||||||
| Attachments: |
|
||||||||
|
Description
BJ Burg
2014-01-20 19:32:09 PST
Created attachment 221781 [details]
WIP - needs rebase, CrossThreadTask broke
Created attachment 221797 [details]
mostly done, one fail yet
Currently stuck on what to do about WorkerThreadableWebSocketChannel::Peer. The lifetime management is pretty hacky and relied on PassOwnPtr destructors, and blindly converting to unique_ptr won't work because the copy constructor is being called somehow. I'd appreciate any help. The relevant error: /Users/bburg/repos/webkit_/OpenSource/Source/WebCore/dom/CrossThreadTask.h /Users/bburg/repos/webkit_/OpenSource/Source/WebCore/dom/CrossThreadTask.h:341:37: Call to implicitly-deleted copy constructor of 'std::unique_ptr<Peer>' /Users/bburg/repos/webkit_/OpenSource/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp:38:10: In file included from /Users/bburg/repos/webkit_/OpenSource/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp:38: /Users/bburg/repos/webkit_/OpenSource/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp:372:45: In instantiation of function template specialization 'WebCore::createCallbackTask<std::__1::unique_ptr<WebCore::WorkerThreadableWebSocketChannel::Peer, std::__1::default_delete<WebCore::WorkerThreadableWebSocketChannel::Peer> >, std::__1::unique_ptr<WebCore::WorkerThreadableWebSocketChannel::Peer, std::__1::default_delete<WebCore::WorkerThreadableWebSocketChannel::Peer> > >' requested here /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/memory:2572:31: Copy constructor is implicitly deleted because 'unique_ptr<WebCore::WorkerThreadableWebSocketChannel::Peer, std::__1::default_delete<WebCore::WorkerThreadableWebSocketChannel::Peer> >' has a user-declared move constructor /Users/bburg/repos/webkit_/OpenSource/Source/WebCore/platform/CrossThreadCopier.h:116:59: Passing argument to parameter 'uniquePtr' here unassigning, I think many of these have been fixed already in the meantime by :zdobersek Lets not keep this bug open because, as Brian said, many of these are done already. We will come back to any of these that remain as we hit the final stretch of getting rid of OwnPtr. |