TypeError : isLost is a readonly attribute

RESOLVED FIXED in 2.2 S3 (9jan)

Status

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: allstars.chh, Assigned: allstars.chh)

Tracking

unspecified
2.2 S3 (9jan)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [p=1])

Attachments

(1 attachment)

isLost is a read-only attribute,
I should add another [ChromeOnly] function to turn the flag to true.
Posted patch PatchSplinter Review
Attachment #8542905 - Flags: review?(dlee)
Duplicate of this bug: 1117653
Attachment #8542905 - Flags: review?(dlee) → review+
Comment on attachment 8542905 [details] [diff] [review]
Patch

Review of attachment 8542905 [details] [diff] [review]:
-----------------------------------------------------------------

Forward r? to smaug.

When I landed Bug 1085292, I remembered I could set the isLost attribute from MozNFC(i.e. outside MozNFCTag/PeerImpl object),
but I guess there's some JS engine change or WebIDL binding change recently so setting that attribute will result error now.

In this patch I set that attribute inside the JS-Impl object, and it's working now.
r? to smaug to see this is a correct way for doing this.
Or should I create another getter for this. 

Like

_isLost: null,

get isLost() {
  return this._isLost;
}
Attachment #8542905 - Flags: review?(bugs)
Comment on attachment 8542905 [details] [diff] [review]
Patch

So this works since the JS->webidl->C++->JS will end up forwarding
notifyLost() call from the caller JS to the interface implementation JS.
This is perhaps even clearer than using _isLost + getter


I don't think anything has changed in webidl bindings related to this.
Attachment #8542905 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/b2g-inbound/rev/dc341b949c0b
Whiteboard: [p=1]
Target Milestone: --- → 2.2 S3 (9jan)
https://hg.mozilla.org/mozilla-central/rev/dc341b949c0b
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.