Bug 80903 - Web Inspector: InspectorDOMStorageAgent creates a Storage object which is a DOMWindowProperty - Should use the StorageArea directly
Summary: Web Inspector: InspectorDOMStorageAgent creates a Storage object which is a D...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks: 34679
  Show dependency treegraph
 
Reported: 2012-03-12 15:56 PDT by Brady Eidson
Modified: 2012-03-12 16:34 PDT (History)
11 users (show)

See Also:


Attachments
Make it use the StorageArea directly (6.71 KB, patch)
2012-03-12 16:12 PDT, Brady Eidson
timothy: review+
timothy: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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