Bug 29257

Summary: Chromium needs to be able to inject its own storage event handler into StorageArea
Product: WebKit Reporter: Jeremy Orlow <jorlow>
Component: New BugsAssignee: Jeremy Orlow <jorlow>
Status: RESOLVED INVALID    
Severity: Normal CC: beidson, fishd
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch v1
none
Patch v1
none
Patch v1 fishd: review+, jorlow: commit-queue-

Description Jeremy Orlow 2009-09-14 15:01:09 PDT
Chromium needs to be able to inject its own storage event handler into StorageAreaImpl.  This is because the process the StorageAreaImpl runs in is not the same process that the events need to be dispatched to.
Comment 1 Jeremy Orlow 2009-09-14 15:10:09 PDT
Created attachment 39575 [details]
Patch v1
Comment 2 Darin Fisher (:fishd, Google) 2009-09-15 16:31:32 PDT
Comment on attachment 39575 [details]
Patch v1

> Index: WebCore/page/DOMWindow.cpp
...
> +    RefPtr<StorageArea> storageArea = page->group().localStorage()->storageArea(document->securityOrigin(), new StorageEventDispatcherImpl); 

I think it is generally better to use the Foo::create() pattern that returns
a PassRefPtr instead of passing a raw pointer.  That way the ownership exchange
is more clearly documented and enforced by the code.


> Index: WebCore/storage/StorageEventDispatcher.h

> +#include "PlatformString.h"
> +#include "StorageArea.h"
> +
> +#include <wtf/RefCounted.h>

nit: no new line after StorageArea.h


Otherwise, LG
Comment 3 Jeremy Orlow 2009-09-15 16:42:23 PDT
Created attachment 39622 [details]
Patch v1
Comment 4 Jeremy Orlow 2009-09-21 14:40:41 PDT
Created attachment 39879 [details]
Patch v1
Comment 5 Jeremy Orlow 2009-09-21 14:47:27 PDT
Fishd: Ugh....I accidentally re-uploaded which cleared the r+.  :-(  Sorry.
Comment 6 Jeremy Orlow 2009-09-24 18:22:12 PDT
https://bugs.webkit.org/show_bug.cgi?id=29655 is a better way to solve this.