Bug 11898 - CSSMediaRule functions insertRule and deleteRule assert when called from js in debug builds
Summary: CSSMediaRule functions insertRule and deleteRule assert when called from js i...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-20 15:35 PST by Sam Weinig
Modified: 2006-12-21 13:19 PST (History)
3 users (show)

See Also:


Attachments
testcase (1.12 KB, text/html)
2006-12-20 15:38 PST, Sam Weinig
no flags Details
First attempt (3.56 KB, patch)
2006-12-21 08:58 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Now with comment (3.72 KB, patch)
2006-12-21 10:58 PST, Rob Buis
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.