[PATCH] icedtea6-1.6-npplugin-xulrunner191.patch

Deepak Bhole dbhole at redhat.com
Thu Sep 10 07:31:06 PDT 2009


* Michal Vyskocil <mvyskocil at suse.cz> [2009-09-10 09:36]:
> Hi,
> 
> a following patch enables icedtea npplugin with xulrunner191, because there 
> are some small API changes between 190 and 191.
> 
> Regards
> Michal Vyskocil

> Index: icedtea6-1.6/plugin/icedteanp/IcedTeaNPPlugin.cc
> ===================================================================
> --- icedtea6-1.6.orig/plugin/icedteanp/IcedTeaNPPlugin.cc	2009-09-08 16:19:48.000000000 +0200
> +++ icedtea6-1.6/plugin/icedteanp/IcedTeaNPPlugin.cc	2009-09-10 12:50:43.927840173 +0200
> @@ -1824,17 +1824,17 @@
>    // Return to the browser the plugin functions that we implement.
>    pluginTable->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
>    pluginTable->size = sizeof (NPPluginFuncs);
> -  pluginTable->newp = NewNPP_NewProc (GCJ_New);
> -  pluginTable->destroy = NewNPP_DestroyProc (GCJ_Destroy);
> -  pluginTable->setwindow = NewNPP_SetWindowProc (GCJ_SetWindow);
> -  pluginTable->newstream = NewNPP_NewStreamProc (GCJ_NewStream);
> -  pluginTable->destroystream = NewNPP_DestroyStreamProc (GCJ_DestroyStream);
> -  pluginTable->asfile = NewNPP_StreamAsFileProc (GCJ_StreamAsFile);
> -  pluginTable->writeready = NewNPP_WriteReadyProc (GCJ_WriteReady);
> -  pluginTable->write = NewNPP_WriteProc (GCJ_Write);
> -  pluginTable->print = NewNPP_PrintProc (GCJ_Print);
> -  pluginTable->urlnotify = NewNPP_URLNotifyProc (GCJ_URLNotify);
> -  pluginTable->getvalue = NewNPP_GetValueProc (GCJ_GetValue);
> +  pluginTable->newp = NPP_NewProcPtr (GCJ_New);
> +  pluginTable->destroy = NPP_DestroyProcPtr (GCJ_Destroy);
> +  pluginTable->setwindow = NPP_SetWindowProcPtr (GCJ_SetWindow);
> +  pluginTable->newstream = NPP_NewStreamProcPtr (GCJ_NewStream);
> +  pluginTable->destroystream = NPP_DestroyStreamProcPtr (GCJ_DestroyStream);
> +  pluginTable->asfile = NPP_StreamAsFileProcPtr (GCJ_StreamAsFile);
> +  pluginTable->writeready = NPP_WriteReadyProcPtr (GCJ_WriteReady);
> +  pluginTable->write = NPP_WriteProcPtr (GCJ_Write);
> +  pluginTable->print = NPP_PrintProcPtr (GCJ_Print);
> +  pluginTable->urlnotify = NPP_URLNotifyProcPtr (GCJ_URLNotify);
> +  pluginTable->getvalue = NPP_GetValueProcPtr (GCJ_GetValue);
>  

Thanks. I don't think this patch is needed as is though (in the current
incarnation I mean). The code in mercurial already has an if/else based on
xulrunner >= 1.9.2. The API in 1.9.2 appears similar to 1.9.1, so it is
just a matter of updating the condition. I will need to test it though
to make sure it all works. I will make the changes in my next commit.

Cheers,
Deepak

>    // Make sure the plugin data directory exists, creating it if
>    // necessary.
> Index: icedtea6-1.6/plugin/icedteanp/IcedTeaScriptablePluginObject.h
> ===================================================================
> --- icedtea6-1.6.orig/plugin/icedteanp/IcedTeaScriptablePluginObject.h	2009-09-08 16:19:48.000000000 +0200
> +++ icedtea6-1.6/plugin/icedteanp/IcedTeaScriptablePluginObject.h	2009-09-10 12:49:44.027841169 +0200
> @@ -39,7 +39,7 @@
>  #ifndef __ICEDTEASCRIPTABLEPLUGINOBJECT_H_
>  #define __ICEDTEASCRIPTABLEPLUGINOBJECT_H_
>  
> -#include "npupp.h"
> +#include <npfunctions.h>
>  
>  #include "IcedTeaJavaRequestProcessor.h"
>  #include "IcedTeaNPPlugin.h"
> Index: icedtea6-1.6/plugin/icedteanp/IcedTeaNPPlugin.h
> ===================================================================
> --- icedtea6-1.6.orig/plugin/icedteanp/IcedTeaNPPlugin.h	2009-09-08 16:19:48.000000000 +0200
> +++ icedtea6-1.6/plugin/icedteanp/IcedTeaNPPlugin.h	2009-09-10 13:47:50.816340579 +0200
> @@ -41,7 +41,7 @@
>  
>  // Netscape plugin API includes.
>  #include <npapi.h>
> -#include <npupp.h>
> +#include <npfunctions.h>
>  #include <nsThreadUtils.h>
>  
>  // GLib includes.
> Index: icedtea6-1.6/plugin/icedteanp/IcedTeaPluginRequestProcessor.h
> ===================================================================
> --- icedtea6-1.6.orig/plugin/icedteanp/IcedTeaPluginRequestProcessor.h	2009-09-08 16:19:48.000000000 +0200
> +++ icedtea6-1.6/plugin/icedteanp/IcedTeaPluginRequestProcessor.h	2009-09-10 13:48:46.500338879 +0200
> @@ -46,7 +46,7 @@
>  #include <time.h>
>  
>  #include <npapi.h>
> -#include <npupp.h>
> +#include <npfunctions.h>
>  
>  #include "IcedTeaRunnable.h"
>  #include "IcedTeaPluginUtils.h"






More information about the distro-pkg-dev mailing list