Bug 66223

Summary: [Qt] inspector/debugger/open-close-open.html fails on Qt port
Product: WebKit Reporter: Zoltan Herczeg <zherczeg>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: loislo, pfeldman
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
fix pfeldman: review-

Zoltan Herczeg
Reported 2011-08-15 07:06:39 PDT
Not sure this is platform specific, but it surely fails on Qt. InspectorTest.evaluateInPage = function(code, callback) { callback = InspectorTest.safeWrap(callback); function mycallback(error, result, wasThrown) { if (!error) callback(WebInspector.RemoteObject.fromPayload(result), wasThrown); } RuntimeAgent.evaluate(code, "console", false, mycallback); } RuntimeAgent.evaluate does not do anything when it runs the second time (at least mycallback is not called). Could someone tell me which function runs for RuntimeAgent.evaluate? Something is bound to this property by utilities.js, but I don't know where it came from.
Attachments
fix (2.40 KB, patch)
2011-08-19 01:28 PDT, Zoltan Herczeg
pfeldman: review-
Pavel Feldman
Comment 1 2011-08-15 07:24:58 PDT
(In reply to comment #0) How is this related to zero-path-square-cap-rendering2.svg? RuntimeAgent issues a command to the inspected page via InspectorFrontendHost.sendMessageToBackend where InspectorFrontendHost is a native bound object injected into the front-end context.
Zoltan Herczeg
Comment 2 2011-08-15 11:05:38 PDT
Ooops, sorry for the wrong name. That is a different bug. inspector/debugger/open-close-open.html is the reight one.
Zoltan Herczeg
Comment 3 2011-08-18 06:15:49 PDT
WebCore::InspectorController::show Source/WebCore/inspector/InspectorController.cpp:326 Runs earlier than WebCore::InspectorFrontendHost::disconnectFromBackend Source/WebCore/inspector/InspectorFrontendHost.cpp:175 Thus, it destroys the window, and cause this test to fail. Both are called from WebCore/page/DOMTimer.cpp thus, there is a usual async problem here.
Zoltan Herczeg
Comment 4 2011-08-19 01:28:59 PDT
Pavel Feldman
Comment 5 2011-08-23 08:35:20 PDT
Comment on attachment 104474 [details] fix View in context: https://bugs.webkit.org/attachment.cgi?id=104474&action=review > LayoutTests/http/tests/inspector/inspector-test.js:376 > + setTimeout(function() { callback(); }, 0); layoutTestController.closeWebInspector -> InspectorController::close -> InspectorFrontend::disconnectFromBackend -> setTimeout(WebInspector.disconnectFromBackend) -> InspectorFrontendHost.disconnectFromBackend -> closing the inspector. This does prove that callback is called before inspector is closed, but this is somehow not critical for the rest of the ports sharing the logic. What is the failure symptoms? Could it be difference in the DRT implementation? (DRT should be closing inspector after each test synchronously).
Zoltan Herczeg
Comment 6 2011-08-29 04:16:30 PDT
> layoutTestController.closeWebInspector -> InspectorController::close -> InspectorFrontend::disconnectFromBackend -> setTimeout(WebInspector.disconnectFromBackend) -> InspectorFrontendHost.disconnectFromBackend -> closing the inspector. > > This does prove that callback is called before inspector is closed, but this is somehow not critical for the rest of the ports sharing the logic. What is the failure symptoms? Could it be difference in the DRT implementation? (DRT should be closing inspector after each test synchronously). Probably there is a difference. Actually inspector is an entity resource in Qt, only one is allowed to be exists. The opening is synchronous, normally based on the path: if (isWebInspectorTest(url)) layoutTestController()->showWebInspector(); Symptoms: it opens a new inspector, and close it right after the next timer event is called. Since there is only one exists at a time there is no inspector after the closing. Besides, the closing is normally done just before the end of the test by: function closeInspectorAndNotifyDone() { if (window._watchDogTimer) clearTimeout(window._watchDogTimer); layoutTestController.closeWebInspector(); setTimeout(function() { layoutTestController.notifyDone(); }, 0); } And that is an asynchronous operation.
Jocelyn Turcotte
Comment 7 2014-02-03 03:18:36 PST
=== Bulk closing of Qt bugs === If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary. If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.
Note You need to log in before you can comment on or make changes to this bug.