Bug 11898

Summary: CSSMediaRule functions insertRule and deleteRule assert when called from js in debug builds
Product: WebKit Reporter: Sam Weinig <sam>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, ddkilzer, rwlbuis
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
testcase
none
First attempt
none
Now with comment andersca: review+

Description Sam Weinig 2006-12-20 15:35:52 PST
Test case to come
Comment 1 Sam Weinig 2006-12-20 15:38:14 PST
Created attachment 11940 [details]
testcase
Comment 2 David Kilzer (:ddkilzer) 2006-12-20 16:55:11 PST
Is this related to Bug 11891?
Comment 3 Alexey Proskuryakov 2006-12-20 21:27:09 PST
I don't see the relation to bug 11891 (yet?).

This assertion failure is here:

JSValue* DOMCSSRule::getValueProperty(ExecState* exec, int token) const
{
  CSSRule &cssRule = *m_impl;
  switch (token) {
<...>
  default:
    assert(0);
Comment 4 David Kilzer (:ddkilzer) 2006-12-21 03:12:43 PST
(In reply to comment #3)
> I don't see the relation to bug 11891 (yet?).

Please ignore my earlier comment.  The only link between the two is that they're CSS-related.

Comment 5 Rob Buis 2006-12-21 04:47:45 PST
Hi Alexey,

Correct, however it should not end up in that function in the first place :) After some research I have a fix. A patch is coming up later today.
Cheers,

Rob.
(In reply to comment #3)
> I don't see the relation to bug 11891 (yet?).
> 
> This assertion failure is here:
> 
> JSValue* DOMCSSRule::getValueProperty(ExecState* exec, int token) const
> {
>   CSSRule &cssRule = *m_impl;
>   switch (token) {
> <...>
>   default:
>     assert(0);
> 

Comment 6 Rob Buis 2006-12-21 08:58:14 PST
Created attachment 11950 [details]
First attempt

This works :) I hope it is okay to test this way, since it is custom bindings code.
Cheers,

Rob.
Comment 7 Rob Buis 2006-12-21 10:58:46 PST
Created attachment 11952 [details]
Now with comment

Added a comment explaining the fix.
Cheers,

Rob.
Comment 8 Anders Carlsson 2006-12-21 11:48:40 PST
Comment on attachment 11952 [details]
Now with comment

Me and Rob discussed some changes on IRC. r=me
Comment 9 Rob Buis 2006-12-21 13:19:48 PST
Landed in r18376.