Hi, guys. I understand. WebSocket also inherits EventTarget, and scriptExecutionContext is defined as virtual in EventTarget.
Sorry for bothering you. Thanks, On Tue, Apr 19, 2011 at 11:30 AM, Takashi Toyoshima <[email protected]> wrote: > 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? > > Thanks, > _______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

