[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:49:07 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 124b22c32519d980fd1d01ddc0186894b4ac98e7
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 8 19:33:15 2004 +0000

    	Fixed: <rdar://problem/3650140> reproducible assertion failure going to plugin page with JavaScript disabled
    
            Reviewed by john.
    
            * Plugins.subproj/WebBaseNetscapePluginView.m:
            (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): don't call NPP_NewStream and other stream methods if there is no JS result to deliver. This is what Mozilla does.
            (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): Return NPERR_GENERIC_ERROR if JS is disabled. This is what Mozilla does.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6975 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 99042ff..ba8cefc 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,13 @@
+2004-07-08  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: <rdar://problem/3650140> reproducible assertion failure going to plugin page with JavaScript disabled
+
+        Reviewed by john.
+
+        * Plugins.subproj/WebBaseNetscapePluginView.m:
+        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): don't call NPP_NewStream and other stream methods if there is no JS result to deliver. This is what Mozilla does.
+        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): Return NPERR_GENERIC_ERROR if JS is disabled. This is what Mozilla does.
+
 === Safari-151 ===
 
 2004-07-07  Trey Matteson  <trey at apple.com>
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
index 050e535..938f0ec 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
@@ -1326,13 +1326,9 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
         if (notifyData) {
             NPP_URLNotify(instance, [URL _web_URLCString], NPRES_DONE, notifyData);
         }
-    } else {
-        NSData *JSData = nil;
-        
-        if ([result length] > 0) {
-            JSData = [result dataUsingEncoding:NSUTF8StringEncoding];
-        }
-        
+    } else if ([result length] > 0) {
+        // Don't call NPP_NewStream and other stream methods if there is no JS result to deliver. This is what Mozilla does.
+        NSData *JSData = [result dataUsingEncoding:NSUTF8StringEncoding];
         WebBaseNetscapePluginStream *stream = [[WebBaseNetscapePluginStream alloc] init];
         [stream setPluginPointer:instance];
         [stream setNotifyData:notifyData];
@@ -1411,10 +1407,15 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
     }
     
     NSString *JSString = [URL _web_scriptIfJavaScriptURL];
-    if (JSString != nil && cTarget == NULL && mode == NP_FULL) {
-        // Don't allow a JavaScript request from a standalone plug-in that is self-targetted
-        // because this can cause the user to be redirected to a blank page (3424039).
-        return NPERR_INVALID_PARAM;
+    if (JSString != nil) {
+        if (![[[self webView] preferences] isJavaScriptEnabled]) {
+            // Return NPERR_GENERIC_ERROR if JS is disabled. This is what Mozilla does.
+            return NPERR_GENERIC_ERROR;
+        } else if (cTarget == NULL && mode == NP_FULL) {
+            // Don't allow a JavaScript request from a standalone plug-in that is self-targetted
+            // because this can cause the user to be redirected to a blank page (3424039).
+            return NPERR_INVALID_PARAM;
+        }
     }
         
     if (cTarget || JSString) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list