WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 46086
Web Inspector: implement pausing on XHR
https://bugs.webkit.org/show_bug.cgi?id=46086
Summary
Web Inspector: implement pausing on XHR
Pavel Podivilov
Reported
2010-09-20 07:18:36 PDT
Web Inspector: implement pausing on XHR
Attachments
Screenshot.
(89.87 KB, image/png)
2010-09-20 07:20 PDT
,
Pavel Podivilov
no flags
Details
Proposed patch.
(30.16 KB, patch)
2010-09-20 07:24 PDT
,
Pavel Podivilov
pfeldman
: review+
Details
Formatted Diff
Diff
Couple of renames.
(30.43 KB, patch)
2010-09-21 09:08 PDT
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Couple of renames.
(30.25 KB, patch)
2010-09-21 09:24 PDT
,
Pavel Podivilov
pfeldman
: review-
Details
Formatted Diff
Diff
Proposed patch.
(23.83 KB, patch)
2010-09-22 05:19 PDT
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Proposed patch.
(23.83 KB, patch)
2010-09-22 05:22 PDT
,
Pavel Podivilov
pfeldman
: review-
Details
Formatted Diff
Diff
Proposed patch.
(24.72 KB, patch)
2010-09-22 06:16 PDT
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Podivilov
Comment 1
2010-09-20 07:20:46 PDT
Created
attachment 68078
[details]
Screenshot.
Pavel Podivilov
Comment 2
2010-09-20 07:24:24 PDT
Created
attachment 68079
[details]
Proposed patch.
Pavel Feldman
Comment 3
2010-09-20 07:43:30 PDT
Comment on
attachment 68079
[details]
Proposed patch. r+ with nits. I'd actually suggest adding one more item into the native breakpoints list: "Any JavaScript statement" that is On by default. In addition to that, you change behavior of the Pause button respectively. View in context:
https://bugs.webkit.org/attachment.cgi?id=68079&action=review
> WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp:34 > +#include "InspectorController.h"
Please mind import order.
> WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp:117 > + InspectorController::willSendXHR(xmlHttpRequest->scriptExecutionContext(), xmlHttpRequest->url());
I'd suggest calling it: InspectorController::instrumentWillSendXmlHttpRequest And all others will be 'instrument*'.
> WebCore/inspector/Inspector.idl:127 > + [handler=Debug] void setPauseOnEventState(in unsigned int eventType, in boolean state);
pauseOnNextEvent ?
Yury Semikhatsky
Comment 4
2010-09-21 00:10:25 PDT
Comment on
attachment 68079
[details]
Proposed patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=68079&action=review
>> WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp:117 >> + InspectorController::willSendXHR(xmlHttpRequest->scriptExecutionContext(), xmlHttpRequest->url()); > > I'd suggest calling it: > > InspectorController::instrumentWillSendXmlHttpRequest > > And all others will be 'instrument*'.
It should be easy to support same functionality in JSC. There is already a bug about missing ScriptDebuggServer::breakProgram implementation in JSC which prevents this change from working in JSC but this functionality might deserve filing its own bug.
> WebCore/inspector/InspectorDebuggerAgent.h:99 > + bool pauseOnEventState(unsigned eventType);
pauseOnEventState -> shouldPauseOnEvent
Pavel Podivilov
Comment 5
2010-09-21 09:08:02 PDT
Created
attachment 68246
[details]
Couple of renames.
Pavel Podivilov
Comment 6
2010-09-21 09:24:43 PDT
Created
attachment 68249
[details]
Couple of renames.
Pavel Feldman
Comment 7
2010-09-21 09:45:44 PDT
Comment on
attachment 68249
[details]
Couple of renames. View in context:
https://bugs.webkit.org/attachment.cgi?id=68249&action=review
> WebCore/inspector/InspectorController.cpp:2137 > +#if ENABLE(JAVASCRIPT_DEBUGGER)
I think you should inline willSendXHR here.
> WebCore/inspector/InspectorController.h:483 > +inline InspectorController* InspectorController::inspectorControllerForDocument(Document* document)
Can we employ static InspectorController counter here to speed up things?
> WebCore/inspector/InspectorDebuggerAgent.h:48 > +enum DebuggerEvent {
NativeBreakpointType ?
> WebCore/inspector/InspectorDebuggerAgent.h:83 > + void willSendXHR(const String& url);
willSendXHR does not look good as a part of debugger agent.
Joseph Pecoraro
Comment 8
2010-09-21 10:01:48 PDT
Comment on
attachment 68249
[details]
Couple of renames. View in context:
https://bugs.webkit.org/attachment.cgi?id=68249&action=review
> WebCore/inspector/InspectorController.cpp:2140 > +#endif
Might need an #else with UNUSED_PARAM(url) here.
> WebCore/inspector/front-end/BreakpointManager.js:232 > \ No newline at end of file
We do want newlines. =)
Pavel Podivilov
Comment 9
2010-09-22 05:19:06 PDT
Created
attachment 68358
[details]
Proposed patch.
Pavel Podivilov
Comment 10
2010-09-22 05:22:14 PDT
Created
attachment 68359
[details]
Proposed patch.
Pavel Feldman
Comment 11
2010-09-22 05:40:44 PDT
Comment on
attachment 68359
[details]
Proposed patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=68359&action=review
> WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp:117 > + InspectorController::instrumentWillSendXMLHttpRequest(xmlHttpRequest->scriptExecutionContext(), xmlHttpRequest->url());
Please guard this with #ifdef
> WebCore/inspector/Inspector.idl:140 > + [handler=Controller] void setNativeBreakpoint(in unsigned int type, in Object breakpoint, out unsigned int breakpointId);
It is unclear how to specify 'breakpoint' parameter format. Why does it have url property? Should we merge 'type' into 'breakpoint' instead? Like breakpoint: { type: "XHR", condition: { url : "foo" } }
> WebCore/inspector/InspectorController.h:492 > + ASSERT(document);
Counter?
Pavel Podivilov
Comment 12
2010-09-22 06:16:19 PDT
Created
attachment 68362
[details]
Proposed patch.
Pavel Podivilov
Comment 13
2010-09-22 06:17:40 PDT
(In reply to
comment #11
)
> (From update of
attachment 68359
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=68359&action=review
> > > WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp:117 > > + InspectorController::instrumentWillSendXMLHttpRequest(xmlHttpRequest->scriptExecutionContext(), xmlHttpRequest->url()); > > Please guard this with #ifdef
With disabled inspector controller, this function wouldn't be called.
> > > WebCore/inspector/Inspector.idl:140 > > + [handler=Controller] void setNativeBreakpoint(in unsigned int type, in Object breakpoint, out unsigned int breakpointId); > > It is unclear how to specify 'breakpoint' parameter format. Why does it have url property? Should we merge 'type' into 'breakpoint' instead? Like > > breakpoint: { type: "XHR", condition: { url : "foo" } }
done
> > > WebCore/inspector/InspectorController.h:492 > > + ASSERT(document); > > Counter?
done
Pavel Feldman
Comment 14
2010-09-22 08:46:56 PDT
Comment on
attachment 68362
[details]
Proposed patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=68362&action=review
> WebCore/inspector/InspectorController.cpp:156 > +unsigned InspectorController::s_inspectorControllerCount = 0;
I don't see it incrementing.
> WebCore/inspector/InspectorController.cpp:1683 > + RefPtr<InspectorObject> condition = breakpoint->getObject("condition");
Nit: condition should be optional.
> WebCore/inspector/InspectorController.cpp:1687 > + if (!condition->getString("url", &url))
Same here, just stop on any.
> WebCore/inspector/InspectorController.h:492 > +inline InspectorController* InspectorController::inspectorControllerForDocument(Document* document)
It is worth checking counter here.
WebKit Commit Bot
Comment 15
2010-09-22 09:06:41 PDT
Comment on
attachment 68362
[details]
Proposed patch. Clearing flags on attachment: 68362 Committed
r68049
: <
http://trac.webkit.org/changeset/68049
>
WebKit Commit Bot
Comment 16
2010-09-22 09:06:48 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug