It was suggested I bring this to webkit-dev.

There was some recent work to move the many parameters passed to the Page 
constructor into a single PageClients structure. The current assumption is that 
if a feature is enabled (at runtime or compile time) then Page will always get 
a non-null client for that feature.

This allows the Page constructor to have something like this:

, m_deviceMotionController(RuntimeEnabledFeatures::deviceMotionEnabled() ? n
ew DeviceMotionController(pageClients.deviceMotionClient) : 0)

and DeviceMotionController's constructor has an ASSERT(m_client).

The problem is that not every Page needs every client. SVGImage, for example, 
creates a Page without all clients. Some platform ports branch around this 
code. The current solution is to create EmptyClient implementations.

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

Related discussion: 
https://lists.webkit.org/pipermail/webkit-dev/2010-July/013597.html

Wouldn't it be easier to allow null clients than to have these EmptyClient 
implementations? 

Dean

_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to