Closed Bug 820740 Opened 13 years ago Closed 13 years ago

[rule view] exception since toolbox (TypeError: this._elementStyle is undefined)

Categories

(DevTools :: Inspector, defect, P1)

x86
All
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: paul, Assigned: miker)

References

Details

(Whiteboard: [has-patch])

Attachments

(1 file)

TypeError: this._elementStyle is undefined: CssRuleView_nodeChanged@resource:///modules/devtools/CssRuleView.jsm:977 RVT_refresh@resource:///modules/devtools/StyleInspector.jsm:122 EventEmitter_emit@resource:///modules/devtools/EventEmitter.jsm:96 @resource:///modules/devtools/InspectorPanel.jsm:511 Happens when starting the inspector.
Summary: [rule view] exception since toolbox → [rule view] exception since toolbox (TypeError: this._elementStyle is undefined)
This could easily be the cause of other bugs.
Assignee: nobody → mratcliffe
Priority: -- → P1
I can't reproduce this. Paul: Is this still broken for you?
Whiteboard: [needinfo]
Flags: needinfo?(paul)
I'll reopen if I see it again.
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: needinfo?(paul)
Resolution: --- → WORKSFORME
I see it again: TypeError: this._elementStyle is null: CssRuleView_nodeChanged@resource:///modules/devtools/CssRuleView.jsm:977 RVT_refresh@resource:///modules/devtools/StyleInspector.jsm:123 EventEmitter_emit@resource:///modules/devtools/EventEmitter.jsm:100 @resource:///modules/devtools/InspectorPanel.jsm:577
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
I breaks when we close the devtools or the browser tab. It breaks because in CssRuleView.jsm:977, we use a property that has been destroyed. It has been destroyed because the StyleInspector has been destroyed. We still try to use the ruleview because of a layout-change event (StyleInspector.jsm#121). But the weird thing is, before destroying the RuleView, we stop listening to the layout-change event. See StyleInspector.jsm#127.
Whiteboard: [needinfo]
Attached patch Patch v1Splinter Review
I still can't reproduce this so it is probably something a bit hinky with your architecture ... I am guessing that the computed view is destroyed and because it shares cssLogic with the rule view the object no longer exists. Anyhow, here is the simplest of simple workarounds.
Attachment #702819 - Flags: review?(paul)
Whiteboard: [has-patch]
(In reply to Michael Ratcliffe [:miker] [:mratcliffe] from comment #6) > Created attachment 702819 [details] [diff] [review] > Patch v1 > > I still can't reproduce this so it is probably something a bit hinky with > your architecture ... I am guessing that the computed view is destroyed and > because it shares cssLogic with the rule view the object no longer exists. > > Anyhow, here is the simplest of simple workarounds. I would really much like to understand first how we can get into this situation.
Attachment #702819 - Flags: review?(paul)
I can't reproduce. But I tried. Hard. Let's reopen if we ever see that again.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → WORKSFORME
No longer blocks: DevToolsPaperCuts
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: