<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>87687</bug_id>
          
          <creation_ts>2012-05-28 18:48:17 -0700</creation_ts>
          <short_desc>Check for GTK2/GTK3 symbol mismatch earlier</short_desc>
          <delta_ts>2012-05-30 12:08:31 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Daniel Drake">dsd</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>mario</cc>
    
    <cc>mrobinson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>635504</commentid>
    <comment_count>0</comment_count>
      <attachid>144423</attachid>
    <who name="Daniel Drake">dsd</who>
    <bug_when>2012-05-28 18:48:17 -0700</bug_when>
    <thetext>Created attachment 144423
patch

WebKit2 move plugins into their own process, but WebKit1 (built for GTK3) is left with the limitation that if a plugin links against GTK2, it will fail to run.

nspluginwrapper could maybe work around this issue, by adding in a process separation, but this doesn&apos;t work on current released WebKit. The affected sites just show an empty box where the content should be.

Using Flash as an example, I dug down and found that the behaviour is something like the following:
 - Load both &quot;real&quot; libflashplayer and the wrapped libflashplayer
 - Try to show the flash content using the real libflashplayer
 - Abort because a mix of GTK2/GTK3 symbols was detected

And that&apos;s it - it didn&apos;t even try the wrapped libflashplayer which advertises support for the same mime types.

I found a way to fix this: Move the GTK2/GTK3 symbol check earlier, and don&apos;t even register plugins in the PluginDatabase if there is a symbol mismatch. See attached patch.

With this patch applied, I can finally view flash content in recent Epiphany versions, via nspluginwrapper!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>635668</commentid>
    <comment_count>1</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2012-05-29 00:29:45 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; Created an attachment (id=144423) [details]
&gt; patch
&gt; 
&gt; WebKit2 move plugins into their own process, but WebKit1 (built for GTK3) 
&gt; is left with the limitation that if a plugin links against GTK2, it will 
&gt; fail to run.

