Assertion failure: script && script->filename(), at shell/js.cpp

RESOLVED FIXED in mozilla24

Status

()

defect
--
critical
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: gkw, Assigned: sfink)

Tracking

(Blocks 1 bug, {assertion, regression, testcase})

Trunk
mozilla24
x86_64
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [jsbugmon:update])

Attachments

(2 attachments)

Posted file stack
evaluate("\
    for each(a in this) {\
        try {\
            a(__defineGetter__([], decodeURI))\
        } catch (e) {}\
    }\
", {
    fileName: null
})

asserts js debug shell on m-c changeset 61c3c8b85563 without any CLI arguments at Assertion failure: script && script->filename(), at shell/js.cpp
autoBisect shows this is probably related to the following changeset:

The first bad revision is:
changeset:   http://hg.mozilla.org/mozilla-central/rev/37474b43d064
user:        Steve Fink
date:        Mon Mar 11 15:36:16 2013 -0700
summary:     Bug 835552 - Make load() be script-relative and read()/snarf() be cwd-relative.. r=njn

Steve, is bug 835552 a likely regressor?
Blocks: 835552
Flags: needinfo?(sphink)
Yes it is. (Sorry for the random review request, terrence.)
Attachment #766078 - Flags: review?(terrence)
Assignee: general → sphink
Comment on attachment 766078 [details] [diff] [review]
script filename can be NULL in shell load

Review of attachment 766078 [details] [diff] [review]:
-----------------------------------------------------------------

Drive-by!

::: js/src/shell/js.cpp
@@ +797,3 @@
>              return false;
> +        }
> +        if (!str || !(str = ResolvePath(cx, str, scriptRelative))) {

I think you can remove the "!str ||" part of that condition, given that you test for it in the previous if statement.
Attachment #766078 - Flags: review?(terrence) → review+
Attachment #766078 - Flags: checkin+
(In reply to Nicholas Nethercote [:njn] from comment #3)
> Comment on attachment 766078 [details] [diff] [review]
> script filename can be NULL in shell load
> 
> Review of attachment 766078 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Drive-by!

Awesome, thanks!

> ::: js/src/shell/js.cpp
> @@ +797,3 @@
> >              return false;
> > +        }
> > +        if (!str || !(str = ResolvePath(cx, str, scriptRelative))) {
> 
> I think you can remove the "!str ||" part of that condition, given that you
> test for it in the previous if statement.

Er, yeah.
Flags: needinfo?(sphink)
https://hg.mozilla.org/mozilla-central/rev/d3ca13f229af
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.