Closed Bug 1634988 Opened 5 years ago Closed 5 years ago

TypeError: state is undefined in toolkit/actors/BrowserElementParent.jsm

Categories

(Toolkit :: General, defect, P3)

defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: kernp25, Assigned: varundey20, Mentored)

Details

(Keywords: good-first-bug, steps-wanted, Whiteboard: [lang=js])

Attachments

(2 files)

Attached image firefox_wCTdJaoWGc.png

I saw this error in the browser console: TypeError: state is undefined

My browser version: 75.0 (64-Bit)

Flags: needinfo?(mconley)
Severity: -- → S4
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Summary: TypeError: state is undefined → TypeError: state is undefined in toolkit/actors/BrowserElementParent.jsm

We can probably just guard against state being undefined here.

Mentor: mconley
Flags: needinfo?(mconley)
Whiteboard: [lang=js]

Hello. I would like to take this up

Hi, Varun! Do you have a build of Firefox built already?

If so, I think what we want to do is handle the case where the state object doesn't exist right after here:

https://searchfox.org/mozilla-central/rev/227f22acef5c4865503bde9f835452bf38332c8e/toolkit/actors/BrowserElementParent.jsm#313

by adding:

if (!state) {
  return;
}
Flags: needinfo?(varundey20)
Assignee: nobody → varundey20
Status: NEW → ASSIGNED

Hey Mike, I do have local build of Firefox with me. I have updated the changes at phabricator. I however could not find any tests for it. Let me know if something is missing.

Flags: needinfo?(varundey20)
Attachment #9166051 - Attachment description: Bug 1634988 - guard state againt being undefined. r?mconley → Bug 1634988 - guard state against being undefined in BrowserElementParent. r?mconley
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b7b1979ea1d6 guard state against being undefined in BrowserElementParent. r=mconley
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: