Closed Bug 1149896 Opened 9 years ago Closed 9 years ago

console reports "Sending message that cannot be cloned. Are you trying to send an XPCOM object?" as reading-list items are added.


(Firefox Graveyard :: Reading List, defect, P3)



(firefox38 fixed, firefox39 fixed, firefox40 fixed)

Firefox 40
Tracking Status
firefox38 --- fixed
firefox39 --- fixed
firefox40 --- fixed


(Reporter: markh, Assigned: markh)


(Blocks 1 open bug)



(1 file, 1 obsolete file)

The message appears only in the "browser console", and comes from our various:

    let mm = Cc[";1"].getService(Ci.nsIMessageListenerManager);
    mm.broadcastAsyncMessage("Reader:Added", item);

calls in ReadingList.jsm.  I previously thought that the item could be sent so long as it was JSONifiable - hence we have the this._unserializable() hack in ReadingList.jsm - but it seems I'm wrong :( The solution seems to be to send the record, as per the attachment.

CC Florian and Jaws as they might have more insight into what we can expect to fail given we aren't sending the messages.  I expected the +- button in reader view to not work, but it seems to work fine (and I'm out of time to dig deeper today)
Flags: qe-verify-
Flags: firefox-backlog+
Assignee: nobody → mhammond
Blocks: 1132074
Iteration: --- → 40.1 - 13 Apr
Priority: -- → P3
Ah - shows that this message is logged whenever the object can't be cloned, but the code falls-back to JSON - which succeeds in our case. This explains why no failure could be observed - the only problem is the warning.

This patch is similar to the last, but instead of sending item._record we send item.toJSON() - which is identical but avoids direct use of ._record and thus should be more future-proof.
Attachment #8586596 - Attachment is obsolete: true
Attachment #8588931 - Flags: review?(adw)
Attachment #8588931 - Flags: review?(adw) → review+
Comment on attachment 8588931 [details] [diff] [review]

I think we should take this on the branches too to avoid "spamming" the browser console.

Approval Request Comment
[Feature/regressing bug #]: readinglist
[User impact if declined]: Browser console will report errors using readinglist functionality.
[Describe test coverage new/current, TreeHerder]: Existing tests
[Risks and why]: Very low risk, limited just to readinglist.
[String/UUID change made/needed]: None
Attachment #8588931 - Flags: approval-mozilla-beta?
Attachment #8588931 - Flags: approval-mozilla-aurora?
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Comment on attachment 8588931 [details] [diff] [review]

Should be in 38 beta 3
Attachment #8588931 - Flags: approval-mozilla-beta?
Attachment #8588931 - Flags: approval-mozilla-beta+
Attachment #8588931 - Flags: approval-mozilla-aurora?
Attachment #8588931 - Flags: approval-mozilla-aurora+
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.