Closed Bug 382196 Opened 17 years ago Closed 17 years ago

setInterval() with no parameters causes "ASSERTION: No expression, so no handler text" and crash [@ JS_GetStringChars]

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: mrbkap)

Details

(Keywords: assertion, crash)

Crash Data

Attachments

(1 file)

ASSERTION: No expression, so no handler text!: 'mExpr', file /Users/jruderman/trunk/mozilla/dom/src/base/nsJSTimeoutHandler.cpp

I don't know how to reproduce this, but I see it fairly frequently when I play with the code in bug 326633.  I guess if I really wanted a stack trace, I could turn it into a crash locally...
Here's a testcase that triggers the assertion and crashes:

javascript:setInterval(); void 0

I don't think I've ever seen this assertion without a crash, so I don't know why I filed this as a non-crash assertion bug...
Severity: normal → critical
Keywords: crash
Summary: "ASSERTION: No expression, so no handler text" in nsJSScriptTimeoutHandler::GetHandlerText → setInterval() with no parameters causes "ASSERTION: No expression, so no handler text" and crash [@ JS_GetStringChars]
Attached patch FixSplinter Review
This is due to me not being careful enough when I fixed bug 342448. I didn't look around for similar bad patterns, so here we are. This fix just extends the "handshake" introduced in that bug to the rest of the error cases.
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #268316 - Flags: superreview?(jst)
Attachment #268316 - Flags: review?(jst)
Comment on attachment 268316 [details] [diff] [review]
Fix

r+sr=jst
Attachment #268316 - Flags: superreview?(jst)
Attachment #268316 - Flags: superreview+
Attachment #268316 - Flags: review?(jst)
Attachment #268316 - Flags: review+
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
Crash Signature: [@ JS_GetStringChars]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: