Source Activity

Add a croissant icon

Mon, 2014-08-11 14:15
Add a croissant icon

Just because I'm hungry, inspired by a drawing from
Bruny Bellamy:
http://brunobellamy.tumblr.com/post/94366925615
Categories: Development

gopher: Resolve TODO

Mon, 2014-08-11 13:26
gopher: Resolve TODO
Categories: Development

exfat: Add missing locking around SplayTree lookup/insertion.

Sun, 2014-08-10 20:18
exfat: Add missing locking around SplayTree lookup/insertion.

A lookup in a splay tree does move the looked up entry to the root of
the tree. This means the tree structure is modified on lookup alone.
Obviously the tree structure is also modified when inserting new nodes.

For both of these reasons access to the f{Node|Ino}Tree needs to be
locked on lookup and insert.

Fixes crashes when the tree is concurrently modified by multiple threads
accessing the same exfat volume.

In addition this protects the fNextId field that hands out new inode
ids.
Categories: Development

Tracker: re-add includes that were lost during merge

Sun, 2014-08-10 20:16
Tracker: re-add includes that were lost during merge
Categories: Development

Tracker: Throw exception on assert failure

Sun, 2014-08-10 19:07
Tracker: Throw exception on assert failure

... in situations where a NULL pointer dereference was vital to the
functioning of the method we use a stronger assert that throws an
exception on failure. This is accomplished by a new method in
Utilities.cpp, ThrowOnAssert().

None of these conditions should ever be true, if they are it means that
the code is written improperly and would have resulted in a NULL
dereference and undefined behavior (most likely a crash) before.

Most instances of ThrowOnAssert() either replace an ASSERT followed
by a dereference or an early return that covered the error.

Also remove _ThrowOnErrorWithMessage() which wasn't being used.
Categories: Development

Tracker: Add NULL checks and ASSERTs

Sun, 2014-08-10 19:07
Tracker: Add NULL checks and ASSERTs

To prevent recoverable NULL pointer dereferences. Dereferencing a
NULL pointer is undefined behavior and should be avoided.

Unrecoverable NULL checks will be dealt with in the next commit.
Categories: Development

Tracker: Don't need to cast to BWindow here

Sun, 2014-08-10 19:07
Tracker: Don't need to cast to BWindow here
Categories: Development

Tracker: code simplication, don't check if NULL

Sun, 2014-08-10 19:07
Tracker: code simplication, don't check if NULL

just pass in NULL, that's what is happening anyway.
Categories: Development

Tracker: Use main screen if window is NULL

Sun, 2014-08-10 19:07
Tracker: Use main screen if window is NULL

Here we try to determine the screen frame of screen that the window is on,
use the main screen when window is NULL.
Categories: Development

Tracker: small code simplication

Sun, 2014-08-10 19:07
Tracker: small code simplication

Use std::max() to avoid comparison and turn into 1-liner.
Categories: Development

Tracker: style fixes

Sun, 2014-08-10 19:06
Tracker: style fixes

No functional changes intended.
Categories: Development

Tracker: Refactor size calc to use a BString

Sun, 2014-08-10 19:06
Tracker: Refactor size calc to use a BString

By using a BString we can keep track of the string length instead of
calculating the length after hoping that sprintf() works or