Commit Graph

18688 Commits

Author SHA1 Message Date
Gunnar Beutner
c3aac8cbe7 Ports: Add libassuan port 2021-04-14 13:13:06 +02:00
Gunnar Beutner
700cad4508 Ports: Add libksba port 2021-04-14 13:13:06 +02:00
Gunnar Beutner
0b7079a76a Ports: Add npth port 2021-04-14 13:13:06 +02:00
Gunnar Beutner
a937182254 Ports: Build the shared library for the libiconv port
I'd rather use libtool to build the library but that would
require more extensive changes to the configure script
and maybe even libtool itself. So instead I just build
it manually.
2021-04-14 13:13:06 +02:00
Gunnar Beutner
7d12c08bec LibC: Add definition for the NI_NAMEREQD macro 2021-04-14 13:13:06 +02:00
Gunnar Beutner
ea6d0aa1d4 LibPthread: Implement semaphore functions 2021-04-14 13:13:06 +02:00
Gunnar Beutner
f2ff8f2658 LibELF: Improve error messages for missing shared libraries 2021-04-14 13:13:06 +02:00
Gunnar Beutner
dce57cd085 LibC: Add definitions for INTMAX_C and UINTMAX_C 2021-04-14 13:13:06 +02:00
Gunnar Beutner
1946a4bee6 LibC: Add missing include in <syslog.h>
The include is necessary for __BEGIN_DECLS and __END_DECLS.
2021-04-14 13:13:06 +02:00
Gunnar Beutner
cd7512a2ad LibELF: Add support for loading objects with multiple data and text segments
This enables loading executables with multiple data and text segments. Also
it fixes loading executables where the text segment has a non-zero offset.

Example:

  $ echo "main () {}" > test.c
  $ gcc -Wl,-z,separate-code -o test test.c
  $ objdump -p test
  test:     file format elf32-i386

  Program Header:
      PHDR off    0x00000034 vaddr 0x00000034 paddr 0x00000034 align 2**2
           filesz 0x000000e0 memsz 0x000000e0 flags r--
    INTERP off    0x00000114 vaddr 0x00000114 paddr 0x00000114 align 2**0
           filesz 0x00000013 memsz 0x00000013 flags r--
      LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
           filesz 0x000003c4 memsz 0x000003c4 flags r--
      LOAD off    0x00001000 vaddr 0x00001000 paddr 0x00001000 align 2**12
           filesz 0x00000279 memsz 0x00000279 flags r-x
      LOAD off    0x00002000 vaddr 0x00002000 paddr 0x00002000 align 2**12
           filesz 0x00000004 memsz 0x00000004 flags r--
      LOAD off    0x00002004 vaddr 0x00003004 paddr 0x00003004 align 2**12
           filesz 0x00000100 memsz 0x00000124 flags rw-
   DYNAMIC off    0x00002014 vaddr 0x00003014 paddr 0x00003014 align 2**2
           filesz 0x000000c8 memsz 0x000000c8 flags rw-
2021-04-14 13:12:52 +02:00
Gunnar Beutner
c3ee70591a Kernel: Read the ELF header from the inode rather than the mapped pages
Reading from the mapping doesn't work when the text segment has a non-zero
offset because in that case the first mapped page doesn't contain the ELF
header.
2021-04-14 13:12:52 +02:00
Gunnar Beutner
2d91761cf6 Kernel: Make sure the offset stays the same when using mremap()
When using mmap() on a file with a non-zero offset subsequent
calls to mremap() would incorrectly reset the offset to zero.
2021-04-14 13:12:52 +02:00
Gunnar Beutner
341b44b6f7 Ports: Fix building the stress-ng port 2021-04-14 13:12:52 +02:00
Maciej Zygmanowski
e83caffccc LibCore: Use dbgln_if in EventLoop.cpp 2021-04-14 10:54:56 +02:00
Tom Needham
209de3bcb3
Ports: Update nasm port to version 2.15.05 (#6292)
Fixes #6157.
2021-04-14 10:20:07 +02:00
Linus Groh
ea60b344eb LibJS: Add name and message properties to NativeError prototypes
Otherwise these will get their name/default message from the Error
prototype, and as a result would always just say "Error" in error
messages, not the specific type.
Something I missed in da177c6, now with tests. :^)
2021-04-14 10:11:04 +02:00
Idan Horowitz
1aec9a508e Meta: Increase discord notification's build timeout to 1 hour
It looks like some particularly long builds (After a toolchain cache
reset and on a slow worker) can take much longer than the current set
timeout of 20 minutes.
2021-04-14 09:46:45 +02:00
AnotherTest
339ae7873e LibHTTP: Trim the whitespace around the Transfer-Encoding header value
Fixes #6302.
2021-04-14 09:31:31 +02:00
Linus Groh
5da4c9bf1e LibWeb: Implement Node.cloneNode()
With this we can now successfully run a Vue.js 2 hello world! :^)
2021-04-14 09:30:29 +02:00
Linus Groh
d721c93beb LibWeb: Add Element::prefix()
Just a getter for m_qualified_name.prefix(), just like local_name() and
namespace_().
2021-04-14 09:30:29 +02:00
AnotherTest
d2b5c4d8dc LibWeb: Actually return an empty value when an exception is thrown via
throw_dom_exception_if_needed()

Fixes #6298.
2021-04-13 23:56:19 +02:00
AnotherTest
9c201767a0 LibWeb: Fix some FIXMEs related to ExceptionOr<T>
This fixes a few FIXMEs mentioned in 5beacf08a2,
which depended on #6075 being fixed.
2021-04-13 22:31:06 +02:00
AnotherTest
8ba2b5f36f LibWeb: Make ExceptionOr work with non-JS::Value types
Fixes #6075.
2021-04-13 22:31:06 +02:00
Egor Ananyin
d5def1cad0 LibWeb: Use min-height in calculating height 2021-04-13 22:04:25 +02:00
Egor Ananyin
fe544feb17 LibWeb: Start parsing font property 2021-04-13 22:04:25 +02:00
Linus Groh
e4b3591ac4 LibWeb: Fix a TODO in the adoption agency algorithm
There's still a much bigger one at the end of the function though. :^)
2021-04-13 21:59:55 +02:00
Timothy Flynn
cc7c86fdf4 Browser: Remove expired cookies from the CookieJar
The spec doesn't have any exact steps here, it just notes:

     The user agent MUST evict all expired cookies from the cookie store
     if, at any time, an expired cookie exists in the cookie store.

Here, we implement "at any time" as "when a cookie is retrieved or
stored".
2021-04-13 21:59:30 +02:00
Timothy Flynn
329e6252e9 Base: Update cookie test page with cookies expected to be rejected 2021-04-13 21:59:30 +02:00
Jean-Baptiste Boric
900fe5633a Minesweeper: Use one premade mine palette for all mine widgets
Fixes #6283
2021-04-13 21:52:34 +02:00
Jean-Baptiste Boric
c130161d9f LibCore: Don't leak file descriptor inside AnonymousBuffer on Linux 2021-04-13 21:52:34 +02:00
Jean-Baptiste Boric
dcff87215b Kernel: Fix RAM OK test condition for NE2000NetworkAdapter 2021-04-13 21:52:34 +02:00
Jean-Baptiste Boric
a73bd0fff8 Kernel: Remove type from StorageDevice class 2021-04-13 21:52:34 +02:00
Tom Needham
9b75b1be5f Ports: patch config.sub instead of the configure script in the yasm port 2021-04-13 21:47:11 +02:00
Andreas Kling
a959ccc1d0 Meta: Add link to Discord in CONTRIBUTING.md 2021-04-13 18:27:36 +02:00
Andreas Kling
b08d4ccd56 Utilities: Remove the "html" program
This is not used for anything, it was just a simple test program for
LibWeb back in the early days (before Browser existed.)
2021-04-13 18:24:47 +02:00
Andreas Kling
a2baab38fd Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"
I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:

- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar

This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
2021-04-13 16:58:15 +02:00
Timothy Flynn
86bdfa1edf Browser: Implement spec-compliant cookie storage
https://tools.ietf.org/html/rfc6265#section-5.3

This includes a bit of an update to how cookies are first parsed. The
storage spec requires some extra information from the parsing steps than
just the actual values that were parsed. For example, it needs to know
whether Max-Age or Expires (or both) were specified to give precedence
to Max-Age. To accommodate this, the parser now uses an intermediate
struct for storing this information. The final Cookie struct is not
created until the storage steps.

The storage itself is also updated to be keyed by a combo of the cookie
name, domain, and path.

Retrieving cookies was updated to use the spec's domain-matching
algorithm, but otherwise is not written to the spec yet. This also does
not handle evicting expired cookies yet.
2021-04-13 15:52:50 +02:00
Idan Horowitz
a0111f6a3e Meta: Enable pull_request_target context for the notify_discord action
While we did allow the notify_discord job to run inside the context,
we didnt ask github to run in that context. This commit also uses the
"action-wait-for-check" sub-action to ensure the posted build results
are accurate for pull requests (since the build workflow is done in a
separate context for PRs)
2021-04-13 15:51:44 +02:00
Linus Groh
45133d8ada LibJS: Unset m_unwind_until_label in stop_unwind()
I don't see a reason to keep this intact, that might only surprise us
down the line...
2021-04-13 15:40:52 +02:00
Linus Groh
4ee965f916 LibJS: Add set_exception() and change throw_exception() to take a reference
Sometimes we just want to set m_exception to some value we stored
previously, without really "throwing" it again - that's what
set_exception() does now. Since we have clear_exception(), it does take
a reference, i.e. you don't set_exception(nullptr). For consistency I
updated throw_exception() to do the same.
2021-04-13 15:40:52 +02:00
Linus Groh
f2abe42ecb LibJS: Update empty TryStatement result value to undefined
It's what the spec wants us to do, although I'm not sure if it has an
observable effect anywhere, as we don't expose empty values. Let's do it
anyway.
2021-04-13 15:40:52 +02:00
Linus Groh
7cbede4342 LibJS: Fix return value of TryStatement with finalizer
Previously we would always return the result of executing the finalizer,
however the spec dictates the finalizer result must only be returned for
a non-normal completion.
I added some more comments along the way, which should make it more
clear what's going on - the unwinding and exception flow isn't super
straightforward here.
2021-04-13 15:40:52 +02:00
Linus Groh
e8cbcc2fbf LibJS: Replace two more uses of unwind(ScopeType::None) with stop_unwind()
Same thing, but a lot more clear.
2021-04-13 15:40:52 +02:00
Itamar
f52c3cabcf HackStudio: Add ClassView tab for viewing classes in a tree structure
This enables the user to view and navigate classes with a TreeView that
is updated by the LanguageServer as it parses the code.

It offers a new neat way to view the project's structure :^)
2021-04-13 15:16:27 +02:00
Itamar
5adfcd54d8 LanguageServers: Only notify client about updated declarations
If the declarations haven't changed since we last notified the client,
then there's no need to do so.
2021-04-13 15:16:27 +02:00
Itamar
667926df73 HackStudio: Store known symbol declarations in ProjectDeclarations
They were previously stored inside the Locator widget. I moved them to
the globally visible ProjectDeclarations class so they can also be used
by other widgets.
2021-04-13 15:16:27 +02:00
Itamar
b87791cada LibCpp: Add 'Namespace' and 'Member' declaration types 2021-04-13 15:16:27 +02:00
Itamar
c6c83bd80e HackStudio+LibCpp: Include class members in Locator 2021-04-13 15:16:27 +02:00
tuqqu
c8ad1df143 LibJS: Array.from mapFn fixes + thisArg support
* Callback mapFn now properly supports second argument (index)
* Support of thisArg to be passed as "this" in vm.call
* Tests for all cases
2021-04-13 15:16:16 +02:00
FalseHonesty
2ed5d19407 LibGUI+HackStudio: Add way to tell FilePicker to open a folder
This now means that when trying to open a folder, one can click on
the folder and press open instead of having to actually step into
the desired folder. Of course, it also means it won't let you open
non-directories anymore.
2021-04-13 15:16:07 +02:00