WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
22556
console.assert should include stack trace with line numbers.
https://bugs.webkit.org/show_bug.cgi?id=22556
Summary
console.assert should include stack trace with line numbers.
Rib Rdb
Reported
2008-11-29 11:55:42 PST
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.
Attachments
Patch
(6.85 KB, patch)
2010-07-20 06:06 PDT
,
Yury Semikhatsky
no flags
Details
Formatted Diff
Diff
Patch
(16.44 KB, patch)
2010-07-20 08:26 PDT
,
Yury Semikhatsky
pfeldman
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yury Semikhatsky
Comment 1
2010-07-20 06:02:26 PDT
It's not resolved yet.
Yury Semikhatsky
Comment 2
2010-07-20 06:06:10 PDT
Created
attachment 62062
[details]
Patch
Yury Semikhatsky
Comment 3
2010-07-20 08:26:16 PDT
Created
attachment 62079
[details]
Patch
Pavel Feldman
Comment 4
2010-07-20 08:33:19 PDT
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"?
Yury Semikhatsky
Comment 5
2010-07-20 23:22:52 PDT
(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.
Yury Semikhatsky
Comment 6
2010-07-20 23:54:06 PDT
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
Simon Hausmann
Comment 7
2010-08-25 01:18:21 PDT
Revision
r63805
cherry-picked into qtwebkit-2.1 with commit 5b9f8cc6831808b61fdd8ecdd2885fc64a7785de
Ademar Reis
Comment 8
2010-08-26 11:04:23 PDT
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
)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug