Bug 78576

Summary: [WebSocket] WebSocketChannel minor refactoring for code manageability
Product: WebKit Reporter: Takashi Toyoshima <toyoshim>
Component: WebCore Misc.Assignee: Takashi Toyoshima <toyoshim>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bashi, tkent, webkit.review.bot, yutak
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 78459    
Attachments:
Description Flags
Patch
none
Patch none

Takashi Toyoshima
Reported 2012-02-13 22:41:15 PST
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.
Attachments
Patch (14.65 KB, patch)
2012-02-13 22:52 PST, Takashi Toyoshima
no flags
Patch (15.06 KB, patch)
2012-02-13 23:58 PST, Takashi Toyoshima
no flags
Takashi Toyoshima
Comment 1 2012-02-13 22:52:45 PST
Takashi Toyoshima
Comment 2 2012-02-13 22:56:00 PST
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.
Early Warning System Bot
Comment 3 2012-02-13 23:29:13 PST
Yuta Kitamura
Comment 4 2012-02-13 23:54:21 PST
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.
Takashi Toyoshima
Comment 5 2012-02-13 23:58:16 PST
Takashi Toyoshima
Comment 6 2012-02-14 00:05:34 PST
I hope the second one fix the compilation issue. I just add #include "Document.h" for static_cast<Document*> in two source files.
Kent Tamura
Comment 7 2012-02-14 15:53:42 PST
Comment on attachment 126920 [details] Patch ok
WebKit Review Bot
Comment 8 2012-02-14 22:39:51 PST
Comment on attachment 126920 [details] Patch Clearing flags on attachment: 126920 Committed r107780: <http://trac.webkit.org/changeset/107780>
WebKit Review Bot
Comment 9 2012-02-14 22:39:56 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.