Title: [113167] trunk/Source/WebCore
Revision
113167
Author
[email protected]
Date
2012-04-04 04:19:40 -0700 (Wed, 04 Apr 2012)

Log Message

Web Inspector: front-end should accept raw web socket address for the remote connection.
https://bugs.webkit.org/show_bug.cgi?id=83134

Reviewed by Yury Semikhatsky.

Migrated from the /devtools/page web socket schema to the generic one where remote target address
can be specified as index.html?ws=localhost:9222/page1. Left the old host/page way for backwards
compatibility.

* inspector/front-end/inspector.js:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (113166 => 113167)


--- trunk/Source/WebCore/ChangeLog	2012-04-04 11:06:03 UTC (rev 113166)
+++ trunk/Source/WebCore/ChangeLog	2012-04-04 11:19:40 UTC (rev 113167)
@@ -1,3 +1,16 @@
+2012-04-04  Pavel Feldman  <[email protected]>
+
+        Web Inspector: front-end should accept raw web socket address for the remote connection.
+        https://bugs.webkit.org/show_bug.cgi?id=83134
+
+        Reviewed by Yury Semikhatsky.
+
+        Migrated from the /devtools/page web socket schema to the generic one where remote target address
+        can be specified as index.html?ws=localhost:9222/page1. Left the old host/page way for backwards
+        compatibility.
+
+        * inspector/front-end/inspector.js:
+
 2012-04-04  Kent Tamura  <[email protected]>
 
         Add localization functions for the calendar picker

Modified: trunk/Source/WebCore/inspector/front-end/inspector.js (113166 => 113167)


--- trunk/Source/WebCore/inspector/front-end/inspector.js	2012-04-04 11:06:03 UTC (rev 113166)
+++ trunk/Source/WebCore/inspector/front-end/inspector.js	2012-04-04 11:19:40 UTC (rev 113167)
@@ -346,10 +346,18 @@
 WebInspector.loaded = function()
 {
     InspectorBackend.loadFromJSONIfNeeded();
-    if ("page" in WebInspector.queryParamsObject) {
+
+    var ws;
+    if ("ws" in WebInspector.queryParamsObject)
+        ws = "ws://" + WebInspector.queryParamsObject.ws;
+    else if ("page" in WebInspector.queryParamsObject) {
         var page = WebInspector.queryParamsObject.page;
         var host = "host" in WebInspector.queryParamsObject ? WebInspector.queryParamsObject.host : window.location.host;
-        WebInspector.socket = new WebSocket("ws://" + host + "/devtools/page/" + page);
+        ws = "ws://" + host + "/devtools/page/" + page;
+    }
+
+    if (ws) {
+        WebInspector.socket = new WebSocket(ws);
         WebInspector.socket._onmessage_ = function(message) { InspectorBackend.dispatch(message.data); }
         WebInspector.socket._onerror_ = function(error) { console.error(error); }
         WebInspector.socket._onopen_ = function() {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to