Bug 29257 - Chromium needs to be able to inject its own storage event handler into StorageArea
Summary: Chromium needs to be able to inject its own storage event handler into Storag...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jeremy Orlow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-14 15:01 PDT by Jeremy Orlow
Modified: 2009-09-24 18:22 PDT (History)
2 users (show)

See Also:


Attachments
Patch v1 (41.58 KB, patch)
2009-09-14 15:10 PDT, Jeremy Orlow
no flags Details | Formatted Diff | Diff
Patch v1 (41.81 KB, patch)
2009-09-15 16:42 PDT, Jeremy Orlow
no flags Details | Formatted Diff | Diff
Patch v1 (44.77 KB, patch)
2009-09-21 14:40 PDT, Jeremy Orlow
fishd: review+
jorlow: commit-queue-
Details | Formatted Diff | Diff

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