Closed Bug 1383208 Opened 7 years ago Closed 7 years ago

Console logging from a frame script breaks for some reason

Categories

(DevTools :: Console, defect, P3)

55 Branch
defect

Tracking

(firefox56 fixed)

RESOLVED FIXED
Firefox 56
Tracking Status
firefox56 --- fixed

People

(Reporter: Gijs, Assigned: bgrins)

Details

(Whiteboard: [browser-debugging-issues])

Attachments

(1 file)

STR:

1. open firefox with e10s turned on
2. enable and open browser console.
3. run:

gBrowser.selectedBrowser.messageManager.loadFrameScript("data:application/javascript,console.log(this.foo)", false);

ER:

logs whatever foo is, or maybe undefined, or something.

AR:

TypeError: consoleMsg.functionName is null
ContentProcessSingleton.js:62:9

from: 

https://dxr.mozilla.org/mozilla-central/rev/7d2e89fb92331d7e4296391213c1e63db628e046/toolkit/components/processsingleton/ContentProcessSingleton.js#62-63
Huh, I guess we need to null check on the functionName before calling substring. I guess it makes sense that in this script the message doesn't have a functionName
Component: Developer Tools → Developer Tools: Console
Priority: -- → P3
Whiteboard: [browser-debugging-issues]
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Comment on attachment 8890569 [details]
Bug 1383208 - Allow for null functionName in console messages;

https://reviewboard.mozilla.org/r/161712/#review167198
Attachment #8890569 - Flags: review?(amarchesini) → review+
Pushed by bgrinstead@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1bb99bce4b89
Allow for null functionName in console messages;r=baku
https://hg.mozilla.org/mozilla-central/rev/1bb99bce4b89
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
I have reproduced this bug on Nightly according to (2017-07-21)

Fixing bug is verified on Latest Beta--
Build ID    : 20170808170225
User Agent  :Mozilla/5.0 (Windows NT 6.1; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0

Tested OS-- Windows7 64bit
QA Whiteboard: [bugday-20170809]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: