Skip to content
Commit 2237adc1 authored by Michael Catanzaro's avatar Michael Catanzaro
Browse files

Fix theoretical race condition in ephy_history_service_add_visit_row

The design of the history service feels like one big footgun. I'm really
not sure why a history thread is necessary at all, or why we have
longstanding transactions (defeating the entire purpose of transactions)
instead of just using autocommit, which I think would be sufficient for
everything we do.

This commit doesn't fix any of that. That's just a rant. This commit
just fixes one theoretical race condition. Prepared statements lock the
database and need to be finalized BEFORE commit. The current code only
works if the prepared statement is finalized on the UI thread before the
scheduled commit occurs on the history thread. Which is probably always,
but let's not leave it to luck.

I could see this leading to a small loss of the last bit of history when
closing the browser.

https://bugzilla.gnome.org/show_bug.cgi?id=778649
parent cd99a05a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment