Bug 78576 - [WebSocket] WebSocketChannel minor refactoring for code manageability
Summary: [WebSocket] WebSocketChannel minor refactoring for code manageability
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Takashi Toyoshima
URL:
Keywords:
Depends on:
Blocks: 78459
  Show dependency treegraph
 
Reported: 2012-02-13 22:41 PST by Takashi Toyoshima
Modified: 2012-02-14 22:39 PST (History)
5 users (show)

See Also:


Attachments
Patch (14.65 KB, patch)
2012-02-13 22:52 PST, Takashi Toyoshima
no flags Details | Formatted Diff | Diff
Patch (15.06 KB, patch)
2012-02-13 23:58 PST, Takashi Toyoshima
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Takashi Toyoshima 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.
Comment 1 Takashi Toyoshima 2012-02-13 22:52:45 PST
Created attachment 126912 [details]
Patch
Comment 2 Takashi Toyoshima 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.
Comment 3 Early Warning System Bot 2012-02-13 23:29:13 PST
Comment on attachment 126912 [details]
Patch

Attachment 126912 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/11518157
Comment 4 Yuta Kitamura 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.
Comment 5 Takashi Toyoshima 2012-02-13 23:58:16 PST
Created attachment 126920 [details]
Patch
Comment 6 Takashi Toyoshima 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.
Comment 7 Kent Tamura 2012-02-14 15:53:42 PST
Comment on attachment 126920 [details]
Patch

ok
Comment 8 WebKit Review Bot 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>
Comment 9 WebKit Review Bot 2012-02-14 22:39:56 PST
All reviewed patches have been landed.  Closing bug.