Closed Bug 723356 Opened 13 years ago Closed 13 years ago

Make `console` output show up in logcat

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: philikon, Assigned: philikon)

Details

Attachments

(1 file)

Need this to debug gaia. Patch incoming.
Attached patch v1Splinter Review
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)
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
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.

Attachment

General

Created:
Updated:
Size: