Bug 140508 - Some console messages erroneously skip the first ScriptCallStack frame when computing source locations
Summary: Some console messages erroneously skip the first ScriptCallStack frame when c...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 140478
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-15 13:22 PST by Brian Burg
Modified: 2017-01-18 23:39 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2015-01-15 13:22:22 PST
These wrong line numbers were previously visible in test results, but with the fix to https://bugs.webkit.org/show_bug.cgi?id=140478 this will become more apparent. This may have been happening for console messages too, though I have no test case in hand.

I suggest simplifying the logic in ConsoleMessage and ScriptCallStackFactory so that there is only one place that creates a ScriptCallStack. Clients can specifically ask for the first non-native call frame if that is necessary, i.e., when the native call frame shouldn't be shown in the console. There's no reason to decide whether to skip this when creating the call stack, as code paths already exist to filter out native frames.