[webkit-dev] Is ActiveDOMObject::scriptExecutionContext virtual or not?
toyoshim at chromium.org
Mon Apr 18 19:30:53 PDT 2011
Hi, webkit guys.
I have a question on ActiveDOMObject::scriptExecutionContext().
Now is was defined as non-virtual function. But currently, half of
its inheritors defined this function as virtual.
In my understanding, this virtual could not work because it's defined
as non-virtual in its super class. Of course if they had its inheritors itself,
it could work under their class context, but it doesn't as ActiveDOMObject.
For example, WebSocket inherits ActiveDOMObject and define
scriptExecutionContext as virtual function. But its implementation is
just calling ActiveDOMObject::scriptExecutionContext and returning
its result. It has no inheritor.
Could I think it's a dead code or never used one?
Does anyone know some historical or technical reason for that?
More information about the webkit-dev