Closed Bug 1053392 Opened 10 years ago Closed 6 years ago

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

Categories

(Firefox OS Graveyard :: Gaia::TestAgent, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gaye, Unassigned)

Details

I want to see my function code or perhaps [Function] or something!
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.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.