[icedtea-web/f15] - Add patch from upstream fix for RH586194

Deepak Bhole dbhole at fedoraproject.org
Wed Dec 21 22:42:57 UTC 2011


commit fa6d5175f69867c3274d9babd2751a50425a5aad
Author: Deepak Bhole <dbhole at redhat.com>
Date:   Wed Dec 21 17:41:50 2011 -0500

    - Add patch from upstream fix for RH586194

 icedtea-web-rh586194.patch |   80 ++++++++++++++++++++++++++++++++++++++++++++
 icedtea-web.spec           |    7 +++-
 2 files changed, 86 insertions(+), 1 deletions(-)
---
diff --git a/icedtea-web-rh586194.patch b/icedtea-web-rh586194.patch
new file mode 100644
index 0000000..80f4a55
--- /dev/null
+++ b/icedtea-web-rh586194.patch
@@ -0,0 +1,80 @@
+diff -r c5faf63fc34e -r 42c3ed21e228 plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
+--- a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc	Wed Dec 21 09:46:46 2011 +0100
++++ b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc	Wed Dec 21 17:29:45 2011 -0500
+@@ -490,12 +490,12 @@
+     JavaRequestProcessor java_request = JavaRequestProcessor();
+     JavaResultData* java_result;
+     NPVariant* parent_ptr;
++    NPVariant* member_ptr;
+ 
+     //int reference;
+     std::string member_id = std::string();
+-    std::string jsObjectClassID = std::string();
+-    std::string jsObjectConstructorID = std::string();
+     std::string response = std::string();
++    std::string result_id = std::string();
+ 
+     NPIdentifier member_identifier;
+ 
+@@ -551,50 +551,9 @@
+ 
+     PLUGIN_DEBUG("Member PTR after internal request: %s\n", thread_data.result.c_str());
+ 
+-    java_result = java_request.findClass(0, "netscape.javascript.JSObject");
++    member_ptr = (NPVariant*) IcedTeaPluginUtilities::stringToJSID(thread_data.result);
+ 
+-    // the result we want is in result_string (assuming there was no error)
+-    if (java_result->error_occurred)
+-    {
+-        printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
+-        //goto cleanup;
+-    }
+-
+-    jsObjectClassID.append(*(java_result->return_string));
+-
+-    args = std::vector<std::string>();
+-    std::string longArg = "J";
+-    args.push_back(longArg);
+-
+-    java_result = java_request.getMethodID(jsObjectClassID,
+-                                           browser_functions.getstringidentifier("<init>"),
+-                                           args);
+-
+-    // the result we want is in result_string (assuming there was no error)
+-    if (java_result->error_occurred)
+-    {
+-        printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
+-        //goto cleanup;
+-    }
+-
+-    jsObjectConstructorID.append(*(java_result->return_string));
+-
+-    // We have the method id. Now create a new object.
+-
+-    args.clear();
+-    args.push_back(thread_data.result);
+-    java_result = java_request.newObjectWithConstructor("",
+-                                         jsObjectClassID,
+-                                         jsObjectConstructorID,
+-                                         args);
+-
+-    // the result we want is in result_string (assuming there was no error)
+-    if (java_result->error_occurred)
+-    {
+-        printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
+-        //goto cleanup;
+-    }
+-
++    createJavaObjectFromVariant(instance, *member_ptr, &result_id);
+ 
+     IcedTeaPluginUtilities::constructMessagePrefix(0, reference, &response);
+     if (*(message_parts->at(2)) == "GetSlot")
+@@ -603,7 +562,7 @@
+     } else {
+         response.append(" JavaScriptGetSlot ");
+     }
+-    response.append(java_result->return_string->c_str());
++    response.append(result_id.c_str());
+     plugin_to_java_bus->post(response.c_str());
+ }
+ 
diff --git a/icedtea-web.spec b/icedtea-web.spec
index 97d10ab..09f63dd 100644
--- a/icedtea-web.spec
+++ b/icedtea-web.spec
@@ -37,7 +37,7 @@
 
 Name:       icedtea-web
 Version:    1.0.6
-Release:    2%{?dist}
+Release:    3%{?dist}
 Summary:    Additional Java components for OpenJDK
 
 Group:      Applications/Internet
@@ -45,6 +45,7 @@ License:    LGPLv2+ and GPLv2 with exceptions
 URL:        http://icedtea.classpath.org/wiki/IcedTea-Web
 Source0:    http://icedtea.classpath.org/download/source/%{name}-%{version}.tar.gz
 Patch0:     %{name}-%{version}-npapi-fix.patch
+Patch1:     %{name}-rh586194.patch
 
 BuildRequires:  java-1.6.0-openjdk-devel
 BuildRequires:  desktop-file-utils
@@ -93,6 +94,7 @@ This package contains Javadocs for the IcedTea-Web project.
 %setup -q
 
 %patch0
+%patch1 -p1
 
 %build
 ./configure \
@@ -155,6 +157,9 @@ exit 0
 %doc COPYING
 
 %changelog
+* Wed Dec 21 2011 Deepak Bhole <dbhole at redhat.com> 1.0.6-3
+- Add patch from upstream fix for RH586194
+
 * Fri Nov 25 2011 Deepak Bhole <dbhole at redhat.com> 1.0.6-2
 - Resolves rhbz#757191
 - Bumped min_openjdk_version to -60 (latest f15)


More information about the scm-commits mailing list