Add receiver parameter to Debugger.Object's getProperty and setProperty

RESOLVED FIXED in Firefox 65

Status

()

defect
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: Oriol, Assigned: Oriol)

Tracking

unspecified
mozilla66
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox65 fixed, firefox66 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

6 months ago
Bug 888390 added Debugger.Object.prototype.{setProperty, getProperty}

getProperty only accepts a key parameter, and setProperty also the value to be set.

However, they don't allow you to specify which receiver to use in case the property is a getter or setter. This is needed by the console (bug 1515046).

A new parameter could be added for this:

  obj.getProperty(key, receiver);
  obj.setProperty(key, value, receiver);

If the receiver parameter is not provided, it should default to `obj` for backwards compatibility and for consistency with Reflect.{get, set}
Assignee

Comment 2

6 months ago
I will fix the nit when I get back home next week. It would be nice to fix bug 1515046 in beta, but it needs various changes (including this) that may be too much to uplift. So I guess there is no hurry.
Assignee

Updated

6 months ago
Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Keywords: checkin-needed

Comment 3

6 months ago
Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8bf9415e1de8
Add receiver parameter to Debugger.Object's getProperty and setProperty. r=jimb
Keywords: checkin-needed

Comment 4

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8bf9415e1de8
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Assignee

Comment 5

6 months ago

Comment on attachment 9032530 [details]
Bug 1515447 - Add receiver parameter to Debugger.Object's getProperty and setProperty. r=jimb

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: None

User impact if declined: Needed for uplifting bug 1515046

Is this code covered by automated tests?: Yes

Has the fix been verified in Nightly?: Yes

Needs manual test from QE?: No

If yes, steps to reproduce:

List of other uplifts needed: None

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): Only adds a new receiver parameter to Debugger.Object's getProperty and setProperty. When omitted, the old behavior is preserved. This new parameter is treated like the existing value parameter of setProperty, so there shouldn't be cross-compartment problems or this kind of things.

String changes made/needed:

Attachment #9032530 - Flags: approval-mozilla-beta?

Comment on attachment 9032530 [details]
Bug 1515447 - Add receiver parameter to Debugger.Object's getProperty and setProperty. r=jimb

[Triage Comment]
Fixes a devtools bug. Approved for 65.0b11.

Attachment #9032530 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.