Closed
Bug 1149896
Opened 10 years ago
Closed 10 years ago
console reports "Sending message that cannot be cloned. Are you trying to send an XPCOM object?" as reading-list items are added.
Categories
(Firefox Graveyard :: Reading List, defect, P3)
Firefox Graveyard
Reading List
Tracking
(firefox38 fixed, firefox39 fixed, firefox40 fixed)
RESOLVED
FIXED
Firefox 40
People
(Reporter: markh, Assigned: markh)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
adw
:
review+
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
The message appears only in the "browser console", and comes from our various:
let mm = Cc["@mozilla.org/globalmessagemanager;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+
Updated•10 years ago
|
Updated•10 years ago
|
Priority: -- → P3
Assignee | ||
Comment 2•10 years ago
|
||
Ah - https://dxr.mozilla.org/mozilla-central/source/dom/base/nsFrameMessageManager.cpp#599 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)
Updated•10 years ago
|
Attachment #8588931 -
Flags: review?(adw) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8588931 [details] [diff] [review]
0004-Bug-1149896-avoid-warnings-when-using-sendAsyncMessa.patch
https://hg.mozilla.org/integration/fx-team/rev/fad798bf083f
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?
Comment 4•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Comment 5•10 years ago
|
||
Comment on attachment 8588931 [details] [diff] [review]
0004-Bug-1149896-avoid-warnings-when-using-sendAsyncMessa.patch
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+
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Updated•9 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•