Ticket #213 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Crash Safari with MochiKit.Iter.list

Reported by: anonymous Assigned to: bob@redivi.com
Priority: normal Milestone: MochiKit 1.4
Component: component1 Version:
Severity: normal Keywords:
Cc:

Description

Safari 2.0.4 crashes (The Safari nightly builds are fine) with this Javascript:

var n = document.createElement("DIV"); n.appendChild(document.createTextNode("")); var list = MochiKit.Iter.list(n.childNodes);

The crash occurs when MochiKit dereferences n.childNodes (NodeList?) by checking for n.childNodes.slice.

The corresponding WebKit? bug is here: http://bugs.webkit.org/show_bug.cgi?id=12191

Change History

01/13/07 10:53:56 changed by bob@redivi.com

  • milestone set to MochiKit 1.4.

01/20/07 19:12:02 changed by bob@redivi.com

  • owner changed from somebody to bob@redivi.com.

01/20/07 19:12:13 changed by bob@redivi.com

  • status changed from new to assigned.

01/20/07 19:41:03 changed by bob@redivi.com

  • status changed from assigned to closed.
  • resolution set to fixed.

01/21/07 01:39:25 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

I didn't mean to leave it out, but the nature of this bug affects more than just MochiKit.Iter.List. Several other methods also accept a NodeList? as a parameter and will also need fixing.

I haven't done a thorough analysis, but in my daily usage I have identified:

MochiKit.DOM.appendChildNodes MochiKit.DOM.replaceChildNodes

as also needing a fix. They can crash Safari when called as:

appendChildNodes(elm, elm2.childNodes); replaceChildNodes(elm, elm2.childNodes);

01/21/07 09:24:34 changed by anonymous

  • status changed from reopened to closed.
  • resolution set to fixed.

01/21/07 09:25:01 changed by anonymous