[Webkit-unassigned] [Bug 53003] Web Inspector: [JSC] implement setting breakpoints by line:column

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 26 05:49:33 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=53003





--- Comment #32 from Peter Wang <peter.wang at torchmobile.com.cn>  2012-06-26 05:49:26 PST ---
(In reply to comment #31)
> (From update of attachment 149490 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=149490&action=review
> 
> > Source/WebCore/bindings/js/ScriptDebugServer.cpp:136
> > +    if (m_currentSourceID != sourceID) {
> 
> Can you explain how that is expected to work in case when you first stop in a script 1, then in a script 2 and again in the same line in script 1? It seems that in that case you will return the first column as the current one or am I missing something?
> 
The sourceID represents the code block of current callframe, if code block is changed, then it must starts from the first line.  
You can take this call stack as example: 
Interpreter::debug(...) 
debugger->callEvent(..., callFrame->codeBlock()->ownerExecutable()->sourceID(),...);
ScriptDebugServer::createCallFrameAndPauseIfNeeded(... ,sourceID, ...);
updateCurrentStatementPosition(sourceID); 

> > Source/WebCore/bindings/js/ScriptDebugServer.cpp:157
> > +    int nextColumn = codeInLine.find(";", m_currentStatementPosition.columnNumber);
> 
> You shouldn't be trying to parse the code here, instead JSC should be extended to report you current statement's column.
> 
It's a very big change to make JSC to provide current statement's column. Since JSC doesn't really insert break point, it just call interface of Debugger at entrance of Function or code-block. 
And actually, the Debugger has enough info to calculate it.
> > Source/WebCore/bindings/js/ScriptDebugServer.cpp:160
> > +        if (c == ' ' || c == '\t')
> 
> What is the purpose of skipping first whitespace?
For example, the column of second statement in "var a = 1;[white apace][white apace]...[white apace]var b=1;", the formatter of forntend assign it as 11.

-- 
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