Closed Bug 1672263 Opened 4 years ago Closed 4 years ago

Use ThrowStateError with useful message in JSWindowActorChild

Categories

(Core :: DOM: Content Processes, task, P3)

task

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: kmag, Assigned: kmag)

Details

Attachments

(1 file)

We use Throw(NS_ERROR_DOM_INVALID_STATE_ERR) in a bunch of places, which does not report useful errors.

Severity: -- → N/A
Priority: -- → P3

Currently, when JS callers try to access certain JSWindowActors before an
actor is initialized, or after it's destroyed, we throw a generic
NS_ERROR_INVALID_STATE_ERROR exception without any useful information about
the failure.

This patch changes that to use ThrowInvalidStateError, with a message
including the property name, the actor name, and details about whether the
error occurred because the actor has not been initialized or because it has
already been destroyed.

Pushed by maglione.k@gmail.com: https://hg.mozilla.org/integration/autoland/rev/2956f1a4e43a Use ThrowInvalidStateError with useful messages in JSWindowActorChild. r=nika
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: