When you request RESULT_TYPE_VISIT from query options, you will get this
 interface for each item, which includes the session ID so that we can
 group items from the same session together.
[scriptable, uuid(8e2c5a86-b33d-4fa6-944b-559af7e95fcd)]
interface nsINavHistoryVisitResultNode : nsINavHistoryResultNode

Attributes

 This indicates the session ID of the * visit. This is used for session
 grouping when a tree view is sorted by date.
readonly attribute long long sessionId