RESOLVED FIXED 89410
JSC needs to record line numbers for exception stack traces
https://bugs.webkit.org/show_bug.cgi?id=89410
Summary JSC needs to record line numbers for exception stack traces
Mark Lam
Reported 2012-06-18 19:08:25 PDT
The current implementation of JSC only records line number information if the web inspector is attached. This needs to be changed so that that exception traces will always have the proper line number info regardless of whether the inspector is attached or not.
Attachments
Fix (10.04 KB, patch)
2012-06-18 19:44 PDT, Mark Lam
ggaren: review-
Revised with Geoff's feedback applied. (9.83 KB, patch)
2012-06-18 21:39 PDT, Mark Lam
no flags
Mark Lam
Comment 1 2012-06-18 19:09:10 PDT
Mark Lam
Comment 2 2012-06-18 19:44:37 PDT
WebKit Review Bot
Comment 3 2012-06-18 19:46:33 PDT
Comment on attachment 148229 [details] Fix Rejecting attachment 148229 [details] from commit-queue. mark.lam@apple.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py. - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.
Geoffrey Garen
Comment 4 2012-06-18 20:20:27 PDT
Comment on attachment 148229 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=148229&action=review Approach looks good, but this patch could use some tweaks before landing. > Source/JavaScriptCore/bytecode/CodeBlock.cpp:1603 > + , m_lineInfo() "m_lineInfo(other.m_lineInfo)" would be better here, to avoid zero-initializing m_lineInfo just to overwrite it later. > Source/JavaScriptCore/bytecode/CodeBlock.cpp:1653 > + , m_lineInfo() WebKit style is to omit implicit initializers like this one. > Source/JavaScriptCore/bytecode/CodeBlock.h:726 > + return m_lineInfo.size() || (m_rareData m_lineInfo.size() is always > 0 now, right? If so, I think you should just return true here, and we can remove this optimization in another patch.
Mark Lam
Comment 5 2012-06-18 21:39:29 PDT
Created attachment 148241 [details] Revised with Geoff's feedback applied.
Geoffrey Garen
Comment 6 2012-06-18 21:49:10 PDT
Comment on attachment 148241 [details] Revised with Geoff's feedback applied. r=me
WebKit Review Bot
Comment 7 2012-06-18 23:07:44 PDT
Comment on attachment 148241 [details] Revised with Geoff's feedback applied. Clearing flags on attachment: 148241 Committed r120676: <http://trac.webkit.org/changeset/120676>
WebKit Review Bot
Comment 8 2012-06-18 23:07:49 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 9 2012-06-20 18:51:44 PDT
Comment on attachment 148241 [details] Revised with Geoff's feedback applied. View in context: https://bugs.webkit.org/attachment.cgi?id=148241&action=review > Source/JavaScriptCore/bytecode/CodeBlock.h:727 > + return true || (m_rareData > + && (m_rareData->m_expressionInfo.size() || m_rareData->m_exceptionHandlers.size())); What’s the true || doing here?!
Mark Lam
Comment 10 2012-06-20 18:58:02 PDT
(In reply to comment #9) > (From update of attachment 148241 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=148241&action=review > > > Source/JavaScriptCore/bytecode/CodeBlock.h:727 > > + return true || (m_rareData > > + && (m_rareData->m_expressionInfo.size() || m_rareData->m_exceptionHandlers.size())); > > What’s the true || doing here?! This was left there temporarily so as to not perturb the tested code for this change set too much before committing. This was done deliberately with the intention to fix it in a subsequent change set. See: https://bugs.webkit.org/show_bug.cgi?id=89490
Note You need to log in before you can comment on or make changes to this bug.