RESOLVED FIXED72621
Web Inspector: dispatch messages from the front-end to the backend asynchronously.
https://bugs.webkit.org/show_bug.cgi?id=72621
Summary Web Inspector: dispatch messages from the front-end to the backend asynchrono...
Pavel Feldman
Reported 2011-11-17 08:45:44 PST
We should align the way we dispatch messages from the front-end to backend across the environments: - WebKit has it synchronoulsly - Chromium has it asynchronously - Remote debugging has it asynchronously Making it asynchronous made a number of flaky Qt tests pass.
Attachments
Patch (14.26 KB, patch)
2011-11-17 08:47 PST, Pavel Feldman
no flags
Patch (8.44 KB, patch)
2011-11-18 05:06 PST, Pavel Feldman
yurys: review+
Pavel Feldman
Comment 1 2011-11-17 08:47:51 PST
Timothy Hatcher
Comment 2 2011-11-17 09:47:19 PST
Comment on attachment 115601 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=115601&action=review > Source/WebCore/inspector/InspectorConsoleAgent.cpp:138 > + m_inspectorState->setBoolean(ConsoleAgentState::consoleMessagesEnabled, false); How is this related to async? > LayoutTests/inspector/timeline/timeline-script-tag-1.html:40 > + else if (record.type === WebInspector.TimelineAgent.RecordType.ParseHTML) { > + var children = []; > + for (var i = 0; i < record.children.length; ++i) { > + if (record.children[i].type !== WebInspector.TimelineAgent.RecordType.RecalculateStyles) > + children.push(record.children[i]); > + } > + record.children = children; How is changing this related to async dispatch? This wasn't one of the skipped tests so why does it need to change?
Pavel Feldman
Comment 3 2011-11-17 10:30:26 PST
Comment on attachment 115601 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=115601&action=review >> Source/WebCore/inspector/InspectorConsoleAgent.cpp:138 >> + m_inspectorState->setBoolean(ConsoleAgentState::consoleMessagesEnabled, false); > > How is this related to async? This was actually a bug that was uncovered while running Qt tests after migrating to the async messaging. There was a race condition making console messages reported twice upon re-connecting to the backend: first event was generated upon console call, while the second copy was sent in return to the ::enable command. >> LayoutTests/inspector/timeline/timeline-script-tag-1.html:40 >> + record.children = children; > > How is changing this related to async dispatch? This wasn't one of the skipped tests so why does it need to change? It is making this test pass. Now that the commands are asynchronous, extra style recalculation event is generated which this test is not testing.
Timothy Hatcher
Comment 4 2011-11-17 10:36:01 PST
Those are good comments for the ChangeLog.
Pavel Feldman
Comment 5 2011-11-18 05:06:18 PST
Yury Semikhatsky
Comment 6 2011-11-18 05:24:42 PST
Comment on attachment 115786 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=115786&action=review > Source/WebCore/inspector/InspectorConsoleAgent.cpp:138 > + m_inspectorState->setBoolean(ConsoleAgentState::consoleMessagesEnabled, false); It looks like we may clear inspector state once when front-end is disconnecting instead of spreading this logic over individual agents. > Source/WebCore/inspector/InspectorFrontendClientLocal.cpp:83 > + m_inspectorController->dispatchMessageFromFrontend(m_messages.takeFirst()); Please add a comment here that this task may be already destroyed after dispatchMessageFromFrontend call.
Pavel Feldman
Comment 7 2011-11-18 05:29:40 PST
Note You need to log in before you can comment on or make changes to this bug.