[Webkit-unassigned] [Bug 46624] Web Inspector: implement pausing on event listeners (back-end part)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 30 10:37:00 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=46624
--- Comment #9 from Ilya Tikhonovsky <loislo at chromium.org> 2010-09-30 10:36:59 PST ---
(From update of attachment 69343)
View in context: https://bugs.webkit.org/attachment.cgi?id=69343&action=review
> WebCore/inspector/InspectorController.cpp:2140
> +void InspectorController::instrumentWillDispatchEvent(const Event& event)
> +{
> +#if ENABLE(JAVASCRIPT_DEBUGGER)
> + if (m_debuggerAgent) {
> + if (!m_eventNamesMap.contains(event.type()))
> + return;
> + RefPtr<InspectorObject> eventData = InspectorObject::create();
> + eventData->setString("type", "EventListener");
> + eventData->setString("eventName", event.type());
> + m_debuggerAgent->schedulePauseOnNextStatement(NativeBreakpointDebuggerEventType, eventData);
> + }
> +#endif
> +}
It should be a method of debugger agent and you should call it directly from InspectorInstrumentation.
> WebCore/inspector/InspectorController.cpp:2148
> +
> +void InspectorController::instrumentDidDispatchEvent()
> +{
> +#if ENABLE(JAVASCRIPT_DEBUGGER)
> + if (m_debuggerAgent)
> + m_debuggerAgent->cancelPauseOnNextStatement();
> +#endif
> +}
ditto
> WebCore/inspector/InspectorController.h:398
> + HashMap<unsigned int, String> m_nativeBreakpoints;
> + HashMap<unsigned int, String> m_eventListenerBreakpoints;
> + HashMap<String, unsigned int> m_eventNamesMap;
Probably these maps also should be moved to debuggerAgent
> WebCore/inspector/InspectorDebuggerAgent.cpp:161
> + schedulePauseOnNextStatement(JavaScriptPauseEventType, InspectorObject::create());
It'd be better directly call ScriptDebugServer::shared().setPauseOnNextStatement(true);
> WebCore/inspector/InspectorInstrumentation.cpp:162
> + inspectorController->instrumentWillDispatchEvent(event);
see comments about this method in InspectorController
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list