Closed Bug 943312 Opened 11 years ago Closed 6 years ago

When using opt xpcshell in interactive mode, it shows no errors when referencing undeclared variables

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: Gijs, Unassigned)

References

Details

(Keywords: regression)

STR:

$ $OBJDIR/dist/bin/xpcshell
js> asdfgasdfg
js> ;
js> 
js> let x = asdfgadfg;
js> x;
js> print(x)
undefined
js>



What's up with that? :-(
mozilla% ../obj-firefox/dist/bin/xpcshell
js> asdfgasdfg
System JS : ERROR typein:1 - ReferenceError: asdfgasdfg is not defined

with a debug build from last night...

Which revision are you building from?  Debug or opt?
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to Boris Zbarsky [:bz] from comment #1)
> mozilla% ../obj-firefox/dist/bin/xpcshell
> js> asdfgasdfg
> System JS : ERROR typein:1 - ReferenceError: asdfgasdfg is not defined
> 
> with a debug build from last night...
> 
> Which revision are you building from?  Debug or opt?

opt, Built from https://hg.mozilla.org/integration/fx-team/rev/f919ebc3cc4a

Running by doing:

gkruitbosch-16516:fx-team gkruitbosch$ ../builds/obj-x86_64-apple-darwin13.0.0/dist/bin/xpcshell 

in case that matters (so on OS X 10.9)
Flags: needinfo?(gijskruitbosch+bugs)
> opt, Built from https://hg.mozilla.org/integration/fx-team/rev/f919ebc3cc4a

There is no such revision.

That said, I can reproduce in an opt build on m-i too.  What happens is that xpc::SystemErrorReporter tries to get the console service, which of course fails, so it can't report the exception there.  Then it checks whether nsContentUtils::DOMWindowDumpEnabled() which in an opt build is false by default, and if it's true prints out a message to the console.

Looks like the old xpcshell error reporter (pre bug 889911) always printed to console.

Can we just make DOMWindowDumpEnabled() return true in xpcshell?
Blocks: 889911
Keywords: regression
Summary: When using xpcshell in interactive mode, it shows no errors when referencing undeclared variables → When using opt xpcshell in interactive mode, it shows no errors when referencing undeclared variables
(In reply to Boris Zbarsky [:bz] from comment #3)
> > opt, Built from https://hg.mozilla.org/integration/fx-team/rev/f919ebc3cc4a
> 
> There is no such revision.
> 
> That said, I can reproduce in an opt build on m-i too.  What happens is that
> xpc::SystemErrorReporter tries to get the console service, which of course
> fails, so it can't report the exception there.  Then it checks whether
> nsContentUtils::DOMWindowDumpEnabled() which in an opt build is false by
> default, and if it's true prints out a message to the console.
> 
> Looks like the old xpcshell error reporter (pre bug 889911) always printed
> to console.
> 
> Can we just make DOMWindowDumpEnabled() return true in xpcshell?

Yeah, that sounds fine. Maybe we could just set the pref somehow in XPCShellImpl.cpp?
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.