UserContentControllerProxy / ContentWorld cleanup Blocking testing for https://bugs.webkit.org/show_bug.cgi?id=206398
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].
<rdar://problem/61992273>