Closed Bug 1012720 Opened 11 years ago Closed 10 years ago

Fix deleting prototype getters in Fennec code

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 34

People

(Reporter: jchen, Assigned: madeti, Mentored)

Details

(Whiteboard: [lang=js])

Attachments

(1 file, 2 obsolete files)

Similar to bug 1010039, we have several places where we try to delete a prototype getter from an object and replace it with a value, which doesn't actually work because you can't delete a prototype getter from an instance.
Below are the places where we want to replace this usage, > get foo() { > delete this.foo; > return this.foo = get_foo(); > }, with this, > get foo() { > if (!this._foo) { > this._foo = get_foo(); > } > return this._foo; > } http://mxr.mozilla.org/mozilla-central/source/mobile/android/components/ContentDispatchChooser.js#22 http://mxr.mozilla.org/mozilla-central/source/mobile/android/components/PaymentsUI.js#64 http://mxr.mozilla.org/mozilla-central/source/mobile/android/components/ColorPicker.js#22
Assignee: nchen → nobody
Status: ASSIGNED → NEW
Whiteboard: [mentor=jchen][lang=js]
Mentor: nchen
Whiteboard: [mentor=jchen][lang=js] → [lang=js]
Ashish will be working on this bug.
Assignee: nobody → ashishmadeti
Status: NEW → ASSIGNED
Attached patch Patch for bug 1012720 (obsolete) — Splinter Review
Attached patch Patch for bug 1012720 (obsolete) — Splinter Review
Changed the variable name (so that they are different from the property name).
Attachment #8464052 - Attachment is obsolete: true
Updated the patch format.
Attachment #8464060 - Attachment is obsolete: true
Attachment #8464067 - Flags: review?(nchen)
Comment on attachment 8464067 [details] [diff] [review] Patch for bug 1012720 Review of attachment 8464067 [details] [diff] [review]: ----------------------------------------------------------------- Looks good!
Attachment #8464067 - Flags: review?(nchen) → review+
Keywords: checkin-needed
Whiteboard: [lang=js] → [lang=js][fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [lang=js][fixed-in-fx-team] → [lang=js]
Target Milestone: --- → Firefox 34
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: