Last Comment Bug 721156 - aError.stack is undefined in the Error Console when exception is thrown in Scratchpad
: aError.stack is undefined in the Error Console when exception is thrown in Sc...
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Scratchpad (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Firefox 14
Assigned To: Heather Arthur [:harth]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-25 11:49 PST by Jared Wein [:jaws] (please needinfo? me)
Modified: 2012-03-29 02:58 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Print file and line number if Error.stack isn't defined. (928 bytes, patch)
2012-03-23 06:41 PDT, Heather Arthur [:harth]
rcampbell: review+
Details | Diff | Review

Description Jared Wein [:jaws] (please needinfo? me) 2012-01-25 11:49:13 PST
STR:

In the browser context, run the following code:

> var eTLDService = Cc["@mozilla.org/network/effective-tld-service;1"].getService(Ci.nsIEffectiveTLDService);
> let baseDomain = eTLDService.getBaseDomain("www.msu.edu");

Actual results:
In the error console...
Timestamp: 1/25/2012 11:38:44 AM
Error: aError.stack is undefined
Source File: chrome://browser/content/scratchpad.js
Line: 470

Expected results:
An error within the Scratchpad stating that getBaseDomain expected a URI, not a string.
Comment 1 Heather Arthur [:harth] 2012-03-23 06:41:40 PDT
Created attachment 608682 [details] [diff] [review]
Print file and line number if Error.stack isn't defined.

I run into this often, this patch fixes it.

Sometimes Error.stack is undefined and we should show Error.fileName and Error.lineNumber in those cases.
Comment 2 Jared Wein [:jaws] (please needinfo? me) 2012-03-23 09:45:23 PDT
\o/

Did you forget to assign the review to somebody?
Comment 3 Heather Arthur [:harth] 2012-03-24 14:47:38 PDT
Comment on attachment 608682 [details] [diff] [review]
Print file and line number if Error.stack isn't defined.

My bad, meant to flag robcee.
Comment 4 Rob Campbell [:rc] (:robcee) 2012-03-27 10:49:31 PDT
Comment on attachment 608682 [details] [diff] [review]
Print file and line number if Error.stack isn't defined.

yup yup.
Comment 5 Heather Arthur [:harth] 2012-03-28 05:26:44 PDT
http://hg.mozilla.org/integration/fx-team/rev/5e087503286f
Comment 6 Tim Taubert [:ttaubert] 2012-03-29 02:58:56 PDT
https://hg.mozilla.org/mozilla-central/rev/5e087503286f

Note You need to log in before you can comment on or make changes to this bug.