Closed Bug 384327 Opened 17 years ago Closed 17 years ago

Attempting to remove a CSS style rule results in errors

Categories

(Other Applications :: DOM Inspector, defect)

All
macOS
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 253354
mozilla1.9beta1

People

(Reporter: sdwilsh, Unassigned)

Details

Trying to remove a CSS style rule nets a few errors, and ends up crashing. This might not be a DOMi bug. WARNING: NS_ENSURE_TRUE(index != -1) failed: file /Developer/mozilla/layout/style/nsCSSStyleSheet.cpp, line 1113 ###!!! ASSERTION: container didn't take ownership: 'Not Reached', file /Developer/mozilla/layout/style/nsCSSStyleRule.cpp, line 996 ************************************************************ * Call to xpconnect wrapped JSObject produced this error: * [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMCSSStyleDeclaration.removeProperty]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://inspector/content/viewers/styleRules/styleRules.js :: doTransaction :: line 560" data: no] ************************************************************ JavaScript error: , line 0: uncaught exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMCSSStyleDeclaration.removeProperty]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://inspector/content/viewers/styleRules/styleRules.js :: doTransaction :: line 560" data: no]
Flags: blocking1.9?
Target Milestone: --- → mozilla1.9beta
I'm seeing such weirdness here... tries to delete a chrome CSS rules from DOMI and ended up crashing in nsCOMPtr called from nsCSSRuleProcessor.
This seems to be the case in chrome only - not content. Not sure who to cc in layout to get their attention on this....
Exact steps to reproduce: 1) Open DOMi 2) File->Inspect Chrome Document and select the browser window (it will have the same title as the content in the browser with a build identifier) 3) Search for "statusbar-icon" (it is the progressbar) 4) Make sure the Object - CSS Style View panel is currently being displayed, and select the first progressmeter rule. 5) Select the -moz-binding property, then press delete. Results in previously mentioned console output.
Oh, that viewer. Yeah, it gets the rule list through internal C++ APIs that aren't exposed to script and hence don't ensure unique stylesheet inner objects, so when you try to modify a rule on a cloned sheet (as xul.css), things break, because you actually modify the rule from one clone and then ask the other clone to deal. Note that you're not trying to remove a rule here, but a declaration; that's why I was wondering about the steps to reproduce... See also bug 180856. And I was pretty sure we had a more specific bug on this, but I can't find it right now.
Here we are.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.