Closed
Bug 1317309
Opened 9 years ago
Closed 9 years ago
Throw a TypeError when passing a symbol value to RegExp and RegExp.prototype.compile
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla53
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
4.21 KB,
patch
|
till
:
review+
|
Details | Diff | Splinter Review |
Test case:
---
RegExp(Symbol())
---
Expected: Throws a TypeError
Actual: No exception thrown
Assignee | ||
Comment 1•9 years ago
|
||
It looks like ToAtom was overlooked when Symbols were added to the runtime.
Attachment #8810531 -
Flags: review?(till)
Comment 2•9 years ago
|
||
Comment on attachment 8810531 [details] [diff] [review]
bug1317309.patch
Review of attachment 8810531 [details] [diff] [review]:
-----------------------------------------------------------------
Good catch, thanks.
::: js/src/jsatom.cpp
@@ +515,5 @@
> + JSMSG_SYMBOL_TO_STRING);
> + }
> + return nullptr;
> + }
> + MOZ_ASSERT(v.isUndefined());
It'd sure be nice to be able to enforce exhaustive matching for Value types.
Attachment #8810531 -
Flags: review?(till) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4419ad4be612
Throw a TypeError when passing a Symbol value to ToAtom. r=till
Keywords: checkin-needed
Comment 4•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Updated•9 years ago
|
status-firefox52:
--- → wontfix
You need to log in
before you can comment on or make changes to this bug.
Description
•