I am editing the answer, as i didn't noticed you already saw that link. but, the same work around works for me. I am initially asking for 1 MB of space and then it works properly.
var db=openDatabase('PermissionDatabase', '1.0', 'PermissionDB', 1 * 1024 * 1024);
As per your answer, it worked initially, try resetting safari to delete all the previous permissions granted and then try again.