Closed
Bug 350718
Opened 19 years ago
Closed 19 years ago
[SessionStore] about:config's textbox value isn't restored anymore
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
VERIFIED
FIXED
Firefox 2
People
(Reporter: zeniko, Assigned: zeniko)
References
()
Details
(Keywords: fixed1.8.1, regression)
Attachments
(2 files, 1 obsolete file)
|
2.43 KB,
patch
|
asaf
:
review+
mconnor
:
approval1.8.1+
|
Details | Diff | Splinter Review |
|
2.45 KB,
patch
|
asaf
:
review+
|
Details | Diff | Splinter Review |
Not sure where to file this. This bug is made visibly by SessionStore but might rather be a Core issue.
Steps to reproduce:
1. Open about:config and enter text into the filter
2. Close the tab
3. Re-open that tab
Expected result:
The filter text is restored.
This regressed with bug 345991 - before, it was possible to get the value by simply not applying an XPCNativeWrapper to about:config's document.
OTOH if this can't be fixed for Firefox 2.0, the special treatment of about:config should at least marked with a note about why it doesn't work in nsSessionStore.js.
Comment 1•19 years ago
|
||
So is the problem that .value is not returning the right string? Or something else?
| Assignee | ||
Comment 2•19 years ago
|
||
The problem is that .value is undefined in the first place.
Comment 3•19 years ago
|
||
Hmm... Is that object that we're doing .value on a XUL textbox or something?
| Assignee | ||
Comment 4•19 years ago
|
||
That's what the DOM Inspector says. And that one is able to get to the value. "Normal" chrome however is not.
Comment 5•19 years ago
|
||
DOM inspector doesn't use XPCNativeWrapper. This means that it's exploitable if you use it on some random site, of course. ;)
The problem is that .value on XUL textboxes is bound via XBL, so there's no way XPCNativeWrapper can know about it... Perhaps in the about:config case you simply want to unwrap in this code, if you're Really Sure that content can't touch it (should be true, since about:config is chrome).
| Assignee | ||
Comment 6•19 years ago
|
||
Drivers: This low-risk patch fixes the regression by unwrapping about:config's document wherever needed (before bug 345991 was fixed, about:config wasn't wrapped at all - so there should be no new security concerns, see also comment #5 above).
With this patch, about:config's filter is restored after a restart or after reopening a closed tab. This can be a blessing for developers and power users and should if possible be restored.
Assignee: nobody → zeniko
Status: NEW → ASSIGNED
Attachment #238234 -
Flags: review?(bugs.mano)
Attachment #238234 -
Flags: approval1.8.1?
| Assignee | ||
Comment 7•19 years ago
|
||
Additionally to the branch patch, this patch contains the bits of the patch to bug 349961 which weren't checked in (complete removal of no longer required code concerning XPCNativeWrappers).
Attachment #238235 -
Flags: review?(bugs.mano)
Comment 8•19 years ago
|
||
Comment on attachment 238234 [details] [diff] [review]
branch patch
r=mano. drivers: very low risk.
Attachment #238234 -
Flags: review?(bugs.mano) → review+
Comment 9•19 years ago
|
||
Comment on attachment 238235 [details] [diff] [review]
trunk patch
>Index: browser/components/sessionstore/src/nsSessionStore.js
>===================================================================
{
>+ var data = aBrowser.parentNode.__SS_text[textarea];
> if (!data.cache) {
> // update the text element's value before adding it to the data structure
>- data.cache = encodeURI(data.element.value);
>+ data.cache = encodeURI(textarea.value);
> }
> text.push(data.id + "=" + data.cache);
> }
> }
Explain this change please (in particular, the use of textarea.value).
| Assignee | ||
Comment 10•19 years ago
|
||
(In reply to comment #9)
> Explain this change please (in particular, the use of textarea.value).
Currently there are two references to the text areas to be saved: the keys to __SS_text and the .element field of the corresponding object. This patch does away with the redundant .element field and directly uses the reference used as key. So instead of |data.element| we now write |textarea| and thus |data.element.value| becomes |textarea.value|.
Originally data.element held a wrapped instance of the textarea while the unwrapped instance was used as a key. Since tanks to bug 345991 we now automatically get everything wrapped, this dichotomy has become obsolete.
| Assignee | ||
Comment 11•19 years ago
|
||
branch patch -> RC1 radar
Flags: blocking-firefox2?
Whiteboard: [has patch][needs approval]
Target Milestone: --- → Firefox 2
Comment 12•19 years ago
|
||
not a blocker, will evaluate patch separately.
Flags: blocking-firefox2? → blocking-firefox2-
Comment 13•19 years ago
|
||
Comment on attachment 238234 [details] [diff] [review]
branch patch
a=mconnor on behalf of drivers for 1.8 branch checkin
Attachment #238234 -
Flags: approval1.8.1? → approval1.8.1+
| Assignee | ||
Updated•19 years ago
|
Whiteboard: [has patch][needs approval] → [checkin needed (1.8 branch)]
Updated•19 years ago
|
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch)]
Comment 14•19 years ago
|
||
Comment on attachment 238235 [details] [diff] [review]
trunk patch
Tested in http://forums.mozillazine.org/posting.php?mode=newtopic&f=38
1. Write something in the message-body field.
2. Blur it
3. Crash and reopen the browser
The restored value is "undefined".
Attachment #238235 -
Flags: review?(mano) → review-
| Assignee | ||
Comment 15•19 years ago
|
||
Never mind, please just land the bits which landed on the branch and leave the rest for future (if ever) cleanup. Thanks.
Attachment #238235 -
Attachment is obsolete: true
Attachment #240656 -
Flags: review?(mano)
Comment 16•19 years ago
|
||
Comment on attachment 240656 [details] [diff] [review]
trunk patch
r=mano
Attachment #240656 -
Flags: review?(mano) → review+
| Assignee | ||
Updated•19 years ago
|
Whiteboard: [checkin needed]
Comment 17•19 years ago
|
||
mozilla/browser/components/sessionstore/src/nsSessionStore.js 1.52
Is this now FIXED?
Whiteboard: [checkin needed]
| Assignee | ||
Comment 18•19 years ago
|
||
Adjusting the summary to make this bug FIXED.
Note to self: Depending on the fix to bug 355766 we might want to adjust the solution chosen here.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Summary: No way to programmatically access about:config's textbox value → [SessionStore] about:config's textbox value isn't restored anymore
Updated•19 years ago
|
Component: General → Session Restore
Updated•19 years ago
|
QA Contact: general → session.restore
Comment 19•16 years ago
|
||
Verified with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090618 Minefield/3.6a1pre ID:20090618031329
Status: RESOLVED → VERIFIED
Flags: in-litmus?
Comment 20•16 years ago
|
||
Flags: in-litmus? → in-litmus+
You need to log in
before you can comment on or make changes to this bug.
Description
•