Bug 148191

Summary: Web Inspector: Uncaught exception in inspector page while handling event DOMStorage.domStorageItemRemoved
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: DoNotImportToRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2015-08-19 14:24:22 PDT
* SUMMARY
Occasionally I see this uncaught exception:
CONSOLE ERROR Uncaught exception in inspector page while handling event DOMStorage.domStorageItemRemoved: TypeError: null is not an object (evaluating 'this._domStorageForIdentifier(storageId).itemRemoved') 

* STEPS TO REPRODUCE
1. Inspect twitter.com
2. Navigate to daringfireball.net
3. Navigate back to twitter.com
4. Navigate forward to daringfireball.net
  => uncaught exception

* EXCEPTION
CONSOLE ERROR Uncaught exception in inspector page while handling event DOMStorage.domStorageItemRemoved:  TypeError: null is not an object (evaluating 'this._domStorageForIdentifier(storageId).itemRemoved') itemRemoved@WebInspectorUI.framework/Resources/Controllers/StorageManager.js:114:49
domStorageItemRemoved@WebInspectorUI.framework/Resources/Protocol/DOMStorageObserver.js:50:48
dispatchEvent@WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:380:42
_dispatchEvent@WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:279:32
dispatch@WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:87:32
dispatchNextQueuedMessageFromBackend@WebInspectorUI.framework/Resources/Protocol/MessageDispatcher.js:42:34

* NOTES
- StorageManager had already reset its domStorageObjects
- The domStorageItemRemoved has a storageId of {securityOrigin:"twitter.com", localStorage:true}, key = "ScribeTransport"} but the StorageManager only has local + session storages for daringfireball.net
Comment 1 Joseph Pecoraro 2015-08-19 14:26:16 PDT
Created attachment 259405 [details]
[PATCH] Proposed Fix
Comment 2 BJ Burg 2015-08-19 14:45:04 PDT
Comment on attachment 259405 [details]
[PATCH] Proposed Fix

r=me

Good catch!
Comment 3 WebKit Commit Bot 2015-08-19 15:30:13 PDT
Comment on attachment 259405 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 259405

Committed r188655: <http://trac.webkit.org/changeset/188655>
Comment 4 WebKit Commit Bot 2015-08-19 15:30:17 PDT
All reviewed patches have been landed.  Closing bug.