touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #100251
[Bug 1438412] Re: tst_ScriptMessageRouting_no_match.qml random test failure
** Changed in: oxide
Importance: High => Medium
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to webbrowser-app in Ubuntu.
https://bugs.launchpad.net/bugs/1438412
Title:
tst_ScriptMessageRouting_no_match.qml random test failure
Status in Oxide:
Triaged
Status in webbrowser-app:
Invalid
Status in webbrowser-app package in Ubuntu:
Confirmed
Bug description:
On trunk, I'm getting the following random test failure:
FAIL! : qml-core-test::ScriptMessageRouting_direct::test_ScriptMessageRouting_no_match(row 1) Unexpected error type
Actual (): 5
Expected (): 3
Loc: [/home/chr1s/src/oxide/class-hierarchy-cleanliness/qt/tests/qmltests/core/tst_ScriptMessageRouting_no_match.qml(44)]
The test is checking the response of the browser-side message routing
when there are no handlers available by sending a message to the frame
and having it loop back to the browser. When the browser returns an
error for the looped back message, the frame is then meant to reply to
the original request by sending the error code (which we expect to be
3 - ErrorNoHandler). In this case though, we're getting a genuine
error from the message transaction to the frame (5 -
ErrorHandlerDidNotRespond).
The content-side handler for this test that loops back to the browser
looks like this:
oxide.addMessageHandler("SEND-MESSAGE-TO-SELF", function(msg) {
var r = oxide.sendMessage(msg.args.id, msg.args.args);
r.onreply = function(response) {
msg.reply({error: 0, response: response});
};
r.onerror = function(error, desc) {
msg.reply({error: error, response: desc});
};
});
What happens is that when the handler has executed, "r" goes out of
scope and then sometimes gets garbage collected before we get a reply
or error from the browser. When it gets garbage collected, we
automatically send the "DidNotRespond" error to the message source in
the browser.
I'm amazed we've only just started hitting this.
This is likely to be an issue for existing consumers of Oxide, and
could affect the browser side too
To manage notifications about this bug go to:
https://bugs.launchpad.net/oxide/+bug/1438412/+subscriptions