Inspector: Don't fire assert when inspecting an empty db
Created attachment 168787 [details] Patch
Josh, could you take a look at this? Vsevik, could you review this? This fixes the assert I get when running with epg's idb directory in a debug build of chrome. After I fixed that I noticed that the inspector was printing errors: [22373:22373:1015/141603:ERROR:CONSOLE(828)] "Uncaught TypeError: Cannot read property 'databaseId' of undefined", source: chrome-devtools://devtools/devtools.html?docked=true&dockSide=bottom&toolbarColor=rgba(242,241,240,1)&textColor=rgba(76,76,76,1) (828) The js change stops those from spewing but I don't how this._database isn't initialized before the call to select.
Comment on attachment 168787 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168787&action=review > Source/WebCore/inspector/InspectorIndexedDBAgent.cpp:107 > + virtual void onUpgradeNeeded(int64_t, PassRefPtr<WebCore::IDBTransactionBackendInterface>, PassRefPtr<WebCore::IDBDatabaseBackendInterface>) OVERRIDE { } LGTM. > Source/WebCore/inspector/front-end/ResourcesPanel.js:1659 > + // FIXME: Why does this happen sometimes? But since IDB is async and this._database is populated in update() in response to _indexedDBLoaded() firing, perhaps the selection can be set earlier programmatically? (This is really a question for the Inspector folks.)
Could you please use http://webkit.org/new-inspector-bug to report inspector bugs? We use this link to automatically select correct component and add folks to the cc.
Comment on attachment 168787 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168787&action=review >> Source/WebCore/inspector/front-end/ResourcesPanel.js:1659 >> + // FIXME: Why does this happen sometimes? > > But since IDB is async and this._database is populated in update() in response to _indexedDBLoaded() firing, perhaps the selection can be set earlier programmatically? > > (This is really a question for the Inspector folks.) This is just hiding the manifestation of the problem without fixing it. Please revert before landing. I filed https://bugs.webkit.org/show_bug.cgi?id=99434 for that issue, I can fix it myself.
Created attachment 169018 [details] Patch for landing
(In reply to comment #4) > Could you please use http://webkit.org/new-inspector-bug to report inspector bugs? We use this link to automatically select correct component and add folks to the cc. Sure, thanks for letting me know.
Comment on attachment 169018 [details] Patch for landing Clearing flags on attachment: 169018 Committed r131511: <http://trac.webkit.org/changeset/131511>
All reviewed patches have been landed. Closing bug.