Closed Bug 408162 Opened 17 years ago Closed 17 years ago

atob() function throws non-correct failure code

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
trivial

Tracking

()

RESOLVED DUPLICATE of bug 287112

People

(Reporter: telega, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9

Javascript function atob() when applied to incorrect string, like atob("\r\n") throws an exception with NS_ERROR_OUT_OF_MEMORY failure code.

Reproducible: Always

Steps to Reproduce:
1.Open sample html page:
<script>
try {
  atob("\r\n");
}
catch(e) { alert(e); }
</script>
2.See alert box with NS_ERROR_OUT_OF_MEMORY failure code.
Actual Results:  
An exception with NS_ERROR_OUT_OF_MEMORY failure code is thrown

Expected Results:  
Failure code should be different, because error is caused by incorrect input string, not lack of memory.
Component: Extension Compatibility → General
duplicate of bug 287112

Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
QA Contact: extension.compatibility → general
You need to log in before you can comment on or make changes to this bug.