console.assert currently shows the line which called assert. In firebug it also includes a stacktrace, which is very useful since often the error is higher in the stack trace. For example a unittest framework might have its own AssertEqual method that does it's own logging and then calls console.assert. The useful line is the one that called AssertEqual, not console.assert.
It's not resolved yet.
Created attachment 62062 [details] Patch
Created attachment 62079 [details] Patch
Comment on attachment 62079 [details] Patch WebCore/bindings/v8/ScriptCallStack.cpp:56 + if (stackTrace->GetFrameCount() <= 0) { <=? Should it be == 0? WebCore/bindings/v8/ScriptCallStack.cpp:59 + *sourceName = toWebCoreString(v8::Undefined()); "undefined"? WebCore/bindings/v8/ScriptCallStack.cpp:61 + *functionName = toWebCoreString(v8::Undefined()); "undefined"?
(In reply to comment #4) > (From update of attachment 62079 [details]) > WebCore/bindings/v8/ScriptCallStack.cpp:56 > + if (stackTrace->GetFrameCount() <= 0) { > <=? Should it be == 0? > No, GetFrameCount may return -1 if v8's IsDeadCheck fails. > WebCore/bindings/v8/ScriptCallStack.cpp:59 > + *sourceName = toWebCoreString(v8::Undefined()); > "undefined"? > Done. > WebCore/bindings/v8/ScriptCallStack.cpp:61 > + *functionName = toWebCoreString(v8::Undefined()); > "undefined"? Done.
Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/ChangeLog A LayoutTests/inspector/console-assert-expected.txt A LayoutTests/inspector/console-assert.html M WebCore/ChangeLog M WebCore/bindings/v8/ScriptCallStack.cpp M WebCore/bindings/v8/ScriptCallStack.h M WebCore/bindings/v8/ScriptController.cpp M WebCore/bindings/v8/custom/V8ConsoleCustom.cpp M WebCore/inspector/ConsoleMessage.cpp M WebCore/inspector/InspectorController.cpp M WebCore/inspector/front-end/ConsoleView.js M WebCore/page/Console.cpp M WebCore/page/Console.idl Committed r63805
Revision r63805 cherry-picked into qtwebkit-2.1 with commit 5b9f8cc6831808b61fdd8ecdd2885fc64a7785de
This bug is marked as RESOLVED/FIXED but it depends on an open-bug: #13646 Should the dependency be removed? Maybe bug #13646 should block the qtwebkit-2.1 release bug instead? (bug #39121)