Calling the console api with a function from a test-agent test sends "null" to the node server

RESOLVED WONTFIX

Status

Firefox OS
Gaia::TestAgent
RESOLVED WONTFIX
4 years ago
5 months ago

People

(Reporter: gaye, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
I want to see my function code or perhaps [Function] or something!
(Reporter)

Comment 1

4 years ago
I spent a while trying to figure out why my function was null today. It wasn't null! </rant>
Flags: needinfo?(jlal)
Flags: needinfo?(felash)
Ah interesting... the inspector code is literally a rip off of some code out of node so I am not sure why it does this thing... We can add a test here https://github.com/mozilla-b2g/js-test-agent/blob/master/test/test-agent/inspect-test.js and update the inspect code to pick up a likely fix.
Flags: needinfo?(jlal)
Flags: needinfo?(felash)
Yeah if this is a function we can call toSource() if it's available?
toString (generally implemented across browsers/etc..) is better but yes
If toString gives the function source, then ok :) Otherwise we can use toSource if available and fallback on toString.

Comment 6

5 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.