Closed
Bug 725468
Opened 14 years ago
Closed 9 years ago
JavaScript Console reports exceptions as warnings when using "use strict"
Categories
(DevTools :: Console, defect, P3)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: andres.pagella, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
Steps to reproduce:
Running the following test:
<html>
<body>
<script>
"use strict";
a=4;
</script>
</body>
</html>
The js console reports the undeclared assignment as a warning instead of an exception on FF11-OSX.
Actual results:
The console reported an exception as a warning on the js console on FF11 - OSX when using "use strict".
Expected results:
It should have reported the undeclared assignment as an exception. If you surround the assignment inside a try-catch block it catches the exception, but the console is showing a warning instead. I've been told that the problem doesn't happen on FF11 - Windows (the console reports an exception), so it seems to be unique to OSX.
Reporter | ||
Updated•14 years ago
|
Component: Untriaged → Developer Tools: Console
Updated•13 years ago
|
QA Contact: untriaged → developer.tools.console
Comment 1•13 years ago
|
||
can we get someone to confirm this?
Updated•13 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: qawanted
OS: Mac OS X → All
Priority: -- → P3
Hardware: x86 → All
Version: 11 Branch → Trunk
Comment 2•9 years ago
|
||
As of Firefox 46.0.1, "use strict"; seems to have no effect at all.
Shift+F4 to open Scratchpad >
// The following should report incorrect inner function definition, and missing semicolons. It should fail, but it doesn't.
"use strict";
function outer() {
function innerShouldNotBeAllowedInStrict() {}
}
outer()
1+2
![]() |
||
Comment 3•9 years ago
|
||
The bug as reported worksforme on mac. Comment 2 doesn't look related to this bug; it's about putting things in scratchpad in strict mode, not how console reports strict mode failures from web pages (where putting things in strict mode works just fine).
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•