Closed Bug 1054584 Opened 5 years ago Closed 5 years ago

"statusDiv is null" error in browser-plugins.js

Categories

(Firefox :: General, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 34

People

(Reporter: poiru, Assigned: poiru)

Details

Attachments

(1 file, 2 obsolete files)

I bumped into this while trying to test bug 1024672.

[Exception... "[JavaScript Error: "statusDiv is null" {file: "chrome://browser/content/browser.js" line: 4991}]'[JavaScript Error: "statusDiv is null" {file: "chrome://browser/content/browser.js" line: 4991}]' when calling method: [nsIObserver::observe]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/modules/CrashSubmit.jsm :: Submitter_notify :: line 334"  data: yes]

This might be a regression from 41df67208b1b (bug 1009760).
I'm not sure this is the right solution. This is merely what I used to get rid of the error for testing another bug.
Attachment #8474025 - Flags: review?(georg.fritzsche)
Comment on attachment 8474025 [details] [diff] [review]
Fix "statusDiv is null" error in browser-plugins.js

Review of attachment 8474025 [details] [diff] [review]:
-----------------------------------------------------------------

This looks reasonable.
However, there's is rarely need for |self=this| now. You can e.g. just change the |observe| function below to an arrow function, which lexically binds |this|.
Attachment #8474025 - Flags: review?(georg.fritzsche)
Attachment #8474025 - Attachment is obsolete: true
Attachment #8474868 - Flags: review?(georg.fritzsche)
I completely forgot to ask - does comment 0 mean that we have test coverage in another bug?
We are obviously missing test coverage for this part.
Flags: needinfo?(birunthan)
(In reply to Georg Fritzsche [:gfritzsche] from comment #4)
> We are obviously missing test coverage for this part.

We are indeed. Here is an updated patch with a test.
Attachment #8474868 - Attachment is obsolete: true
Attachment #8474868 - Flags: review?(georg.fritzsche)
Attachment #8475956 - Flags: review?(georg.fritzsche)
Flags: needinfo?(birunthan)
Comment on attachment 8475956 [details] [diff] [review]
Fix "statusDiv is null" error in browser-plugins.js and add test

Review of attachment 8475956 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, this looks good to me!
Jared, can you sign this off?
Attachment #8475956 - Flags: review?(jaws)
Attachment #8475956 - Flags: review?(georg.fritzsche)
Attachment #8475956 - Flags: feedback+
Attachment #8475956 - Flags: review?(jaws) → review+
Flags: in-testsuite+
https://hg.mozilla.org/mozilla-central/rev/97c62ea49a7c
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
You need to log in before you can comment on or make changes to this bug.