Age | Commit message (Collapse) | Author |
|
It's missing query string parsing from new URLs, but you can set the
query string programmatically, and it will be part of the URL when
serialized through to_string().
|
|
Completing a relative URL based on a base URL seems like generally
useful functionality.
|
|
|
|
We were forgetting to adopt the WeakLink, causing a reference leak.
This ended up costing us one allocation per exec(), with this stack:
kmalloc_impl()
Inode::set_vmo()
InodeVMObject::create_with_inode()
Process::do_exec()
Process::exec()
Process::sys$execve()
This was a pain to track down, in the end I caught it by dumping out
every live kmalloc pointer between runs and diffing the sets. Then it
was just a matter of matching the pointer to a call stack and looking
at what went wrong. :^)
|
|
I'll be reconstructing parts of the VisualBuilder application here and
then we can retire VisualBuilder entirely once all the functionality
is available in HackStudio.
|
|
This removes an item from the vector and returns it.
|
|
Since NonnullRefPtr and NonnullOwnPtr cannot be null, it is pointless
to convert them to a bool, since it would always be true.
This patch makes it an error to null-check one of these pointers.
|
|
|
|
This is a hack to avoid failing AK unit tests because it didn't even
try to rebuild.
|
|
Whatever this was supposed to be, it was ironically... not implemented.
|
|
Let's arrange things like this instead. It didn't feel right for all of
the ELF handling code to live in AK.
|
|
This didn't end up getting used, so let's get rid of it.
|
|
It's too dang frustrating that we actually crash whenever we hit some
unimplemented printf specifier. Let's just log the whole format string
and carry on as best we can.
|
|
|
|
This returns a const T& for the first element in the queue, without
dequeuing it.
|
|
I got a warning when using '%Q' since that's non-standard. This patch
makes our printf family accept '%llu'.
|
|
Add dedicated internal types for Int64 and UnsignedInt64. This makes it
a bit more straightforward to work with 64-bit numbers (instead of just
implicitly storing them as doubles.)
|
|
This is just a wrapper around strstr() for now. There are many better
ways to search for a string within a string, but I'm just adding a nice
API at the moment. :^)
|
|
This is helpful for anyone who knows up-front how many items are gonna
be appended to the JsonArray.
|
|
Previously we would not run destructors for items in a CircularQueue,
which would lead to memory leaks.
This patch fixes that, and also adds a basic unit test for the class.
|
|
|
|
|
|
http:// URLs no longer include ":80" when serialized, since port 80 is
implied by the protocol. Non-standard ports are still serialized.
|
|
ELFLoader::layout() had a "failed" variable that was never set. This
patch checks the return value of each hook (alloc/map section and tls)
and fails the load if they return null.
I also needed to patch Process so that the alloc_section_hook and
map_section_hook actually return nullptr when allocating a region fails.
Fixes #664 :)
|
|
This class inherits from CircularQueue and adds the ability dequeue
from the end of the queue using dequeue_end().
Note that I had to make some of CircularQueue's fields protected to
properly implement dequeue_end.
|
|
|
|
This allows you to retrieve the length (in bytes) of the codepoint the
iterator is currently pointing at.
|
|
|
|
|
|
Use gcc built-in atomics
|
|
|
|
This kind of thing is a bit annoying. On Serenity, size_t is the same
size as u32, but not the same type. Because of "long" or whatever.
This patch makes String not complain about duplicate overloads.
|
|
Also add some setters since this class was very setter-less.
|
|
I don't love this, but I also don't love the Bitmap class in general.
|
|
|
|
We had two ways to get the data inside a ByteBuffer. That was silly.
|
|
Sometimes you want to trim a byte or two off the end.
|
|
The former allows you to inspect the string while it's being built.
It's an explicit method rather than `operator StringView()` because
you must remember you can only look at it in between modifications;
appending to the StringBuilder invalidates the StringView.
The latter lets you clear the state of a StringBuilder explicitly, to
start from an empty string again.
|
|
|
|
This simplifies the ownership model and makes Region easier to reason
about. Userspace Regions are now primarily kept by Process::m_regions.
Kernel Regions are kept in various OwnPtr<Regions>'s.
Regions now only ever get unmapped when they are destroyed.
|
|
Patch from Anonymous.
|
|
|
|
|
|
|
|
This reverts commit 26e81ad574d463faee19f5973108f80d0e02aaf6.
We forgot to consider UTF-8 here. String is UTF-8 and we need to be
careful about things like this.
|
|
`AK::String` can now be reversed via AK::String::reverse(). This makes
life a lot easier for functions like `itoa()`, where the output
ends up being backwards. Very much not like the normal STL
(which requires an `std::reverse` object) way of doing things.
A call to reverse returns a new `AK::String` so as to not upset any
of the possible references to the same `StringImpl` shared between
Strings.
|
|
|
|
|
|
This fixes the goofy issue with %p coming out as " 0x123" instead
of "0x00000123".
|
|
|