Summary: | Fix WebUserContentControllerProxy vs ContentWorld lifetime | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brady Eidson <beidson> | ||||||
Component: | WebKit Misc. | Assignee: | Brady Eidson <beidson> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | achristensen, aestes, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 206398 | ||||||||
Attachments: |
|
Description
Brady Eidson
2020-04-18 15:03:55 PDT
Renaming - I realized there is an actual bug this refactoring is fixing, and wrote an API test for it "Fix WebUserContentControllerProxy vs ContentWorld lifetime" Created attachment 396868 [details]
Patch
Comment on attachment 396868 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=396868&action=review > Source/WebKit/UIProcess/API/APIContentWorld.cpp:38 > + static HashMap<WTF::String, ContentWorld*>* sharedMap = new HashMap<WTF::String, ContentWorld*>; NeverDestroyed<HashMap<...>> to be consistent with below. > Source/WebKit/UIProcess/API/APIContentWorld.h:61 > + HashSet<WebKit::WebUserContentControllerProxy*> m_associatedContentControllerProxies; Could we use WeakPtr here instead of storing raw pointers? (In reply to Alex Christensen from comment #3) > Comment on attachment 396868 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=396868&action=review > > > Source/WebKit/UIProcess/API/APIContentWorld.cpp:38 > > + static HashMap<WTF::String, ContentWorld*>* sharedMap = new HashMap<WTF::String, ContentWorld*>; > > NeverDestroyed<HashMap<...>> to be consistent with below. Fixed > > Source/WebKit/UIProcess/API/APIContentWorld.h:61 > > + HashSet<WebKit::WebUserContentControllerProxy*> m_associatedContentControllerProxies; > > Could we use WeakPtr here instead of storing raw pointers? I'm wondering what the ramifications are of making an API::Object have WeakPtrs. I'm going to punt for now. Created attachment 396883 [details]
Patch for landing
Committed r260330: <https://trac.webkit.org/changeset/260330> All reviewed patches have been landed. Closing bug and clearing flags on attachment 396883 [details]. |