Bug 80903

Summary: Web Inspector: InspectorDOMStorageAgent creates a Storage object which is a DOMWindowProperty - Should use the StorageArea directly
Product: WebKit Reporter: Brady Eidson <beidson>
Component: Web Inspector (Deprecated)Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 34679    
Attachments:
Description Flags
Make it use the StorageArea directly timothy: review+, timothy: commit-queue-

Description Brady Eidson 2012-03-12 15:56:20 PDT
Web Inspector: InspectorDOMStorageAgent creates a Storage object which is a DOMWindowProperty - Should use the StorageArea directly

DOMWindowProperties are a mechanism for registering with the DOMWindow which has one specific lifetime.

WebInspector resources have a completely distinct lifetime, and should not be instantiating DOMWindowProperties.

It seems that there is no reason the Inspector resource couldn't use the StorageArea directly.

This was discovered while fixing https://bugs.webkit.org/show_bug.cgi?id=34679 and is currently blocking it.
Comment 1 Brady Eidson 2012-03-12 16:12:56 PDT
Created attachment 131437 [details]
Make it use the StorageArea directly
Comment 2 WebKit Review Bot 2012-03-12 16:14:58 PDT
Attachment 131437 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/inspector/InspectorDOMStorageResource.h:43:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Timothy Hatcher 2012-03-12 16:15:45 PDT
Comment on attachment 131437 [details]
Make it use the StorageArea directly

View in context: https://bugs.webkit.org/attachment.cgi?id=131437&action=review

> Source/WebCore/inspector/InspectorDOMStorageAgent.cpp:115
> +    Frame* frame = storageResource->frame();
>      if (storageResource) {

These lines need flipped so the Frame is inside the null check. Fix before landing.
Comment 4 Brady Eidson 2012-03-12 16:34:58 PDT
http://trac.webkit.org/changeset/110500