YARR doesn't check for invalid flags for literal regular expressions
https://bugs.webkit.org/show_bug.cgi?id=161995

Reviewed by Mark Lam.

JSTests:

New test.

* stress/regress-161995.js: Added.
(testStatic):
(catch):

Source/JavaScriptCore:

Added a new error and a check that the flags are valid when we create a
literal regular expression.

* runtime/RegExp.cpp:
(JSC::RegExp::finishCreation):
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPattern::errorMessage):
(JSC::Yarr::YarrPattern::compile):
* yarr/YarrPattern.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@205937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed