summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-06Kernel: Don't allocate so much when generating coredumpsAndreas Kling
Instead of creating a bunch of ByteBuffers and concatenating them to generate the "notes" segment, we now simply create a KBufferBuilder and tell each of the notes generator helpers to write into the builder. This allows the code to flow more naturally, with some bonus additional error propagation. :^)
2021-09-06Kernel: Make SysFS and ProcFS generator functions return KResultAndreas Kling
This allows us to propagate a whole bunch of KBufferBuilder errors.
2021-09-06Kernel: Make KBufferBuilder::append() & friends return KResultAndreas Kling
This allows callers to react to a failed append (due to OOM.)
2021-09-06AK: Make Json{Array,Object}Serializer ignore append() return valuesAndreas Kling
This is in preparation for making KBufferBuilder::append() and friends return a KResult. Long-term we should come up with a solution that works for both kernel and userspace clients of the JSON API.
2021-09-06Kernel: Tidy up Coredump constructionAndreas Kling
- Use KResultOr and TRY to propagate errors - Return more specific errors now that they have a path out from here
2021-09-06Kernel: Use TRY() in CoredumpAndreas Kling
2021-09-06Kernel: Rename ProcessPagingScope => ScopedAddressSpaceSwitcherAndreas Kling
2021-09-06Kernel: Improve API names for switching address spacesAndreas Kling
- enter_space => enter_address_space - enter_process_paging_scope => enter_process_address_space
2021-09-06Kernel: Allocate signal trampoline before committing to a sys$execve()Andreas Kling
Once we commit to a new executable image in sys$execve(), we can no longer return with an error to whoever called us from userspace. We must make sure to surface any potential errors before that point. This patch moves signal trampoline allocation before the commit. A number of other things remain to be moved.
2021-09-06Kernel: Use TRY() more in sys$execve()Andreas Kling
I just keep finding more and more places to make use of this. :^)
2021-09-06Kernel: Use TRY() in find_elf_interpreter_for_executable()Andreas Kling
2021-09-06Kernel: Improve find_elf_interpreter_for_executable() parameter namesAndreas Kling
2021-09-06LibWeb+WebContent: Remove old console-logging IPC callsSam Atkins
This patch removes the following WebContent IPC calls, which are no longer used: - `Server::js_console_initialize()` - `Client::did_js_console_output()`
2021-09-06Browser+WebContent: Initialize WebContentConsoleClient earlierSam Atkins
With this patch, we now initialize the `WebContentConsoleClient` as soon as the Page has loaded, instead of waiting for the Console Window to be shown. This finally lets us see log messages that happened before the window was opened! :^) However, it is not perfect. Waiting until the page has loaded means we lose any messages that happen *during* page load. Ideally we would initialize the WCCC when the page *starts* loading instead, but it requires that the page has a document and interpreter assigned and accessible. As far as I can tell with my limited knowledge, this is not the case until the page has completed loading.
2021-09-06Browser: Convert JS ConsoleWidget to new APISam Atkins
The console widget now requests messages and receives them in bulk, using the shiny new IPC calls. This lets it display console messages that occurred before the widget was created. :^)
2021-09-06WebContent: Store messages in WebContentConsoleClientSam Atkins
The `WebContentConsoleClient` now keeps a list of console messages it has received, so these are not lost if the ConsoleWidget has not been initialized yet. This change does break JS console output, but only until the next commit. :^)
2021-09-06LibWeb+WebContent: Add new console-message IPC callsSam Atkins
This patch introduces three new IPC calls for WebContent: - `Client::did_output_js_console_message(index)`: Notifies the client that a new console message was logged. - `Server::js_console_request_messages(start_index)`: Ask the server for console messages starting at the given index. - `Client::did_get_js_console_messages(start_index, types, messages)`: Send the client the messages they requested. This mechanism will replace the current `Client::did_js_console_output()` call in the next few commits. This will allow us to display messages in the console that happened before the console was opened.
2021-09-06WebContent: Implement `$0` special variable in Browser JS ConsoleSam Atkins
`$0` is a helpful variable in other browsers' JS consoles, which points to whichever DOM Node is currently selected in the DOM Inspector. And now we have it too! :^)
2021-09-06WebContent: Implement ConsoleGlobalObject which proxies to WindowObjectSam Atkins
ConsoleGlobalObject is used as the global object when running javascript from the Browser console. This lets us implement console-only functions and variables (like `$0`) without exposing them to webpage content. It passes other calls over to the usual WindowObject so any code that would have worked in the webpage will still work in the console. :^)
2021-09-06Browser: Reconnect the JS console when the current page changesSam Atkins
Previously, it would keep a pointer to the interpreter of the previous page, which resulted in Crashy Fun Times. This also changes the clearing behavior - instead of clearing the console output every time the window is shown, we clear it when the page changes. This is more useful, since before you would lose any log messages that had happened before opening the window.
2021-09-06Browser: Move `show_console_window()` to TabSam Atkins
Having the BrowserWindow assigning Tab's internals felt a bit wrong. This is also a step towards removing BrowserWindow as a friend class. While I was at it, changed the Tab to having a pointer to the ConsoleWidget instead of the Window, since that is usually what we want to use, and it's awkward having to static_cast the main-widget repeatedly.
2021-09-06Browser: Delete unused BrowserConsoleClient.{h,cpp}Sam Atkins
Since the Browser now only runs in multi-process mode, we have no use for this single-process ConsoleClient. :^)
2021-09-06Keyboard Mapper: Better text color for buttons in dark themeAnders Fimreite
When using a dark theme the name of the key does not show up well at all. This is due to it being set with pallete().button_text(), which for dark themes is a light color. As Keyboard Mapper does not follow the system color theme, the text on the keys should not either.
2021-09-06LibGUI: Dynamically resize editing content rect in IconViewMarcus Nilsson
This makes IconView aware of the text width of the ModelEditingDelegate widget when editing an index and allows us to resize the content rect as needed. This also removes the border from the textbox since it could collide with the icon in ColumnsView. While editing we also skip painting the inactive selection rect since it would otherwise show when the content rect gets smaller.
2021-09-06LibJS: Implement ECMA-402 String.prototype.toLocale{Lower,Upper}CaseTimothy Flynn
2021-09-06LibJS: Only remove Unicode locale extensions during the LookupMatcher AOTimothy Flynn
This was one of the first AOs used for Intl, and I misinterpreted the spec. Rather than removing all extensions, we must only remove Unicode locale extensions. Also use LocaleID::to_string() here instead of the heavier canonical string method, because the locale is already canonical.
2021-09-06LibUnicode+LibJS: Return removed extensions from remove_extension_typeTimothy Flynn
Some callers will need to hold onto the removed extensions.
2021-09-06LibUnicode: Implement locale-aware BEFORE_DOT special casingTimothy Flynn
Note that the algorithm in the Unicode spec is for checking that a code point precedes U+0307, but the special casing condition NotBeforeDot is interested in the inverse of this rule.
2021-09-06LibUnicode: Implement locale-aware MORE_ABOVE special casingTimothy Flynn
2021-09-06LibUnicode: Implement locale-aware AFTER_SOFT_DOTTED special casingTimothy Flynn
2021-09-06LibUnicode: Implement locale-aware AFTER_I special casingTimothy Flynn
2021-09-06LibUnicode: Ensure case conversion methods increment the current indexTimothy Flynn
There was one branch in these methods (the branch where a special casing was found) that neglected to update the current index.
2021-09-06LibUnicode: Sort special casing array by locale specificityTimothy Flynn
This is to simply the Default Case Conversion implementation. Otherwise, the implementation would need to determine which special casing rule to apply, instead of just picking the first match.
2021-09-06LibUnicode: Add public wrapper for the generated locale_from_stringTimothy Flynn
2021-09-06LibUnicode: Generate canonical combining class in Unicode dataTimothy Flynn
Will be used by special casing rules.
2021-09-06LibRegex: Avoid keeping track of checkpoints across forksAli Mohammad Pur
Doing so would increase memory consumption by quite a bit, since many useless copies of the checkpoints hashmap would be created and later thrown away.
2021-09-06Kernel: Don't turn I/O errors during sys$execve() into ENOEXECAndreas Kling
Instead, just propagate whatever the real error was.
2021-09-06Kernel: Improve arguments retrieval error propagation in sys$execve()Andreas Kling
Instead of turning any arguments related error into an EFAULT, we now propagate the innermost error during arguments retrieval.
2021-09-06Kernel: Use KResultOr and TRY() for {Shared,Private}InodeVMObjectAndreas Kling
2021-09-06Kernel: Make Memory::Region::map() return KResultAndreas Kling
..and use TRY() at the call sites to propagate errors. :^)
2021-09-06Kernel: Make Threads always have a nameAndreas Kling
We previously allowed Thread to exist in a state where its m_name was null, and had to work around that in various places. This patch removes that possibility and forces those who would create a thread (or change the name of one) to provide a NonnullOwnPtr<KString> with the name.
2021-09-06Kernel: Improvements to Custody absolute path serializationAndreas Kling
- Renamed try_create_absolute_path() => try_serialize_absolute_path() - Use KResultOr and TRY() to propagate errors - Don't call this when it's only for debug logging
2021-09-06Kernel/USB: Use TRY() and adopt_nonnull_own_or_enomem() some moreAndreas Kling
2021-09-06Kernel: Use TRY() in sys$alarm()Andreas Kling
2021-09-06Kernel/Ext2FS: Wrap calls to traverse_as_directory() in TRY()Andreas Kling
Nothing says we can't TRY() a multi-line function call. :^)
2021-09-06Kernel: Use TRY() more in Plan9FSAndreas Kling
2021-09-06Kernel: Tidy up Plan9FS construction a bitAndreas Kling
2021-09-06Kernel: Tidy up Ext2FS construction a bitAndreas Kling
2021-09-06Kernel: Tidy up SysFS constructionAndreas Kling
- Use KResultOr and TRY() to propagate errors - Check for OOM errors - Move allocation out of constructors There's still a lot more to do here, as SysFS is still quite brittle in the face of memory pressure.
2021-09-06Kernel: Tidy up DevFS construction and handle OOM errorsoAndreas Kling
- Use KResultOr and TRY() to propagate errors - Check for OOM - Move allocations out of the DevFS constructor