Title: [138163] trunk/Source/WebCore
Revision
138163
Author
commit-qu...@webkit.org
Date
2012-12-19 07:43:16 -0800 (Wed, 19 Dec 2012)

Log Message

Web Inspector: Use Document* as argument in WebSocket Instrumentation.
https://bugs.webkit.org/show_bug.cgi?id=105279.

Patch by Pan Deng <pan.d...@intel.com> on 2012-12-19
Reviewed by Pavel Feldman.

Some WebSocket instrumentation fuctions adopted ScriptExecutionContext* as argument, it is not clear that
their clients and implementations are all using Document*. This patch adopt Document* as argument, and
Document* could supply more information in future.

No functionality changed, no new tests.

* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didCreateWebSocket):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorInstrumentation::didCloseWebSocket):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (138162 => 138163)


--- trunk/Source/WebCore/ChangeLog	2012-12-19 15:34:36 UTC (rev 138162)
+++ trunk/Source/WebCore/ChangeLog	2012-12-19 15:43:16 UTC (rev 138163)
@@ -1,3 +1,23 @@
+2012-12-19  Pan Deng  <pan.d...@intel.com>
+
+        Web Inspector: Use Document* as argument in WebSocket Instrumentation.
+        https://bugs.webkit.org/show_bug.cgi?id=105279.
+
+        Reviewed by Pavel Feldman.
+
+        Some WebSocket instrumentation fuctions adopted ScriptExecutionContext* as argument, it is not clear that
+        their clients and implementations are all using Document*. This patch adopt Document* as argument, and 
+        Document* could supply more information in future.
+
+        No functionality changed, no new tests.
+
+        * inspector/InspectorInstrumentation.h:
+        (InspectorInstrumentation):
+        (WebCore::InspectorInstrumentation::didCreateWebSocket):
+        (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
+        (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
+        (WebCore::InspectorInstrumentation::didCloseWebSocket):
+
 2012-12-19  Tim Volodine  <timvolod...@chromium.org>
 
         Text Autosizing: Work out what to do about form controls

Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (138162 => 138163)


--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h	2012-12-19 15:34:36 UTC (rev 138162)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h	2012-12-19 15:43:16 UTC (rev 138163)
@@ -240,10 +240,10 @@
 #endif
 
 #if ENABLE(WEB_SOCKETS)
-    static void didCreateWebSocket(ScriptExecutionContext*, unsigned long identifier, const KURL& requestURL, const KURL& documentURL);
-    static void willSendWebSocketHandshakeRequest(ScriptExecutionContext*, unsigned long identifier, const WebSocketHandshakeRequest&);
-    static void didReceiveWebSocketHandshakeResponse(ScriptExecutionContext*, unsigned long identifier, const WebSocketHandshakeResponse&);
-    static void didCloseWebSocket(ScriptExecutionContext*, unsigned long identifier);
+    static void didCreateWebSocket(Document*, unsigned long identifier, const KURL& requestURL, const KURL& documentURL);
+    static void willSendWebSocketHandshakeRequest(Document*, unsigned long identifier, const WebSocketHandshakeRequest&);
+    static void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifier, const WebSocketHandshakeResponse&);
+    static void didCloseWebSocket(Document*, unsigned long identifier);
     static void didReceiveWebSocketFrame(Document*, unsigned long identifier, const WebSocketFrame&);
     static void didSendWebSocketFrame(Document*, unsigned long identifier, const WebSocketFrame&);
     static void didReceiveWebSocketFrameError(Document*, unsigned long identifier, const String& errorMessage);
@@ -1759,50 +1759,50 @@
 
 
 #if ENABLE(WEB_SOCKETS)
-inline void InspectorInstrumentation::didCreateWebSocket(ScriptExecutionContext* context, unsigned long identifier, const KURL& requestURL, const KURL& documentURL)
+inline void InspectorInstrumentation::didCreateWebSocket(Document* document, unsigned long identifier, const KURL& requestURL, const KURL& documentURL)
 {
 #if ENABLE(INSPECTOR)
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
         didCreateWebSocketImpl(instrumentingAgents, identifier, requestURL, documentURL);
 #else
-    UNUSED_PARAM(context);
+    UNUSED_PARAM(document);
     UNUSED_PARAM(identifier);
     UNUSED_PARAM(requestURL);
     UNUSED_PARAM(documentURL);
 #endif
 }
 
-inline void InspectorInstrumentation::willSendWebSocketHandshakeRequest(ScriptExecutionContext* context, unsigned long identifier, const WebSocketHandshakeRequest& request)
+inline void InspectorInstrumentation::willSendWebSocketHandshakeRequest(Document* document, unsigned long identifier, const WebSocketHandshakeRequest& request)
 {
 #if ENABLE(INSPECTOR)
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
         willSendWebSocketHandshakeRequestImpl(instrumentingAgents, identifier, request);
 #else
-    UNUSED_PARAM(context);
+    UNUSED_PARAM(document);
     UNUSED_PARAM(identifier);
     UNUSED_PARAM(request);
 #endif
 }
 
-inline void InspectorInstrumentation::didReceiveWebSocketHandshakeResponse(ScriptExecutionContext* context, unsigned long identifier, const WebSocketHandshakeResponse& response)
+inline void InspectorInstrumentation::didReceiveWebSocketHandshakeResponse(Document* document, unsigned long identifier, const WebSocketHandshakeResponse& response)
 {
 #if ENABLE(INSPECTOR)
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
         didReceiveWebSocketHandshakeResponseImpl(instrumentingAgents, identifier, response);
 #else
-    UNUSED_PARAM(context);
+    UNUSED_PARAM(document);
     UNUSED_PARAM(identifier);
     UNUSED_PARAM(response);
 #endif
 }
 
-inline void InspectorInstrumentation::didCloseWebSocket(ScriptExecutionContext* context, unsigned long identifier)
+inline void InspectorInstrumentation::didCloseWebSocket(Document* document, unsigned long identifier)
 {
 #if ENABLE(INSPECTOR)
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
         didCloseWebSocketImpl(instrumentingAgents, identifier);
 #else
-    UNUSED_PARAM(context);
+    UNUSED_PARAM(document);
     UNUSED_PARAM(identifier);
 #endif
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to