Closed
Bug 1173324
Opened 9 years ago
Closed 8 years ago
Storage Inspector: Simplify the process of parent / child communication
Categories
(DevTools :: Storage Inspector, defect)
DevTools
Storage Inspector
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: miker, Assigned: miker)
References
Details
toolkit/devtools/server/actors/storage.js
> @@ +722,5 @@
> > + };
> > + this.removeCookieObservers = () => {
> > + Services.obs.removeObserver(this, "cookie-changed", false);
> > + Services.obs.removeObserver(this, "http-on-response-set-cookie", false);
> > + };
>
> That looks so hacky to define methods like this...
> I'm wondering if instead of doing that...
> we were just calling cookieHelpers directly.
> But. We would define cookieHelpers conditonally.
>
> let cookieHelpers = {
> // existing cookieHelpers definition
> };
> if (DebuggerServer.isInChildProcess) {
> const { sendSyncMessage, addMessageListener } =
> DebuggerServer.parentMessageManager;
> cookieHelper = {
> getCookiesFromHost: callParentProcess...,
> addObservers: ...,
> removeObservers: ...
> };
> // you would need to register the message listener in addObservers.
> }
> }
> }
>
> Note that you could get rid of maybeSetupChildProcess if you prefer. Or you
> could define this.cookieHelper instead of overriding the cookieHelper global.
>
I have spent a day playing around with this and other methods turn out just as hacky due to having to bind and manipulate contexts. This bug is a reminder to look into our options here.
Assignee | ||
Updated•9 years ago
|
Summary: Make storage inspector process communication less hacky → Storage Inspector: Simplify the process of parent / child communication
Assignee | ||
Comment 1•9 years ago
|
||
Spent a couple of days on this but it really is hard to improve upon the current setup.
I will come back to this at some time in the future.
Assignee | ||
Comment 2•8 years ago
|
||
A number of devs have looked at this over time and the truth is that the current setup is about the best we can do.
Assignee: nobody → mratcliffe
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•