Closed
Bug 1140242
Opened 10 years ago
Closed 10 years ago
Don't try to send nsILoginInfo between processes
Categories
(Toolkit :: Password Manager, defect)
Toolkit
Password Manager
Tracking
()
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: MattN, Assigned: MattN)
References
Details
Attachments
(1 file, 1 obsolete file)
I found out in bug 1139718 that password manager messages that try to send an XPCOM object e.g. nsILoginInfo lose their ability to send structured clones since structured cloning of XPCOM objects fails so the code falls back to stringifying the arguments. This means we lose nicety of Structured Clones e.g. for RegExp, Map, Set, etc. [1] as we get vanilla objects.
Fixing this allows me to send RegExp and Set across processes like I originally wanted to.
[1] https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/The_structured_clone_algorithm
Flags: qe-verify-
Flags: firefox-backlog+
Assignee | ||
Comment 1•10 years ago
|
||
/r/4937 - Bug 1140242 - Convert nsILoginInfo to vanilla JS objects before trying to send them in messages. r=dolske
Pull down this commit:
hg pull review -r ba1259ef0be9fa3be2bd39a075e8518eb1e90e57
Attachment #8573679 -
Flags: review?(dolske)
Assignee | ||
Comment 2•10 years ago
|
||
All tests pass locally. See also bug 1139718 comment 9.
Updated•10 years ago
|
Iteration: 39.1 - 9 Mar → 39.2 - 23 Mar
Comment 3•10 years ago
|
||
Huh, so do I understand this correctly? The issue is that the clone of the xpcom object (login) fails, and so it falls back to JSON. Which is actually OK for the login itself, but has the side effect of _other_ things in the message being cloned breaking because of the JSON fallback?
That's... awful. But at least the workaround is simple.
Comment 4•10 years ago
|
||
Comment on attachment 8573679 [details]
MozReview Request: bz://1140242/MattN
https://reviewboard.mozilla.org/r/4935/#review4133
Ship It!
Attachment #8573679 -
Flags: review?(dolske) → review+
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Justin Dolske [:Dolske] from comment #3)
> Huh, so do I understand this correctly? The issue is that the clone of the
> xpcom object (login) fails, and so it falls back to JSON. Which is actually
> OK for the login itself, but has the side effect of _other_ things in the
> message being cloned breaking because of the JSON fallback?
>
> That's... awful. But at least the workaround is simple.
Yep, that's correct.
Also, btw. I didn't add a test for this specifically since it will be easily caught by recipe tests using Set/RegExp.
https://hg.mozilla.org/integration/fx-team/rev/ed7f8e7ab386
Whiteboard: [fixed-in-fx-team]
Comment 6•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla39
Assignee | ||
Comment 7•9 years ago
|
||
Attachment #8573679 -
Attachment is obsolete: true
Attachment #8619692 -
Flags: review+
Assignee | ||
Comment 8•9 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•