Open
Bug 1483961
Opened 6 years ago
Updated 2 years ago
Throw an error in JS_GetDefaultLocale when no locale is set
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
NEW
Tracking | Status | |
---|---|---|
firefox63 | --- | affected |
People
(Reporter: anba, Unassigned)
Details
JS_GetDefaultLocale returns |nullptr| when no runtime locale is set or when an OOM error happened. That means the caller is required to query |JSContext::isExceptionPending()| when receiving |nullptr| to find out which of the two things happened. JS_GetDefaultLocale should probably be changed to throw an error if no runtime locale is set, similar to <https://searchfox.org/mozilla-central/rev/5dbfd833bbb114afe758db4d4bdbc5b13bcc33ef/js/src/vm/SelfHosting.cpp#1918-1922,1946-1950>.
Comment 1•6 years ago
|
||
Or we should fallback on last resort locale?
Updated•6 years ago
|
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•