Diff
Modified: trunk/LayoutTests/ChangeLog (133029 => 133030)
--- trunk/LayoutTests/ChangeLog 2012-10-31 15:01:30 UTC (rev 133029)
+++ trunk/LayoutTests/ChangeLog 2012-10-31 15:12:27 UTC (rev 133030)
@@ -1,3 +1,28 @@
+2012-10-31 Yury Semikhatsky <[email protected]>
+
+ Web Inspector: page crash when pausing in dedicated worker
+ https://bugs.webkit.org/show_bug.cgi?id=100837
+
+ Reviewed by Pavel Feldman.
+
+ Test that Debugger.pause works for dedicated workers. The test is skipped
+ on all platforms that use JSC as worker debugging is not supported there
+ yet.
+
+ * http/tests/inspector-protocol/resources/InspectorTest.js:
+ (WebInspector.dispatchMessageFromBackend):
+ * inspector-protocol/debugger-pause-dedicated-worker-expected.txt: Added.
+ * inspector-protocol/debugger-pause-dedicated-worker.html: Added.
+ * inspector-protocol/resources/dedicated-worker.js: Added.
+ (onmessage):
+ (doWork):
+ * platform/efl/TestExpectations:
+ * platform/gtk/TestExpectations:
+ * platform/mac/TestExpectations:
+ * platform/qt/TestExpectations:
+ * platform/win/TestExpectations:
+ * platform/wincairo/TestExpectations:
+
2012-10-31 Zoltan Nyul <[email protected]>
perspective-origin should ignore values with more then two lengths and use the default values
Modified: trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js (133029 => 133030)
--- trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js 2012-10-31 15:01:30 UTC (rev 133029)
+++ trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js 2012-10-31 15:12:27 UTC (rev 133030)
@@ -27,6 +27,7 @@
InspectorTest = {};
InspectorTest._dispatchTable = [];
InspectorTest._requestId = -1;
+InspectorTest.eventHandler = {};
/**
* @param {string} method
@@ -56,6 +57,11 @@
var handler = InspectorTest._dispatchTable[messageId];
if (handler && typeof handler === "function")
handler(messageObject);
+ } else {
+ var eventName = messageObject["method"];
+ var eventHandler = InspectorTest.eventHandler[eventName];
+ if (eventHandler)
+ eventHandler(messageObject);
}
}
Added: trunk/LayoutTests/inspector-protocol/debugger-pause-dedicated-worker-expected.txt (0 => 133030)
--- trunk/LayoutTests/inspector-protocol/debugger-pause-dedicated-worker-expected.txt (rev 0)
+++ trunk/LayoutTests/inspector-protocol/debugger-pause-dedicated-worker-expected.txt 2012-10-31 15:12:27 UTC (rev 133030)
@@ -0,0 +1,6 @@
+Started worker
+Worker created
+didEnableWorkerDebugging
+didConnectToWorker
+SUCCESS: Worker paused
+
Property changes on: trunk/LayoutTests/inspector-protocol/debugger-pause-dedicated-worker-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/inspector-protocol/debugger-pause-dedicated-worker.html (0 => 133030)
--- trunk/LayoutTests/inspector-protocol/debugger-pause-dedicated-worker.html (rev 0)
+++ trunk/LayoutTests/inspector-protocol/debugger-pause-dedicated-worker.html 2012-10-31 15:12:27 UTC (rev 133030)
@@ -0,0 +1,76 @@
+<html>
+<head>
+<script type="text/_javascript_" src=""
+<script>
+
+
+var worker;
+
+function startWorkerAndRunTest()
+{
+ worker = new Worker("resources/dedicated-worker.js");
+ worker._onmessage_ = function(event) { };
+ worker.postMessage(1);
+ log("Started worker");
+ runTest();
+}
+
+
+function test()
+{
+
+ var workerId;
+ var workerRequestId = 1;
+ function sendCommandToWorker(method, params)
+ {
+ InspectorTest.sendCommand("Worker.sendMessageToWorker",
+ {
+ "workerId": workerId,
+ "message": { "method": method,
+ "params": params,
+ "id": workerRequestId++ }
+ });
+ }
+
+ function didEnableWorkerDebugging(messageObject)
+ {
+ if ("error" in messageObject) {
+ InspectorTest.log("FAIL: Couldn't enable worker debugger: " + messageObject.error.message);
+ InspectorTest.completeTest();
+ return;
+ }
+ InspectorTest.log("didEnableWorkerDebugging");
+ }
+ InspectorTest.sendCommand("Worker.enable", {}, didEnableWorkerDebugging);
+
+
+ InspectorTest.eventHandler["Worker.workerCreated"] = function(messageObject)
+ {
+ workerId = messageObject["params"]["workerId"];
+ InspectorTest.log("Worker created");
+ InspectorTest.sendCommand("Worker.connectToWorker", { "workerId": workerId }, didConnectToWorker);
+
+ function didConnectToWorker(messageObject)
+ {
+ InspectorTest.log("didConnectToWorker");
+ sendCommandToWorker("Debugger.enable", {});
+ sendCommandToWorker("Debugger.pause", {});
+ }
+ }
+
+ InspectorTest.eventHandler["Worker.dispatchMessageFromWorker"] = function(messageObject)
+ {
+ var message = messageObject["params"]["message"];
+ if (message["method"] === "Debugger.paused") {
+ InspectorTest.log("SUCCESS: Worker paused");
+ sendCommandToWorker("Debugger.disable", {});
+ InspectorTest.completeTest();
+ }
+ }
+
+}
+</script>
+</head>
+<body _onLoad_="startWorkerAndRunTest();">
+</body>
+</html>
Property changes on: trunk/LayoutTests/inspector-protocol/debugger-pause-dedicated-worker.html
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/inspector-protocol/resources/dedicated-worker.js (0 => 133030)
--- trunk/LayoutTests/inspector-protocol/resources/dedicated-worker.js (rev 0)
+++ trunk/LayoutTests/inspector-protocol/resources/dedicated-worker.js 2012-10-31 15:12:27 UTC (rev 133030)
@@ -0,0 +1,9 @@
+var message_id = 1;
+_onmessage_ = function(event) {
+ doWork();
+};
+
+function doWork() {
+ postMessage("Message #" + message_id++);
+ setTimeout(doWork, 50);
+}
Property changes on: trunk/LayoutTests/inspector-protocol/resources/dedicated-worker.js
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/LayoutTests/platform/efl/TestExpectations (133029 => 133030)
--- trunk/LayoutTests/platform/efl/TestExpectations 2012-10-31 15:01:30 UTC (rev 133029)
+++ trunk/LayoutTests/platform/efl/TestExpectations 2012-10-31 15:12:27 UTC (rev 133030)
@@ -1669,3 +1669,5 @@
# It may even be the case that the tests themselves are wrong.
webkit.org/b/100857 ietestcenter/css3/text/textshadow-005.htm [ ImageOnlyFailure Missing ]
webkit.org/b/100855 ietestcenter/css3/text/textshadow-008.htm [ ImageOnlyFailure Missing ]
+
+webkit.org/b/100846 inspector-protocol/debugger-pause-dedicated-worker.html [ Skip ]
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (133029 => 133030)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2012-10-31 15:01:30 UTC (rev 133029)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2012-10-31 15:12:27 UTC (rev 133030)
@@ -1426,6 +1426,8 @@
webkit.org/b/98718 svg/animations/animate-css-xml-attributeType.html [ Failure ]
+webkit.org/b/100846 inspector-protocol/debugger-pause-dedicated-worker.html [ Skip ]
+
webkit.org/b/95299 fast/images/exif-orientation.html [ Failure ]
#////////////////////////////////////////////////////////////////////////////////////////
Modified: trunk/LayoutTests/platform/mac/TestExpectations (133029 => 133030)
--- trunk/LayoutTests/platform/mac/TestExpectations 2012-10-31 15:01:30 UTC (rev 133029)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2012-10-31 15:12:27 UTC (rev 133030)
@@ -1354,3 +1354,5 @@
# TileCache tests that don't apply to WK1 (they are re-enabled via the WK2 TestExpectations file)
platform/mac/tiled-drawing/ [ Skip ]
+
+webkit.org/b/100846 inspector-protocol/debugger-pause-dedicated-worker.html [ Skip ]
Modified: trunk/LayoutTests/platform/qt/TestExpectations (133029 => 133030)
--- trunk/LayoutTests/platform/qt/TestExpectations 2012-10-31 15:01:30 UTC (rev 133029)
+++ trunk/LayoutTests/platform/qt/TestExpectations 2012-10-31 15:12:27 UTC (rev 133030)
@@ -2506,3 +2506,5 @@
# REGRESSION(r132757): It made 2 jquery tests assert
webkit.org/b/100636 jquery/manipulation.html
webkit.org/b/100636 jquery/traversing.html
+
+webkit.org/b/100846 inspector-protocol/debugger-pause-dedicated-worker.html [ Skip ]
Modified: trunk/LayoutTests/platform/win/TestExpectations (133029 => 133030)
--- trunk/LayoutTests/platform/win/TestExpectations 2012-10-31 15:01:30 UTC (rev 133029)
+++ trunk/LayoutTests/platform/win/TestExpectations 2012-10-31 15:12:27 UTC (rev 133030)
@@ -2403,3 +2403,5 @@
# Test added in r132901 is for chromium only
fast/images/exif-orientation-image-document.html
+
+webkit.org/b/100846 inspector-protocol/debugger-pause-dedicated-worker.html [ Skip ]
Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (133029 => 133030)
--- trunk/LayoutTests/platform/wincairo/TestExpectations 2012-10-31 15:01:30 UTC (rev 133029)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations 2012-10-31 15:12:27 UTC (rev 133030)
@@ -2810,3 +2810,5 @@
# css3-conditionals support is not yet enabled.
webkit.org/b/86146 css3/supports.html
+
+webkit.org/b/100846 inspector-protocol/debugger-pause-dedicated-worker.html [ Skip ]
Modified: trunk/Source/WebCore/ChangeLog (133029 => 133030)
--- trunk/Source/WebCore/ChangeLog 2012-10-31 15:01:30 UTC (rev 133029)
+++ trunk/Source/WebCore/ChangeLog 2012-10-31 15:12:27 UTC (rev 133030)
@@ -1,3 +1,17 @@
+2012-10-31 Yury Semikhatsky <[email protected]>
+
+ Web Inspector: page crash when pausing in dedicated worker
+ https://bugs.webkit.org/show_bug.cgi?id=100837
+
+ Reviewed by Pavel Feldman.
+
+ Pass debugger agent to InjectedScriptHost::init in case of workers.
+
+ Test: inspector-protocol/debugger-pause-dedicated-worker.html
+
+ * inspector/WorkerInspectorController.cpp:
+ (WebCore::WorkerInspectorController::WorkerInspectorController):
+
2012-10-31 Zoltan Nyul <[email protected]>
perspective-origin should ignore values with more then two lengths and use the default values
Modified: trunk/Source/WebCore/inspector/WorkerInspectorController.cpp (133029 => 133030)
--- trunk/Source/WebCore/inspector/WorkerInspectorController.cpp 2012-10-31 15:01:30 UTC (rev 133029)
+++ trunk/Source/WebCore/inspector/WorkerInspectorController.cpp 2012-10-31 15:12:27 UTC (rev 133030)
@@ -114,7 +114,9 @@
#endif
, 0
, 0
- , 0
+#if ENABLE(_javascript__DEBUGGER)
+ , m_debuggerAgent.get()
+#endif
);
#if ENABLE(_javascript__DEBUGGER)