1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00
serenity/Userland/Libraries
Linus Groh 83c29bd8d7 LibJS: Don't assume match for each capture group in RegExp.prototype.exec()
This was not implementing the following part of the spec correctly:

    27. For each integer i such that i ≥ 1 and i ≤ n, do
        a. Let captureI be ith element of r's captures List.
        b. If captureI is undefined, let capturedValue be undefined.

Expecting a capture group match to exist for each of the RegExp's
capture groups would assert in Vector's operator[] if that's not the
case, for example:

    /(foo)(bar)?/.exec("foo")

Append undefined instead.

Fixes #5256.
2021-02-08 18:01:23 +01:00
..
LibAudio LibIPC: Stop sending client ID to clients 2021-02-01 11:32:00 +01:00
LibC LookupServer+LibC: Pass IP addresses in binary 2021-02-06 17:52:47 +01:00
LibChess Everywhere: Hook up remaining debug macros to Debug.h. 2021-01-25 09:47:36 +01:00
LibCompress Everywhere: Fix typos 2021-01-22 18:41:29 +01:00
LibCore Userland: Add LibSystem and funnel all syscalls through it 2021-02-05 12:23:39 +01:00
LibCoreDump LibCoreDump: Expose arguments and environment 2021-01-15 23:26:47 +01:00
LibCpp LibSyntax+LibGUI+LibJS: Move JS syntax highlighter to LibJS 2021-02-07 16:56:02 +01:00
LibCrypt Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibCrypto Everywhere: Debug macros instead of constexpr. 2021-01-25 09:47:36 +01:00
LibDebug Everywhere: Debug macros instead of constexpr. 2021-01-25 09:47:36 +01:00
LibDesktop LibIPC: Stop sending client ID to clients 2021-02-01 11:32:00 +01:00
LibDiff Everywhere: Debug macros instead of constexpr. 2021-01-25 09:47:36 +01:00
LibELF Userland: Add LibSystem and funnel all syscalls through it 2021-02-05 12:23:39 +01:00
LibGemini Everywhere: Hook up remaining debug macros to Debug.h. 2021-01-25 09:47:36 +01:00
LibGfx LibGfx: Make Palette::color(ColorRole) inline 2021-02-07 16:53:39 +01:00
LibGUI LibGUI: Add missing "final" in TextEditor 2021-02-07 19:32:40 +01:00
LibHTTP Everywhere: Hook up remaining debug macros to Debug.h. 2021-01-25 09:47:36 +01:00
LibImageDecoderClient LibIPC: Stop sending client ID to clients 2021-02-01 11:32:00 +01:00
LibIPC LibIPC: Stop sending client ID to clients 2021-02-01 11:32:00 +01:00
LibJS LibJS: Don't assume match for each capture group in RegExp.prototype.exec() 2021-02-08 18:01:23 +01:00
LibKeyboard Userland: Add LibSystem and funnel all syscalls through it 2021-02-05 12:23:39 +01:00
LibLine LibLine: Place the search editor prompt at the right line after ^L 2021-02-07 13:12:56 +01:00
LibM LibM: Implement nextafter() and nexttoward() 2021-02-05 12:27:23 +01:00
LibMarkdown Everywhere: Debug macros instead of constexpr. 2021-01-25 09:47:36 +01:00
LibPCIDB LibC+Everywhere: Remove open_with_path_length() in favor of open() 2021-01-12 23:34:01 +01:00
LibProtocol LibIPC: Stop sending client ID to clients 2021-02-01 11:32:00 +01:00
LibPthread Userland: Add LibSystem and funnel all syscalls through it 2021-02-05 12:23:39 +01:00
LibRegex Everywhere: Debug macros instead of constexpr. 2021-01-25 09:47:36 +01:00
LibSymbolClient SymbolServer+LibSymbolClient: Just do one symbol per IPC message 2021-02-04 23:35:10 +01:00
LibSyntax LibSyntax+LibGUI+LibJS: Move JS syntax highlighter to LibJS 2021-02-07 16:56:02 +01:00
LibSystem Userland: Add LibSystem and funnel all syscalls through it 2021-02-05 12:23:39 +01:00
LibTar Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibTextCodec LibTextCodec: Avoid duplicate definition of standard encodings 2021-02-01 09:54:32 +01:00
LibThread Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibTLS Everywhere: Debug macros instead of constexpr. 2021-01-25 09:47:36 +01:00
LibTTF Libraries: Add missing headers 2021-01-22 21:49:54 +01:00
LibVT Everywhere: Hook up remaining debug macros to Debug.h. 2021-01-25 09:47:36 +01:00
LibWeb LibWeb: Implement Element.getElementsBy{Tag,Class}Name() 2021-02-08 17:59:04 +01:00
LibX86 LibX86: Don't assert just because insn has no immediate bytes 2021-02-02 20:13:44 +01:00
CMakeLists.txt LibSyntax: Move GUI::Highlighter to Syntax::Highlighter in LibSyntax 2021-02-07 15:15:10 +01:00