Currently, WebSocketChannel hold ScriptExecutionContext as m_context. But, in many situation, we assume it must be a inheritance of Document and use static cast. Actually, it is true for now, but could be dangerous against future code change. This refactoring make that WebSocketChannel hold it as Document* m_document. It reduces static cast chances.
Created attachment 126912 [details] Patch
This is the refactoring Kent-san suggest in review for 78460. That change itself contains wrong direction, but this refactoring could be independent from that, and looks reasonable.
Comment on attachment 126912 [details] Patch Attachment 126912 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/11518157
Comment on attachment 126912 [details] Patch Seems fine. [Note: I don't have r+ privilege.] However, some bots look unhappy with your patch, so please investigate it. I think you just need some more #includes.
Created attachment 126920 [details] Patch
I hope the second one fix the compilation issue. I just add #include "Document.h" for static_cast<Document*> in two source files.
Comment on attachment 126920 [details] Patch ok
Comment on attachment 126920 [details] Patch Clearing flags on attachment: 126920 Committed r107780: <http://trac.webkit.org/changeset/107780>
All reviewed patches have been landed. Closing bug.