ladybird/Userland
Linus Groh da177c6517 LibJS: Make Errors fully spec compliant
The previous handling of the name and message properties specifically
was breaking websites that created their own error types and relied on
the error prototype working correctly - not assuming an JS::Error this
object, that is.

The way it works now, and it is supposed to work, is:

- Error.prototype.name and Error.prototype.message just have initial
  string values and are no longer getters/setters
- When constructing an error with a message, we create a regular
  property on the newly created object, so a lookup of the message
  property will either get it from the object directly or go though the
  prototype chain
- Internal m_name/m_message properties are no longer needed and removed

This makes printing errors slightly more complicated, as we can no
longer rely on the (safe) internal properties, and cannot trust a
property lookup either - get_without_side_effects() is used to solve
this, it's not perfect but something we can revisit later.

I did some refactoring along the way, there was some really old stuff in
there - accessing vm.call_frame().arguments[0] is not something we (have
to) do anymore :^)

Fixes #6245.
2021-04-12 09:38:57 +02:00
..
Applets FontEditor+ClipboardHistory: Use system-wide Clipboard 2021-04-07 19:27:01 +02:00
Applications LibJS: Make Errors fully spec compliant 2021-04-12 09:38:57 +02:00
Demos Everywhere: Change font properties to be described in GML 2021-03-29 09:10:23 +02:00
DevTools Playground: Add Alt shortcuts to menus 2021-04-11 10:38:45 +02:00
DynamicLoader LibC: Add x86_64 Registers 2021-03-21 09:35:23 +01:00
Games Minesweeper: Fix UI layout and focus behavior 2021-04-06 17:55:47 +02:00
Libraries LibJS: Make Errors fully spec compliant 2021-04-12 09:38:57 +02:00
Services LibJS: Make Errors fully spec compliant 2021-04-12 09:38:57 +02:00
Shell Shell: Allow newlines between the function decl and its body 2021-04-08 10:46:39 +02:00
Tests Tests: Merge duplicate TestFormat test into AK directory 2021-04-08 20:30:56 +02:00
Utilities LibJS: Make Errors fully spec compliant 2021-04-12 09:38:57 +02:00
CMakeLists.txt Userland: Rename *.MenuApplet => *.Applet 2021-04-04 16:29:55 +02:00