RESOLVED FIXED 99370
Inspector: Don't trip assert when inspecting an empty db
https://bugs.webkit.org/show_bug.cgi?id=99370
Summary Inspector: Don't trip assert when inspecting an empty db
David Grogan
Reported 2012-10-15 14:38:33 PDT
Inspector: Don't fire assert when inspecting an empty db
Attachments
Patch (2.40 KB, patch)
2012-10-15 14:38 PDT, David Grogan
no flags
Patch for landing (1.63 KB, patch)
2012-10-16 14:00 PDT, David Grogan
no flags
David Grogan
Comment 1 2012-10-15 14:38:49 PDT
David Grogan
Comment 2 2012-10-15 15:21:34 PDT
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.
Joshua Bell
Comment 3 2012-10-15 15:36:40 PDT
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.)
Vsevolod Vlasov
Comment 4 2012-10-16 01:05:31 PDT
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.
Vsevolod Vlasov
Comment 5 2012-10-16 01:05:45 PDT
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.
David Grogan
Comment 6 2012-10-16 14:00:02 PDT
Created attachment 169018 [details] Patch for landing
David Grogan
Comment 7 2012-10-16 14:00:45 PDT
(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.
WebKit Review Bot
Comment 8 2012-10-16 15:00:37 PDT
Comment on attachment 169018 [details] Patch for landing Clearing flags on attachment: 169018 Committed r131511: <http://trac.webkit.org/changeset/131511>
WebKit Review Bot
Comment 9 2012-10-16 15:00:43 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.