Created attachment 315783 [details] example html file which reproduces (requires dexie.js to be alongside) Description After restarting MiniBrowser it can no longer open IndexedDB databases created in the previous invocation Steps To Repeat 1. Start minibrowser 2. Open example.html 3. Click Ok on Nicolas' shoe size. 4. Close minibrowser 5. Open minibrowser 6. Open example.html Expected Behavior See Nicolas' shoe size Actual Behavior Displays an alert with: --------------------------- JavaScript Alert --------------------------- Ooops: OpenFailedError: UnknownError An unknown error occurred within Indexed Database. --------------------------- OK ---------------------------
Created attachment 315784 [details] The Dexie.js dependency on the example Required to use example.html
Stepping through the debugger, using my application code (which is similar to the example above, except that the datastore is called 'events' and the keypath is 'eventid'. It looks like it fails in WebCore\Modules\indexeddb\server\IDSerialization.cpp line 72, in deserializeIDBKeyPath. This is because decoder->decodeEnum("type") returns false. Investigating even further I stepped through the KeyedDecoder::decoder constructor and it failed to correctly parse the provided data as a binary plist. However copying the data from the debugger and providing it to plutil, verified that the plist was valid. For reference the hex (from the debugger) is the following: 62 70 6c 69 73 74 30 30 d2 01 02 03 04 54 74 79 70 65 56 73 74 72 69 6e 67 10 01 57 65 76 65 6e 74 49 64 08 0d 12 19 1b 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 23 After using a hex editor to place that in a file, then using plutil -lint it returns: keypath.plist: OK And using plutil -p returns: { "type" => 1 "string" => "eventId" }
Nobody has made an effort to confirm the serialization and deserialization work on Windows. They work fine on Mac, iOS, and Linux.