[webkit-reviews] review granted: [Bug 6010] SVGLoad event is not supported : [Attachment 9995] final patch (with layout test updates, no malloc-avoiding optimization)

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Sat Aug 12 18:16:56 PDT 2006


Darin Adler <darin at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 6010: SVGLoad event is not supported
http://bugzilla.opendarwin.org/show_bug.cgi?id=6010

Attachment 9995: final patch (with layout test updates, no malloc-avoiding
optimization)
http://bugzilla.opendarwin.org/attachment.cgi?id=9995&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
Looks good. r=me

Code like this:

-	 ExceptionCode ec;
-	 RefPtr<Event> ev = m_doc->createEvent("HTMLEvents", ec);
-	 ev->initEvent(readystatechangeEvent, true, true);
+	 RefPtr<Event> ev = new Event(readystatechangeEvent, true, true);
	 m_onReadyStateChangeListener->handleEvent(ev.get(), true);

can just be written as:
	 m_onReadyStateChangeListener->handleEvent(new
Event(readystatechangeEvent, true, true), true);

One of the nice things about PassRefPtr is that it enables that idiom, and it's
actually more efficient too. There's no need for the get() in any case, since
you can pass a RefPtr to a PassRefPtr without it. If you want to be more
optimal you could use release() there instead of get().



More information about the webkit-reviews mailing list