25.Classes named xxxClient on WebKit - WebKit porting to Mona OS

We see many classes named xxxClient on WebKit. And also we have to implement them.
For example we should implement following classes.

  • ChromeClient
  • ContextMenuClient
  • CookieJarClient
  • DragClient
  • EditorClient
  • FrameLoaderClient

Since they have many many methods to implement, I don't want to write them. But after reading the souce code, found that the methods are some kind of hook points or event handlers. If we are not interested in the events, we can make the methods just empty!.

After implemented the classes above, following assertion was shown.

m_refCount > 0
wtf/RefCounted.h(126) : bool WTF::RefCountedBase::derefBase()

I know this is a problem on reference counting. But I have no idea what is wrong. I never used reference counted classes directory.