summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-08Meta: Add script that runs all lintsBen Wiederhake
2020-11-08LibWeb: Use the system theme's button text color for <input> buttonsAndreas Kling
2020-11-08LibC: Add two little assertions in malloc() and malloc_size()Andreas Kling
2020-11-08UserspaceEmulator: Fix busted backtraces with --report-to-debugAndreas Kling
Some of the output was still going to stderr in this mode, we need to use reportln() to make sure it goes to the right place.
2020-11-08LibDebug: Handle the "set ISA" standard opcodeAndreas Kling
I don't know what to do with this information, but let's at least skip over the opcode instead of asserting.
2020-11-08LibDebug: Handle AttributeDataForm::SData (DW_FORM_sdata)Andreas Kling
This is a LEB128-encoded signed constant.
2020-11-08UserspaceEmulator: Don't audit accesses within realloc(), malloc_size()Andreas Kling
These functions access malloc-related memory outside of UE's accounting boundaries, so just ignore them.
2020-11-07LibCore: Run clang-format on ArgsParser.cppAndreas Kling
2020-11-07Kernel: Update TimeManagement::m_epoch_time directly in ↵Nico Weber
increment_time_since_boot
2020-11-07LibCore: Add an ArgsParser::add_option() overload for doublesNico Weber
2020-11-07AK: Remove duplicate begin()/end() methodsNico Weber
begin()/end() returning a ConstItertor already exist further up in this file. Nothing uses these redundant versions, and they are not callable.
2020-11-07Documentation: Update required GCC version to >= 10Linus Groh
I initially thought as long as Lagom is not built >= 9 would be fine, but LagomCore is always built for the code generators.
2020-11-07LibWeb: Restrict HTML form submissions to permitted URL protocolsBrendan Coles
Form submissions to file:// URLs are now permitted only if the submitting document is also a file:// URL and the form method is "get". Form submissions to URLs with a http(s):// URL protocol are permitted. Form submissions for all other URL protocols are rejected.
2020-11-07Ext2FS: Zero out inode metadata when deleting themAndreas Kling
This isn't strictly necessary but it seems like a reasonable thing to be doing. Note that we still populate the dtime field with the time of deletion.
2020-11-07Ext2FS: Deallocate block list meta blocks when freeing an inodeAndreas Kling
When computing the list of blocks to deallocate when freeing an inode, we would stop collecting blocks after reaching the inode's block count. Since we're getting rid of the inode, we need to also include the meta blocks used by the on-disk block list itself.
2020-11-07LibGfx: Remove debug spam about successful font lookupsAndreas Kling
2020-11-07LibJS: Use regular stack for VM call frames instead of Vector storageAndreas Kling
Keeping the VM call frames in a Vector could cause them to move around underneath us due to Vector resizing. Avoid this issue by allocating CallFrame objects on the stack and having the VM simply keep a list of pointers to each CallFrame, instead of the CallFrames themselves. Fixes #3830. Fixes #3951.
2020-11-07LibWeb: Reject iframing file:// URLs if document is not a file:// URLBrendan Coles
2020-11-07Lagom/Fuzzers: Add Fuzzilli version of FuzzJsLuke
Fuzzilli is a JavaScript engine fuzzer made by googleprojectzero. https://github.com/googleprojectzero/fuzzilli/
2020-11-07LibJS: Remove unused variable m_has_property_table in ShapeLuke
2020-11-07LibJS: Use pow instead of __bulitin_pow on clangLuke
__bulitin_pow doesn't seem to exist on clang, at least it didn't build with it.
2020-11-07LibJS: Use element index as key for array spread in objectLinus Groh
This fixes spreading of arrays with holes in object literals where the inserted keys are not consecutive numbers. Fixes #3967.
2020-11-07LibJS: Set prototype of GlobalObject to ObjectPrototypeLinus Groh
As the global object is constructed and initialized in a different way than most other objects we were not setting its prototype! This made things like "globalThis.toString()" fail unexpectedly.
2020-11-07LibJS: Don't create StringOrSymbol(String) if from_value() failsLinus Groh
If value.to_string() throws an exception and returns a null string we must create an invalid StringOrSymbol, not one from the null string (which ASSERT()s).
2020-11-07LibWeb: Load favicon.ico only for http/https URLsBrendan Coles
2020-11-07LibJS: Skip trailing empty values in IndexedPropertyIteratorLinus Groh
When we reach the end of the pre-computed indices vector we can just skip to the end (array-like size) as only empty values will follow. Fixes #3970.
2020-11-06Kernel: Fix HPET timer not firing in BochsTom
* Change the register structures to use the volatile keyword explicitly on the register values. This avoids accidentally omitting it as any access will be guaranteed volatile. * Don't assume we can read/write 64 bit value to the main counter and the comparator. Not all HPET implementations may support this. So, just use 32 bit words to access the registers. This ultimately works around a bug in Bochs 2.6.11 that loses 32 bits of a 64 bit write to a timer's comparator register (it internally writes one half and clears the Tn_VAL_SET_CNF bit, and then because it's cleared it fails to write the second half). * Properly calculate the tick duration in calculate_ticks_in_nanoseconds * As per specification, changing the frequency of one periodic timer requires a restart of all periodic timers as it requires the main counter to be reset.
2020-11-06LibGUI: Clip rubber band to IconView widget content areaJoseph Bywater
Add a clip rect for the rubber band painter of widget_inner_rect This ensures the rubber band is not drawn over the scrollbars. Fixes #3926
2020-11-06LibJS: Handle circular references in Array.prototype.toLocaleString()Linus Groh
Also use ArmedScopeGuard for removing seen objects to account for early returns. Fixes #3963.
2020-11-06LibGUI: Fix AbstractView selection after initial focusin eventJoseph Bywater
After moving the cursor to the home position, clear the selection. Fixes #3925.
2020-11-05LibJS: Use array-like size for IndexedProperties::is_empty()Linus Groh
Some things, like (the non-generic version of) Array.prototype.pop(), check is_empty() to determine whether an action, like removing elements, can be performed. We need to know the array-like size for that, not the size of the underlying storage, which can be different - and is not something IndexedProperties should expose so I removed its size(). Fixes #3948.
2020-11-05LibJS: Fix Object::delete_property() with numeric string propertyLinus Groh
- We have to check if the property name is a string before calling as_string() on it - We can't as_number() the same property name but have to use the parsed index number Fixes #3950.
2020-11-05LibJS: ASSERT(property_name.is_valid()) in more Object methodsLinus Groh
2020-11-05AK: printf was not accounting for plus sign with "%+d"Andreas Kling
We have to include the plus sign in the number of characters written, otherwise sprintf() will put the null terminator too early.
2020-11-05Base: Tweak CXXFLAGS for the "little" test projectsAndreas Kling
Let's build with -std=c++2a since we're C++20 nowadays. :^)
2020-11-05AK: Always include <new> from compiler before our operators newAndreas Kling
We had competing inline definitions of the placement operators new. Avoid this by having <AK/kmalloc.h> pull in <new> from the compiler and always using their definitions instead. I feel like there must be an elegant solution to this whole situation with the operators, but I'm not sure what it is.
2020-11-04LibJS: Fix ProxyObject get/set with symbol property nameLinus Groh
We can't assume that property names can be converted to strings anymore, as we have symbols. Use name.to_value() instead. This makes something like this possible: new Proxy(Object, { get(t, p) { return t[p] } })[Symbol.hasInstance]
2020-11-04LibJS: Replace a bunch of vm() calls in ProxyObject with referenceLinus Groh
This was probably a result of search & replace, it's quite ridiculous in some places. Let use the existing pattern of getting a reference to the VM once at each function start consistently.
2020-11-04LibJS: Implement Object(value) constructorLinus Groh
Not sure why we didn't have this yet, it's super simple :^)
2020-11-04Revert "Kernel: Implement an asynchronous device request stack"Andreas Kling
This reverts commit 2fd5ce1eb06e5cbbb180cba64a567e99f0cd846c. This broke booting without SMP. (PR was #3921)
2020-11-04LibGfx: Load the system default fonts by nameAndreas Kling
Instead of loading them by absolute path, that is.
2020-11-04Kernel: Implement an asynchronous device request stackTom
This allows issuing asynchronous requests for devices and waiting on the completion of the request. The requests can cascade into multiple sub-requests. Since IRQs may complete at any time, if the current process is no longer the same that started the process, we need to swich the paging context before accessing user buffers. Change the PATA driver to use this model.
2020-11-04Kernel: Remove dead code from BlockDeviceTom
2020-11-04Kernel: Defer kmalloc heap contractionTom
Because allocating/freeing regions may require locks that need to wait on other processors for completion, this needs to be delayed until it's safer. Otherwise it is possible to deadlock because we're holding the global heap lock.
2020-11-04Kernel: Add mechanism to queue deferred function callsTom
Function calls that are deferred will be executed before a thread enters a pre-emptable state (meaning it is not in a critical section and it is not in an irq handler). If it is not already in such a state, it will be called immediately. This is meant to be used from e.g. IRQ handlers where we might want to block a thread until an interrupt happens.
2020-11-04Chess: Add missing default config file in .config :^)Jesse Buhagiar
Following 9f8a8e07c2d25009268830c51f58c052a8f6936b, let's add a default `.ini` to prevent `unveil` from failing.
2020-11-04Minesweeper+Snake: load config file before calling unveil()Brendan Coles
2020-11-04LibJS: Handle circular references in Array.prototype.join()Linus Groh
This fixes Array.prototype.{join,toString}() crashing with arrays containing themselves, i.e. circular references. The spec is suspiciously silent about this, and indeed engine262, a "100% spec compliant" ECMA-262 implementation, can't handle these cases. I had a look at some major engines instead and they all seem to keep track or check for circular references and return an empty string for already seen objects. - SpiderMonkey: "AutoCycleDetector detector(cx, obj)" - V8: "CycleProtectedArrayJoin<JSArray>(...)" - JavaScriptCore: "StringRecursionChecker checker(globalObject, thisObject)" - ChakraCore: "scriptContext->CheckObject(thisArg)" To keep things simple & consistent this uses the same pattern as JSONObject, MarkupGenerator and js: simply putting each seen object in a HashTable<Object*>. Fixes #3929.
2020-11-04LibJS: Use "," separator in Array.prototype.join() if first arg is undefinedLinus Groh
This is how the spec describes it, not "if the first arg is missing". Also swap length & separator steps to match spec.
2020-11-04AK::URL: Check if URL requires a port set to be considered a valid URLBrendan Coles
`AK::URL` will now check if the URL requires a port to be set using `AK::URL.protocol_requires_port(protocol)`. If the URL does not specify a port, and no default port for the URL protocol is found with `AK::URL.default_port_for_protocol(protocol)`, the URL is considered to be invalid.