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.