Closed Bug 1116725 Opened 9 years ago Closed 9 years ago

TypeError : isLost is a readonly attribute

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.2 S3 (9jan)

People

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

References

Details

(Whiteboard: [p=1])

Attachments

(1 file)

isLost is a read-only attribute,
I should add another [ChromeOnly] function to turn the flag to true.
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/mozilla-central/rev/dc341b949c0b
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: