<?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>176881</bug_id>
          
          <creation_ts>2017-09-13 16:25:12 -0700</creation_ts>
          <short_desc>REGRESSION (r164015): Layout Test plugins/js-from-destroy.html is flaky</short_desc>
          <delta_ts>2018-02-05 15:07:12 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Plug-ins</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=181889</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>128712</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matt Lewis">jlewis3</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>dbates</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1348550</commentid>
    <comment_count>0</comment_count>
    <who name="Matt Lewis">jlewis3</who>
    <bug_when>2017-09-13 16:25:12 -0700</bug_when>
    <thetext>plugins/js-from-destroy.html is a flaky failure on macOS according to the flakiness dashboard:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&amp;tests=plugins%2Fjs-from-destroy.html

Results:

https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK2%20(Tests)/r221995%20(3021)/results.html
https://build.webkit.org/builders/Apple%20Sierra%20Debug%20WK2%20(Tests)/builds/3021

Diff:

--- /Volumes/Data/slave/sierra-debug-tests-wk2/build/layout-test-results/plugins/js-from-destroy-expected.txt
+++ /Volumes/Data/slave/sierra-debug-tests-wk2/build/layout-test-results/plugins/js-from-destroy-actual.txt
@@ -1 +1,2 @@
+CONSOLE MESSAGE: XMLHttpRequest cannot load  due to access control checks.
 PASS if didn&apos;t crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1348816</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-09-14 10:04:07 -0700</bug_when>
    <thetext>Is this leaking from a preceding test?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1360967</commentid>
    <comment_count>2</comment_count>
    <who name="Matt Lewis">jlewis3</who>
    <bug_when>2017-10-16 14:53:50 -0700</bug_when>
    <thetext>I was able to reproduce the failure with:

run-webkit-tests --no-retry-failure --iterations=50 plugins/js-from-destroy.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1361241</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-10-17 08:40:47 -0700</bug_when>
    <thetext>&lt;rdar://problem/35029828&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1362854</commentid>
    <comment_count>4</comment_count>
    <who name="Matt Lewis">jlewis3</who>
    <bug_when>2017-10-20 13:58:54 -0700</bug_when>
    <thetext>Marked as Flaky in:

https://trac.webkit.org/changeset/223793/webkit/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1391279</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2018-01-19 16:29:59 -0800</bug_when>
    <thetext>The cause of the flakiness is &lt;https://trac.webkit.org/changeset/164015&gt; (bug #128712).

We have not supported JavaScript evaluation from NPP_Destroy() on macOS for Out-of-Process plugins for many years now. We disallowed such behavior in &lt;https://trac.webkit.org/changeset/42789&gt; and &lt;https://trac.webkit.org/changeset/62279&gt; (bug #41431). We should make WebKit match the behavior the OOP plugins on macOS and then change the test plugins/js-from-destroy.html and others to ensure that we do not allow JavaScript evaluation from NPP_Destroy(). See bug #181889 for more details.

Additional remarks:

Plugin tests that evaluate JavaScript from NPP_Destroy() have been flaky in WebKit since &lt;https://trac.webkit.org/changeset/164015&gt; (bug #128712). Following r164015 when NPP_Destroy() is called there is a racy between the time the PluginProcess&apos;s response reaches the WebProcess and it invalidates the PluginProcess connection and the PluginProcess sends a synchronous message to the WebProcess to evaluate the JavaScript specified in the ondestroy handler of an &lt;embed&gt;. Depending on who wins the race the ondestroy handler may or may not be invoked =&gt; a console message may or may not be in the result for the test plugins/js-from-destroy.html.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1396568</commentid>
    <comment_count>6</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2018-02-05 14:58:48 -0800</bug_when>
    <thetext>Following &lt;https://trac.webkit.org/changeset/228100&gt; (bug #181889) test plugins/js-from-destroy.html is marked WontFix for both WebKit2 and Mac WebKit1 as both WebKit and WebKit Legacy on Mac do not allow JavaScript execution from NPP_Destroy().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1396573</commentid>
    <comment_count>7</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2018-02-05 15:07:12 -0800</bug_when>
    <thetext>(In reply to Daniel Bates from comment #6)
&gt; Following &lt;https://trac.webkit.org/changeset/228100&gt; (bug #181889) test
&gt; plugins/js-from-destroy.html is marked WontFix for both WebKit2 and Mac
&gt; WebKit1 as both WebKit and WebKit Legacy on Mac do not allow JavaScript
&gt; execution from NPP_Destroy().

Elaborating further, plugins/js-from-destroy.html is no longer flaky following &lt;https://trac.webkit.org/changeset/228100&gt; when run. It is marked WontFix because it no longer tests anything meaningful in WebKit2 and Mac WebKit1 since the we longer allow JavaScript execution from NPP_Destroy(), which was what this test was testing. There is still some value in keeping plugins/js-from-destroy.html in the tree for WebKit Legacy on Windows.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>