[webkit-reviews] review denied: [Bug 8564] crashed when closing a tab : [Attachment 7969] Patch to more clearly define Netscape plug-in view teardown

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Wed Apr 26 08:11:51 PDT 2006

Darin Adler <darin at apple.com> has denied Darin Adler <darin at apple.com>'s
request for review:
Bug 8564: crashed when closing a tab

Attachment 7969: Patch to more clearly define Netscape plug-in view teardown

------- Additional Comments from Darin Adler <darin at apple.com>
+    NSEnumerator *plugInViewEnumerator = [_private->plugInViews
+    NSView *plugInView;
+    while ((plugInView = [plugInViewEnumerator nextObject]) != nil)
+	 [plugInView setWebFrame:nil];

How about [_private->plugInViews
makeObjectsPerformSelector:@selector(setWebFrame:) withObject:nil] for this?

+	 Noticed a little bit of funny logic here.  We should stop the plug-in
when it is removed from
+	 its host window, regardless of whether it is still in an NSWindow. 
Our documentation pretty
+	 strongly implies that plugins and JavaScript will not work in a
WebView that has no host window.

This seems completely wrong to me. Regardless of how the documentation is
written, plug-ins are supposed to work in WebViews even if we don't explicitly
set a host window. The point of hostWindow is to allow a view to remain
attached to a window when it's not in the window any more, but for simple
WebView uses where there's no need to detach and reattach the view to a window,
you wdon't need to use hostWindow at all. It was really added so we could
support tabs.

If we need to update the documentation, that's fine, but we should not change
plug-ins and JavaScript to work only when a hostWindow is set.

More information about the webkit-reviews mailing list