XPCOM.nsIConsoleService.logStringMessage() - null byte

RESOLVED WONTFIX

Status

()

Core
XPCOM
RESOLVED WONTFIX
5 years ago
5 years ago

People

(Reporter: janekptacijarabaci, Unassigned)

Tracking

25 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 782606 [details]
XPCOM.nsIConsoleService.logStringMessage() - does not display parts of a string after a null byte.

User Agent: Opera/9.80 (Windows NT 6.1; WOW64) Presto/2.12.388 Version/12.16

Steps to reproduce:

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20130729 Firefox/25.0

Steps to reproduce:

Downstream bug report to Greasemonkey:
https://github.com/greasemonkey/greasemonkey/issues/1061

Steps to reproduce:
1) Install a User Script (the attached test case) => Greasemonkey
2) Open any page


Actual results:

alert: "null byte herewords after" // OK

Error console(FF 22)/Web console(FF25):
"console.log: null byte herewords after" // OK
GM_log: null byte here // broken



Expected results:

Perhaps related to: https://bugzilla.mozilla.org/show_bug.cgi?id=310037
(ECMAScript 5.1 - Section 15.10.2.11) - http://www.ecma-international.org/ecma-262/5.1/Ecma-262.pdf
(Reporter)

Updated

5 years ago
OS: Windows 7 → All
Hardware: x86_64 → All
(Reporter)

Updated

5 years ago
Attachment #782606 - Attachment mime type: application/octet-stream → text/javascript

Comment 1

5 years ago
"logStringMessage" is declared to take an `in wstring` which is a null-terminated string. If you need to do more advanced logging, you will need to invent your own implementation of nsIConsoleMessage.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.