[webkit-changes] cvs commit: WebCore/layout-tests/fast/dom gc-4-expected.txt gc-4.html

Geoffrey ggaren at opensource.apple.com
Mon Jun 20 11:20:04 PDT 2005


ggaren      05/06/20 11:20:04

  Modified:    .        ChangeLog
               khtml/ecma kjs_html.cpp
  Added:       layout-tests/fast/dom gc-4-expected.txt gc-4.html
  Log:
          Changes by Darin. Layout tests by me. Reviewed by me.
  
  	Fixed <rdar://problem/4152454> crash in KJS::ExprStatementNode::execute(KJS::ExecState*) in World Clock widget with TOT.
  
          Test cases added:
          * layout-tests/fast/dom/gc-4-expected.txt: Added.
          * layout-tests/fast/dom/gc-4.html: Added.
  
          * khtml/ecma/kjs_html.cpp:
          (KJS::Context2D::mark): mark now (1) checks for NULL pointers and (2)
  	calls mark on its parent class (DOMObject::mark).
  
  Revision  Changes    Path
  1.4287    +14 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4286
  retrieving revision 1.4287
  diff -u -r1.4286 -r1.4287
  --- ChangeLog	20 Jun 2005 05:52:12 -0000	1.4286
  +++ ChangeLog	20 Jun 2005 18:19:58 -0000	1.4287
  @@ -1,3 +1,17 @@
  +2005-06-20  Geoffrey Garen  <ggaren at apple.com>
  +
  +        Changes by Darin. Layout tests by me. Reviewed by me.
  +
  +	Fixed <rdar://problem/4152454> crash in KJS::ExprStatementNode::execute(KJS::ExecState*) in World Clock widget with TOT.
  +
  +        Test cases added: 
  +        * layout-tests/fast/dom/gc-4-expected.txt: Added.
  +        * layout-tests/fast/dom/gc-4.html: Added.
  +
  +        * khtml/ecma/kjs_html.cpp: 
  +        (KJS::Context2D::mark): mark now (1) checks for NULL pointers and (2) 
  +	calls mark on its parent class (DOMObject::mark).
  +
   2005-06-19  Darin Adler  <darin at apple.com>
   
           Changes by both Anders Carlsson and me.
  
  
  
  1.116     +15 -13    WebCore/khtml/ecma/kjs_html.cpp
  
  Index: kjs_html.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/ecma/kjs_html.cpp,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- kjs_html.cpp	19 Jun 2005 05:00:23 -0000	1.115
  +++ kjs_html.cpp	20 Jun 2005 18:20:03 -0000	1.116
  @@ -4806,51 +4806,51 @@
       ValueImp *v;
   
       v = _strokeStyle;
  -    if (!v->marked())
  +    if (v && !v->marked())
           v->mark();
   
       v = _fillStyle;
  -    if (!v->marked())
  +    if (v && !v->marked())
           v->mark();
   
       v = _lineWidth;
  -    if (!v->marked())
  +    if (v && !v->marked())
           v->mark();
   
       v = _lineCap;
  -    if (!v->marked())
  +    if (v && !v->marked())
           v->mark();
   
       v = _lineJoin;
  -    if (!v->marked())
  +    if (v && !v->marked())
           v->mark();
   
       v = _miterLimit;
  -    if (!v->marked())
  +    if (v && !v->marked())
           v->mark();
   
       v = _shadowOffsetX;
  -    if (!v->marked())
  +    if (v && !v->marked())
           v->mark();
   
       v = _shadowOffsetY;
  -    if (!v->marked())
  +    if (v && !v->marked())
           v->mark();
   
       v = _shadowBlur;
  -    if (!v->marked())
  +    if (v && !v->marked())
           v->mark();
   
       v = _shadowColor;
  -    if (!v->marked())
  +    if (v && !v->marked())
           v->mark();
   
       v = _globalAlpha;
  -    if (!v->marked())
  +    if (v && !v->marked())
           v->mark();
   
  -    v = _globalComposite;;
  -    if (!v->marked())
  +    v = _globalComposite;
  +    if (v && !v->marked())
           v->mark();
   
       QPtrListIterator<List> it(stateStack);
  @@ -4859,6 +4859,8 @@
           list->mark();
           ++it;
       }
  +    
  +    DOMObject::mark();
   }
   
   const ClassInfo KJS::Gradient::info = { "Gradient", 0, &GradientTable, 0 };
  
  
  
  1.1                  WebCore/layout-tests/fast/dom/gc-4-expected.txt
  
  Index: gc-4-expected.txt
  ===================================================================
  This test checks for a regression against rdar://problem/4152454 crash in KJS::ExprStatementNode::execute(KJS::ExecState*) in World Clock widget with TOT. The original bug occurred because some objects did not properly mark themselves, and so the garbage collector prematurely destroyed them.
  
  If the test passes, you will see the word "passed" below. Otherwise, it will crash.
  
  
  passed
  
  
  
  1.1                  WebCore/layout-tests/fast/dom/gc-4.html
  
  Index: gc-4.html
  ===================================================================
  <html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <script type='text/javascript' charset='utf-8'>
  function print(message) {
  	var paragraph = document.createElement("p");
  	paragraph.appendChild(document.createTextNode(message));
  	document.getElementById("console").appendChild(paragraph);
  }
  
  function test() {
  	if (window.layoutTestController) {
  		layoutTestController.dumpAsText();
  	}
  
  	for (x = 0; x < 1000; x++) {
  		var canvas = document.getElementById("canvas");
  		var context = canvas.getContext("2d");
  		context.save();
  	}
  	
  	print("passed");
  }
  </script>
  </head>
  <body onload="test();">
  <p>This test checks for a regression against <i>rdar://problem/4152454 crash in KJS::ExprStatementNode::execute(KJS::ExecState*) in World Clock widget with TOT</i>. The original bug occurred because some objects did not properly mark themselves, and so the garbage collector prematurely destroyed them.</p>
  <p>If the test passes, you will see the word "passed" below. Otherwise, it will crash.</p>
  <hr>
  <canvas id='canvas' width='172' height='172'/>
  <div id='console'/>
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list