Reviewed by Tim O.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jul 2006 18:21:18 +0000 (18:21 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jul 2006 18:21:18 +0000 (18:21 +0000)
        - http://bugzilla.opendarwin.org/show_bug.cgi?id=7808
        Assertion failure in -[WebBaseNetscapePluginStream dealloc] when requesting an invalid URL

WebKit:
        * Plugins/WebNetscapePluginStream.m:
        (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
        Remove the early return when requesting an invalid (unsupported) URL.

WebKitTools:
        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
        (pluginInvoke): treat getURL() with one parameter as if the second parameter were NULL -
        should open a new stream and deliver the data to the current instance.

LayoutTests:
        * plugins/get-empty-url-expected.txt: Added.
        * plugins/get-empty-url.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15337 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/plugins/get-empty-url-expected.txt [new file with mode: 0644]
LayoutTests/plugins/get-empty-url.html [new file with mode: 0644]
WebKit/ChangeLog
WebKit/Plugins/WebNetscapePluginStream.m
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c

index 172f644..2956c9a 100644 (file)
@@ -1,3 +1,13 @@
+2006-07-11  Alexey Proskuryakov  <ap@nypop.com>
+
+        Reviewed by Tim O.
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7808
+        Assertion failure in -[WebBaseNetscapePluginStream dealloc] when requesting an invalid URL
+
+        * plugins/get-empty-url-expected.txt: Added.
+        * plugins/get-empty-url.html: Added.
+
 2006-07-10  David Kilzer  <ddkilzer@kilzer.net>
 
         Reviewed by Darin.
diff --git a/LayoutTests/plugins/get-empty-url-expected.txt b/LayoutTests/plugins/get-empty-url-expected.txt
new file mode 100644 (file)
index 0000000..eb02ecb
--- /dev/null
@@ -0,0 +1,4 @@
+
+Test for bug 7808. Should not fail with an assertion.
+
+
diff --git a/LayoutTests/plugins/get-empty-url.html b/LayoutTests/plugins/get-empty-url.html
new file mode 100644 (file)
index 0000000..2ea743a
--- /dev/null
@@ -0,0 +1,14 @@
+<html>
+<body>
+<embed name="plg" type="application/x-webkit-test-netscape"></embed>
+<p>Test for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=7808">bug 7808<a/>. Should not fail with an assertion.</p>
+<script>
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        plg.getURL("");
+    } else {
+        document.write("Cannot run interactively");
+    }
+</script>
+</body>
+</html>
index 0c97fc1..4547e9a 100644 (file)
@@ -1,3 +1,14 @@
+2006-07-11  Alexey Proskuryakov  <ap@nypop.com>
+
+        Reviewed by Tim O.
+
+        - http://bugzilla.opendarwin.org/show_bug.cgi?id=7808
+        Assertion failure in -[WebBaseNetscapePluginStream dealloc] when requesting an invalid URL
+
+        * Plugins/WebNetscapePluginStream.m:
+        (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
+        Remove the early return when requesting an invalid (unsupported) URL.
+
 === Safari-521.16 ===
 
 2006-07-10  Mitz Pettel  <opendarwin.org@mitzpettel.com>
index 7246211..7d9efc9 100644 (file)
     // Temporarily set isTerminated to YES to avoid assertion failure in dealloc in case we are released in this method.
     isTerminated = YES;
     
-    if (![WebView _canHandleRequest:theRequest]) {
-        [self release];
-        return nil;
-    }
-        
     request = [theRequest mutableCopy];
     if (hideReferrer) {
         [(NSMutableURLRequest *)request _web_setHTTPReferrer:nil];
index 5e97167..9cb178d 100644 (file)
@@ -1,3 +1,14 @@
+2006-07-11  Alexey Proskuryakov  <ap@nypop.com>
+
+        Reviewed by Tim O.
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7808
+        Assertion failure in -[WebBaseNetscapePluginStream dealloc] when requesting an invalid URL
+
+        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+        (pluginInvoke): treat getURL() with one parameter as if the second parameter were NULL -
+        should open a new stream and deliver the data to the current instance.
+
 2006-07-11  Timothy Hatcher  <timothy@apple.com>
 
         Reviewed by Darin.
index 22c41f0..d05cc14 100644 (file)
@@ -184,6 +184,13 @@ static bool pluginInvoke(NPObject *header, NPIdentifier name, const NPVariant *a
 
             VOID_TO_NPVARIANT(*result);
             return true;
+        } else if (argCount == 1 && NPVARIANT_IS_STRING(args[0])) {
+            NPUTF8* urlString = createCStringFromNPVariant(&args[0]);
+            browser->geturl(obj->npp, urlString, 0);
+            free(urlString);
+
+            VOID_TO_NPVARIANT(*result);
+            return true;
         }
     } else if (name == pluginMethodIdentifiers[ID_REMOVE_DEFAULT_METHOD]) {
         pluginClass.invokeDefault = 0;