mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 883766 - JavaScript Warning: "reference to undefined property ret.value" {file: "resource://gre/modules/wifi_worker.js" line: 71} r=mrbkap
This commit is contained in:
parent
71bf559fdc
commit
e5404b3ebe
@ -68,8 +68,14 @@ self.onmessage = function(e) {
|
||||
break;
|
||||
case "wait_for_event":
|
||||
var ret = libhardware_legacy.wait_for_event(cbuf, 4096);
|
||||
var event = cbuf.readString().substr(0, ret.value);
|
||||
postMessage({ id: id, event: event });
|
||||
// Check the array index.
|
||||
if (ret > 0 && ret < 4096) {
|
||||
// Make sure the string buffer is null terminated.
|
||||
cbuf[ret] = 0;
|
||||
// Use readStringReplaceMalformed() to handle non-UTF8-encoded string.
|
||||
var event = cbuf.readStringReplaceMalformed();
|
||||
postMessage({ id: id, event: event });
|
||||
}
|
||||
break;
|
||||
case "ifc_reset_connections":
|
||||
var ret = libnetutils.ifc_reset_connections(data.ifname,
|
||||
|
Loading…
Reference in New Issue
Block a user