Closed
Bug 723356
Opened 13 years ago
Closed 13 years ago
Make `console` output show up in logcat
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: philikon, Assigned: philikon)
Details
Attachments
(1 file)
1.03 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
Need this to debug gaia. Patch incoming.
Assignee | ||
Comment 1•13 years ago
|
||
Pretty ghetto but also pretty handy. This gets us output like:
E/GeckoConsole( 2628): Content JS LOG at http://localhost:6666/apps/dialer/js/dialer.js:298 in fm_handleEvent: Call changed state: disconnected
when gaia calls console.log(...);
Attachment #593683 -
Flags: review?(jones.chris.g)
Comment on attachment 593683 [details] [diff] [review]
v1
The |message| here is an instance of
http://mxr.mozilla.org/mozilla-central/source/dom/base/ConsoleAPI.js#198
The arguments of that come from content at some point. Need to be sure that toString()ing them doesn't result in content code being called unsafely from chrome.
Attachment #593683 -
Flags: review?(jones.chris.g) → review?(gal)
Assignee | ||
Comment 3•13 years ago
|
||
(Note that Firefox [1] and Fennec [2,3] do the same in terms of toString()ing.
[1] https://mxr.mozilla.org/mozilla-central/source/browser/devtools/webconsole/HUDService.jsm#5116
[2] https://mxr.mozilla.org/mozilla-central/source/mobile/xul/chrome/content/content.js#1243
[3] http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js#3565
)
Updated•13 years ago
|
Attachment #593683 -
Flags: review?(gal) → review+
For future reference, the only way we know out of the toString() box is this.caller, and Andreas points at
/* Censor the caller if it is from another compartment. */
JSObject &caller = vp->toObject();
if (caller.compartment() != cx->compartment) {
jsfun.cpp:1141
so this is OK.
Comment 3 is private:
false
Assignee | ||
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•