Bug 41696 - Web Inspector: script names are shown with ":0"
Summary: Web Inspector: script names are shown with ":0"
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-06 07:04 PDT by Pavel Podivilov
Modified: 2010-07-07 03:25 PDT (History)
4 users (show)

See Also:


Attachments
Proposed patch. (1.39 KB, patch)
2010-07-06 07:06 PDT, Pavel Podivilov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Podivilov 2010-07-06 07:04:28 PDT
Web Inspector: script names are shown with ":0"
Comment 1 Pavel Podivilov 2010-07-06 07:06:44 PDT
Created attachment 60630 [details]
Proposed patch.
Comment 2 WebKit Commit Bot 2010-07-06 11:52:19 PDT
Comment on attachment 60630 [details]
Proposed patch.

Clearing flags on attachment: 60630

Committed r62575: <http://trac.webkit.org/changeset/62575>
Comment 3 WebKit Commit Bot 2010-07-06 11:52:24 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Yury Semikhatsky 2010-07-07 02:44:27 PDT
Comment on attachment 60630 [details]
Proposed patch.

WebCore/bindings/v8/ScriptDebugServer.cpp:383
 +          object->Get(v8::String::New("lineOffset"))->ToInteger()->Value() + 1,
This should be done in DebuggerScript.js using DebuggerScript._v8ToWebkitLineNumber. Please fix this in a separate change.
Comment 5 Eric Seidel (no email) 2010-07-07 02:49:42 PDT
There isn't really any such thing as a "webkit line number".  Line numbers are a mess.  The code is sprinkled with all sorts of +1's, not all of which make sense.

Search for lineNumber() to see what I mean.
Comment 6 Yury Semikhatsky 2010-07-07 02:55:08 PDT
(In reply to comment #5)
> There isn't really any such thing as a "webkit line number".  Line numbers are a mess.  The code is sprinkled with all sorts of +1's, not all of which make sense.
> 
> Search for lineNumber() to see what I mean.

In case of debugger we try to localize line number arithmetic related to v8(script line numbers start from 0)/WebCore(script line numbers are assumed to start from 1) in DebuggerScript.js
Comment 7 Eric Seidel (no email) 2010-07-07 03:25:39 PDT
The question is where you get the line number from in WebCore.  I think the parser starts at 0, but ScriptController/JavaScriptCore start at 1.  Someone needs to straighten this all out some day.