Closed
Bug 1072186
Opened 10 years ago
Closed 7 years ago
Freeze layout objects after they're loaded
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: mnjul, Unassigned)
Details
Attachments
(1 file)
(deleted),
text/x-github-pull-request
|
Details |
As we expect layout objects and key objects to be immutable after they're loaded/normalized in LayoutLoader, it's better we guard them with Object.freeze(), such that future attempts to mutate them will fail.
Reporter | ||
Comment 1•10 years ago
|
||
Working on this while I'm waiting for other patch's feedback. Will probably take bug 1074613 and bug 1042191 in this bug too.
Assignee: nobody → jlu
Whiteboard: [p=2]
Target Milestone: --- → 2.1 S7 (Oct24)
Reporter | ||
Comment 2•10 years ago
|
||
(In reply to John Lu [:mnjul] [MoCoTPE] from comment #1)
> Working on this while I'm waiting for other patch's feedback. Will probably
> take bug 1074613 and bug 1042191 in this bug too.
s/1042191/1072191
Reporter | ||
Comment 3•10 years ago
|
||
Reporter | ||
Comment 4•10 years ago
|
||
Comment on attachment 8503957 [details]
Patch (PR @ GitHub)
Hi Tim,
Please see if the patch is good for this bug and bug 1072191 and bug 1074613.
A tricky part is that we can't really freeze spaceKey and enterKey during normalization because layoutManager may change it. So they're frozen in layoutManager after the appropriate modification was done.
p.s. you can't change the property value of an object with some frozen prototype where the property is defined, i.e.
o = {'abc': 123};
o2 = Object.create(Object.freeze(o));
o2.abc = 456;
and |o2.abc| will remain |123| .
Attachment #8503957 -
Attachment description: WIP Patch (PR @ GitHub) without Tests → Patch (PR @ GitHub)
Attachment #8503957 -
Flags: review?(timdream)
Reporter | ||
Comment 5•10 years ago
|
||
Comment on attachment 8503957 [details]
Patch (PR @ GitHub)
So, Tim and I discussed and we have not come to a clear policy on what and how we should (deep-)freeze and what and how we should (deep-)copy.
Thus I'll leave this bug for now. The patch for the other two bugs is now on bug 1072191.
Attachment #8503957 -
Flags: review?(timdream)
Reporter | ||
Updated•10 years ago
|
Assignee: jlu → nobody
Whiteboard: [p=2]
Target Milestone: 2.1 S7 (24Oct) → ---
Comment 6•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•