[Webkit-unassigned] [Bug 56507] DeviceOrientationClient leak

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 17 04:36:17 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56507





--- Comment #2 from Steve Block <steveblock at google.com>  2011-03-17 04:36:17 PST ---
> I'm just eyeballing this but I think there is a leak if this feature is
> disabled at runtime. The DeviceOrientationClient would be created:
> 
>   #if ENABLE(DEVICE_ORIENTATION)
>       pageClients.deviceOrientationClient = new WebDeviceOrientationClient(self);
>   #endif
>       _private->page = new Page(pageClients); 
> 
> But no Controller would adopt it, and therefore no-one ever tells
> this DeviceOrientationClient instance to delete itself.
I think you're right that there's a potential for a leak given the Mac client ownership model. However, does Mac use RuntimeEnabledFeatures?

> This seems messy. It would be much nicer to RefCount the DeviceOrientationClient
> like other PageClients.
Is this correct? I don't think that other clients are ref-counted, at least not by the Page or controller. My understanding is that clients are owned and managed by the emebedder and that the controller holds only a weak pointer.

> However, it seems to want to request a
> WebDeviceOrientationProvider from a WebView.
> 
> Can these objects be made into a singleton?
I think it would be possible to use a single client for all pages, and handle the multiplexing manually, but this doesn't match how clients are normally used.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list