Closed
Bug 166743
Opened 22 years ago
Closed 22 years ago
Error.prototype.stack is still causing headaches
Categories
(Core :: JavaScript Engine, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla1.2alpha
People
(Reporter: rginda, Assigned: brendan)
References
Details
(Keywords: js1.5)
Attachments
(1 file, 1 obsolete file)
2.86 KB,
patch
|
rginda
:
review+
jesup
:
approval+
|
Details | Diff | Splinter Review |
toString()ing parameters for Error.prototype.stack is causing headaches again.
See bug 166420 and bug 69850 for examples.
Calling toString on arbitrary objects in an error condition just doesn't seem
like a good thing. I'd suggest that the best we can do is append the string
[Object] (or something like that) wherever we find an object parameter.
Reporter | ||
Updated•22 years ago
|
Target Milestone: --- → mozilla1.2alpha
Reporter | ||
Comment 1•22 years ago
|
||
Uh, that should have been bug 165179, not bug 69850.
Comment 2•22 years ago
|
||
This may be related to a bug I filed: bug 157474
"Error.stack no longer quotes string arguments to functions"
Reporter | ||
Comment 3•22 years ago
|
||
If I apply this patch I no longer see the long pause before reporting an error
in Venkman. I assume this fixes the crash too, but seeing as how I couldn't
crash in a debug build, I don't know for sure.
I imagine we don't actually want to JS_NewStringCopyZ here (or maybe just for
1.2a.)
Assignee | ||
Comment 4•22 years ago
|
||
The fix to return false (meaning "please report this error, I can't make an
exception object for it") from js_ErrorToException mirrors logic used in
jsapi.c to call js_ReportUncaughtException when unwinding to an API caller when
there are no active frames on cx.
I rearranged the logic in rginda's patch to avoid redundant tests for primitive
type values.
/be
Attachment #98008 -
Attachment is obsolete: true
Assignee | ||
Comment 5•22 years ago
|
||
Cc'ing more JS buddies and drivers. Rob, can you r= my patch? Phil, testing
would be good -- this should get into the frozen 1.2alpha trunk by tomorrow.
Thanks,
/be
Reporter | ||
Comment 6•22 years ago
|
||
Comment on attachment 98011 [details] [diff] [review]
less hacked fix, plus a fix for failure to report no-such-file from the shell
r=rginda
Attachment #98011 -
Flags: review+
Comment 7•22 years ago
|
||
Comment on attachment 98011 [details] [diff] [review]
less hacked fix, plus a fix for failure to report no-such-file from the shell
a=rjesup@wgate.com
Attachment #98011 -
Flags: approval+
Assignee | ||
Comment 8•22 years ago
|
||
Fixed.
/be
Comment 9•22 years ago
|
||
Marking Verified Fixed.
Please also see bug 157474 and bug 166420. In particular,
http://bugzilla.mozilla.org/show_bug.cgi?id=166420#c9
shows the effects of this fix.
Rob: if the fix hasn't addressed your concerns, please reopen; thx -
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•