Closed
Bug 1389734
Opened 7 years ago
Closed 3 years ago
Structured clone deserialize error when API call result is received after context is destroyed
Categories
(WebExtensions :: General, defect, P3)
WebExtensions
General
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: soeren.hentzschel, Assigned: robwu)
References
Details
Attachments
(1 file)
802 bytes,
application/zip
|
Details |
The following code causes an error in the console:
browser.tabs.update({ url : 'about:blank' });
It works so there is no big problem but, of course, as WebExtension developer I want to avoid that my add-on causes any output in the console.
The error is:
TypeError: Argument 1 of StructuredCloneHolder.deserialize is not an object (ExtensionChild.jsm:784:24)
Updated•7 years ago
|
Summary: browser.tabs.update with about:blank as URL causes an error in console → Structured clone deserialize error when API call result is received after context is destroyed
Updated•7 years ago
|
Priority: -- → P3
Updated•6 years ago
|
Product: Toolkit → WebExtensions
Assignee | ||
Comment 1•6 years ago
|
||
Reproduction steps.
1. Load attached extension at about:debugging (or after unpacking, using web-ext run).
2. Visit http://example.com
3. Look at the global JS console.
Depending on the timing, any of the following messages could be printed:
Cannot send function call result: other side closed connection (call data: ({path:"storage.local.get", args:[null]}))
Promise resolved while context is inactive contentscript.js:7
TypeError: Argument 1 of StructuredCloneHolder.deserialize is not an object. ExtensionChild.jsm:919:24
When the last error (this bug report) happens, then a memory leak occurs, because the listener is not cleaned up: https://searchfox.org/mozilla-central/rev/448f792f9652d29daebdad21bf50b03405e40a45/toolkit/components/extensions/ExtensionChild.jsm#961
status-firefox57:
affected → ---
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → rob
Status: NEW → ASSIGNED
Updated•3 years ago
|
See Also: → https://jira.mozilla.com/browse/WEBEXT-36
Assignee | ||
Comment 2•3 years ago
|
||
This deserialization error no longer happens. The logic is now at https://searchfox.org/mozilla-central/rev/4c06787a227b9f46ae22b70611f1213891d72e03/toolkit/components/extensions/ExtensionChild.jsm#794.
Previously, the error could occur if a message was received after destroying the context.
We've moved from a message-manager based communication to a JSWindowActor, and it's not possible to receive a message after destroying the context since the conduit is closed when the JSWindowActor is destroyed.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•