Yes, that&apos;s a known issue :-(

&gt; nspluginwrapper could maybe work around this issue, by adding in a process
&gt; separation, but this doesn&apos;t work on current released WebKit. The affected 
&gt; sites just show an empty box where the content should be.

Hmm... In my case, I&apos;ve been using epiphany 3.x and WebKit1 (linking against GTK3) without problems with the flash plugin thanks to nspluginwrapper, so I don&apos;t know if I&apos;m missing something here.

True to be told, my laptop is a 64bit system and works fine here, but I&apos;ve never managed to make this &quot;nspluginwrapper workaround&quot; work in 32bit systems, which as far as I could read is a known limitation of nspluginwrapper.

So, maybe your system is a 32bit one and yuo have found a fix even for those systems? Otherwise (if you&apos;re using it in a 64bit environment) I think I&apos;m missing something, because nspluginwrapper should work fine.

&gt; Using Flash as an example, I dug down and found that the behaviour is 
&gt; something like the following:
&gt;  - Load both &quot;real&quot; libflashplayer and the wrapped libflashplayer
&gt;  - Try to show the flash content using the real libflashplayer
&gt;  - Abort because a mix of GTK2/GTK3 symbols was detected
&gt; 
&gt; And that&apos;s it - it didn&apos;t even try the wrapped libflashplayer which 
&gt; advertises support for the same mime types.
&gt; 
&gt; I found a way to fix this: Move the GTK2/GTK3 symbol check earlier, and 
&gt; don&apos;t even register plugins in the PluginDatabase if there is a symbol
&gt; mismatch. See attached patch.

Nice! By the way, whenever you attach a patch and ask for review, you should take care of putting the &quot;right&quot; reviewers on CC, otherwise it might end up unattended.

As per the output of git blame, it see Carlos could be a good reviewer for this one, so adding him o CC now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>635721</commentid>
    <comment_count>2</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2012-05-29 01:41:05 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; [...]
&gt; Hmm... In my case, I&apos;ve been using epiphany 3.x and WebKit1 (linking against GTK3) without problems with the flash plugin thanks to nspluginwrapper, so I don&apos;t know if I&apos;m missing something here.
&gt; 
&gt; True to be told, my laptop is a 64bit system and works fine here, but I&apos;ve never managed to make this &quot;nspluginwrapper workaround&quot; work in 32bit systems, which as far as I could read is a known limitation of nspluginwrapper.
&gt; 
&gt; So, maybe your system is a 32bit one and yuo have found a fix even for those systems? Otherwise (if you&apos;re using it in a 64bit environment) I think I&apos;m missing something, because nspluginwrapper should work fine.

I&apos;m stupid. I&apos;ve just read a mail of yours in webkit-gtk mailing list talking about this[1] and realized you are the same person I answered in the mailing list some time ago, where you already mentioned you had a 32bit system.

So it seems you fixed the flash plugin issue with nspluginwrapper in 32bit systems too. \o/

[1] http://lists.webkit.org/pipermail/webkit-gtk/2012-May/001124.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636036</commentid>
    <comment_count>3</comment_count>
      <attachid>144423</attachid>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2012-05-29 08:10:50 -0700</bug_when>
    <thetext>Comment on attachment 144423
patch

I&apos;ll add a ChangeLog and land this one, but in the future when submitting patches take a look at http://www.webkit.org/coding/contributing.html which will show you how to make a proper patch with a ChangeLog. Thanks for your contribution!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>637514</commentid>
    <comment_count>4</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2012-05-30 12:08:31 -0700</bug_when>
    <thetext>Committed r118949: &lt;http://trac.webkit.org/changeset/118949&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>144423</attachid>
            <date>2012-05-28 18:48:17 -0700</date>
            <delta_ts>2012-05-29 08:10:50 -0700</delta_ts>
            <desc>patch</desc>
            <filename>plugindebug.patch</filename>
            <type>text/plain</type>
            <size>2111</size>
            <attacher name="Daniel Drake">dsd</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC1yMTE4NTE1LWd0azMvU291cmNlL1dlYkNvcmUvcGx1Z2lucy9ndGsvUGx1
Z2luUGFja2FnZUd0ay5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViS2l0LXIxMTg1MTUtZ3RrMy5vcmln
L1NvdXJjZS9XZWJDb3JlL3BsdWdpbnMvZ3RrL1BsdWdpblBhY2thZ2VHdGsuY3BwCisrKyBXZWJL
aXQtcjExODUxNS1ndGszL1NvdXJjZS9XZWJDb3JlL3BsdWdpbnMvZ3RrL1BsdWdpblBhY2thZ2VH
dGsuY3BwCkBAIC0xMTksNiArMTE5LDE2IEBAIHN0YXRpYyBpbnQgd2Via2l0Z3RrWEVycm9yKERp
c3BsYXkqIHhkaXMKIH0KICNlbmRpZgogCitzdGF0aWMgYm9vbCBtb2R1bGVNaXhlc0d0a1N5bWJv
bHMoR01vZHVsZSogbW9kdWxlKQoreworICAgIGdwb2ludGVyIHN5bWJvbDsKKyNpZmRlZiBHVEtf
QVBJX1ZFUlNJT05fMgorICAgIHJldHVybiBnX21vZHVsZV9zeW1ib2wobW9kdWxlLCAiZ3RrX2Fw
cGxpY2F0aW9uX2dldF90eXBlIiwgJnN5bWJvbCk7CisjZWxzZQorICAgIHJldHVybiBnX21vZHVs
ZV9zeW1ib2wobW9kdWxlLCAiZ3RrX29iamVjdF9nZXRfdHlwZSI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ZU1peGVzR3Rr
U3ltYm9scyhHTW9kdWxlKiBtb2R1bGUpCi17Ci0gICAgZ3BvaW50ZXIgc3ltYm9sOwotI2lmZGVm
IEdUS19BUElfVkVSU0lPTl8yCi0gICAgcmV0dXJuIGdfbW9kdWxlX3N5bWJvbChtb2R1bGUsICJn
dGtfYXBwbGljYXRpb25fZ2V0X3R5cGUiLCAmc3ltYm9sKTsKLSNlbHNlCi0gICAgcmV0dXJuIGdf
bW9kdWxlX3N5bWJvbChtb2R1bGUsICJndGtfb2JqZWN0X2dldF90eXBlIiwgJnN5bWJvbCk7Ci0j
ZW5kaWYKLX0KLQogYm9vbCBQbHVnaW5WaWV3OjpwbGF0Zm9ybVN0YXJ0KCkKIHsKICAgICBBU1NF
UlQobV9pc1N0YXJ0ZWQpOwogICAgIEFTU0VSVChtX3N0YXR1cyA9PSBQbHVnaW5TdGF0dXNMb2Fk
ZWRTdWNjZXNzZnVsbHkpOwogCi0gICAgaWYgKG1vZHVsZU1peGVzR3RrU3ltYm9scyhtX3BsdWdp
bi0+bW9kdWxlKCkpKSB7Ci0gICAgICAgIExPRyhQbHVnaW5zLCAiTW9kdWxlICclcycgbWl4ZXMg
R1RLKyAyIGFuZCBHVEsrIDMgc3ltYm9scywgaWdub3JpbmcgcGx1Z2luLlxuIiwgbV9wbHVnaW4t
PnBhdGgoKS51dGY4KCkuZGF0YSgpKTsKLSAgICAgICAgcmV0dXJuIGZhbHNlOwotICAgIH0KLQog
I2lmIGRlZmluZWQoWFBfVU5JWCkKICAgICBpZiAobV9wbHVnaW4tPnBsdWdpbkZ1bmNzKCktPmdl
dHZhbHVlKSB7CiAgICAgICAgIFBsdWdpblZpZXc6OnNldEN1cnJlbnRQbHVnaW5WaWV3KHRoaXMp
Owo=
</data>
<flag name="review"
          id="151262"
          type_id="1"
          status="+"
          setter="mrobinson"
    />
          </attachment>
      

    </bug>

</bugzilla>