<?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>121537</bug_id>
          
          <creation_ts>2013-09-17 23:24:08 -0700</creation_ts>
          <short_desc>Crashed while visit http://html5video.org/wiki/HTML5_Demos</short_desc>
          <delta_ts>2013-09-23 02:45:04 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 7</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>120297</dup_id>
          
          <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="Xueqing Huang">xqhuang.webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>darin</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>930526</commentid>
    <comment_count>0</comment_count>
    <who name="Xueqing Huang">xqhuang.webkit</who>
    <bug_when>2013-09-17 23:24:08 -0700</bug_when>
    <thetext>OS: Windows 7
WebKit r155740

Steps To Reproduce:
1. Uninstall QuickTime(wasn&apos;t QuickTime SDK).
2. Open WinLauncher.exe;
3. Input &quot;http://html5video.org/wiki/HTML5_Demos&quot;.

Expected Result:
Should load http://html5video.org/wiki/HTML5_Demos normally.

Actual Result:
Crash.

How frequently does this problem reproduce?
100%</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>930558</commentid>
    <comment_count>1</comment_count>
      <attachid>211979</attachid>
    <who name="Xueqing Huang">xqhuang.webkit</who>
    <bug_when>2013-09-18 00:42:57 -0700</bug_when>
    <thetext>Created attachment 211979
patch for reviewing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>930568</commentid>
    <comment_count>2</comment_count>
    <who name="Xueqing Huang">xqhuang.webkit</who>
    <bug_when>2013-09-18 01:13:55 -0700</bug_when>
    <thetext>If QuickTime(wasn&apos;t QuickTime SDK) didn&apos;t installed, |MediaPlayer::isAvailable()| in |audioConstructor| return false then HTMLUnknownElement was created to insteated of HTMLAudioElement.
|isHTMLAudioElement(node)| in |isReachableFromDOM| just check whether element has &quot;audio&quot; tag name, |toHTMLAudioElement(node)| cast HTMLUnknownElement to HTMLAudioElement illegally then call |paused()|.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>930809</commentid>
    <comment_count>3</comment_count>
    <who name="Xueqing Huang">xqhuang.webkit</who>
    <bug_when>2013-09-18 18:31:16 -0700</bug_when>
    <thetext>Darin, could you take a look please?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>930811</commentid>
    <comment_count>4</comment_count>
      <attachid>211979</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-09-18 18:39:24 -0700</bug_when>
    <thetext>Comment on attachment 211979
patch for reviewing

View in context: https://bugs.webkit.org/attachment.cgi?id=211979&amp;action=review

&gt; Source/WebCore/bindings/js/JSNodeCustom.cpp:115
&gt; +            // If QuickTime didn&apos;t installed, |MediaPlayer::isAvailable()| return false in
&gt; +            // |audioConstructor| then HTMLUnknowElement was created to instead HTMLAudioElement.

Why does paused return false for HTMLUnknownElement?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>930822</commentid>
    <comment_count>5</comment_count>
    <who name="Xueqing Huang">xqhuang.webkit</who>
    <bug_when>2013-09-18 19:23:07 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 211979 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=211979&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/bindings/js/JSNodeCustom.cpp:115
&gt; &gt; +            // If QuickTime didn&apos;t installed, |MediaPlayer::isAvailable()| return false in
&gt; &gt; +            // |audioConstructor| then HTMLUnknowElement was created to instead HTMLAudioElement.
&gt; 
&gt; Why does paused return false for HTMLUnknownElement?

The problem was HTMLUnknownElement has not paused() member function, We convert HTMLUnknownElement to HTMLAudioElement illegally then call paused() will crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>930823</commentid>
    <comment_count>6</comment_count>
      <attachid>211979</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-09-18 19:24:48 -0700</bug_when>
    <thetext>Comment on attachment 211979
patch for reviewing

View in context: https://bugs.webkit.org/attachment.cgi?id=211979&amp;action=review

&gt;&gt;&gt; Source/WebCore/bindings/js/JSNodeCustom.cpp:115
&gt;&gt;&gt; +            // |audioConstructor| then HTMLUnknowElement was created to instead HTMLAudioElement.
&gt;&gt; 
&gt;&gt; Why does paused return false for HTMLUnknownElement?
&gt; 
&gt; The problem was HTMLUnknownElement has not paused() member function, We convert HTMLUnknownElement to HTMLAudioElement illegally then call paused() will crash.

How does that happen if the isHTMLAudioElement(node) check succeeded on the line just before?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>930824</commentid>
    <comment_count>7</comment_count>
    <who name="Xueqing Huang">xqhuang.webkit</who>
    <bug_when>2013-09-18 19:29:30 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (From update of attachment 211979 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=211979&amp;action=review
&gt; 
&gt; &gt;&gt;&gt; Source/WebCore/bindings/js/JSNodeCustom.cpp:115
&gt; &gt;&gt;&gt; +            // |audioConstructor| then HTMLUnknowElement was created to instead HTMLAudioElement.
&gt; &gt;&gt; 
&gt; &gt;&gt; Why does paused return false for HTMLUnknownElement?
&gt; &gt; 
&gt; &gt; The problem was HTMLUnknownElement has not paused() member function, We convert HTMLUnknownElement to HTMLAudioElement illegally then call paused() will crash.
&gt; 
&gt; How does that happen if the isHTMLAudioElement(node) check succeeded on the line just before?

isHTMLAudioElement(node) only check whether element has a tag name &quot;audio&quot;, see HTMLElementTypeHelpers.h.
But |audioConstructor| in HTMLElementFactory.cpp create HTMLAudioElement failed since MediaPlayer::isAvailable() return false because QuickTime did not installed. HTMLUnknownELement was created as fallback, see HTMLElementFactory::createHTMLElement.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>931166</commentid>
    <comment_count>8</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-09-19 20:37:48 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; isHTMLAudioElement(node) only check whether element has a tag name &quot;audio&quot;

That is the bug we have to fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>931167</commentid>
    <comment_count>9</comment_count>
      <attachid>211979</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-09-19 20:38:18 -0700</bug_when>
    <thetext>Comment on attachment 211979
patch for reviewing

View in context: https://bugs.webkit.org/attachment.cgi?id=211979&amp;action=review

&gt;&gt;&gt;&gt;&gt; Source/WebCore/bindings/js/JSNodeCustom.cpp:115
&gt;&gt;&gt;&gt;&gt; +            // |audioConstructor| then HTMLUnknowElement was created to instead HTMLAudioElement.
&gt;&gt;&gt;&gt; 
&gt;&gt;&gt;&gt; Why does paused return false for HTMLUnknownElement?
&gt;&gt;&gt; 
&gt;&gt;&gt; The problem was HTMLUnknownElement has not paused() member function, We convert HTMLUnknownElement to HTMLAudioElement illegally then call paused() will crash.
&gt;&gt; 
&gt;&gt; How does that happen if the isHTMLAudioElement(node) check succeeded on the line just before?
&gt; 
&gt; isHTMLAudioElement(node) only check whether element has a tag name &quot;audio&quot;, see HTMLElementTypeHelpers.h.
&gt; But |audioConstructor| in HTMLElementFactory.cpp create HTMLAudioElement failed since MediaPlayer::isAvailable() return false because QuickTime did not installed. HTMLUnknownELement was created as fallback, see HTMLElementFactory::createHTMLElement.

That is the bug we have to fix. We need to make isHTMLAudioElement return false in such cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>931168</commentid>
    <comment_count>10</comment_count>
    <who name="Xueqing Huang">xqhuang.webkit</who>
    <bug_when>2013-09-19 20:39:51 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; (From update of attachment 211979 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=211979&amp;action=review
&gt; 
&gt; &gt;&gt;&gt;&gt;&gt; Source/WebCore/bindings/js/JSNodeCustom.cpp:115
&gt; &gt;&gt;&gt;&gt;&gt; +            // |audioConstructor| then HTMLUnknowElement was created to instead HTMLAudioElement.
&gt; &gt;&gt;&gt;&gt; 
&gt; &gt;&gt;&gt;&gt; Why does paused return false for HTMLUnknownElement?
&gt; &gt;&gt;&gt; 
&gt; &gt;&gt;&gt; The problem was HTMLUnknownElement has not paused() member function, We convert HTMLUnknownElement to HTMLAudioElement illegally then call paused() will crash.
&gt; &gt;&gt; 
&gt; &gt;&gt; How does that happen if the isHTMLAudioElement(node) check succeeded on the line just before?
&gt; &gt; 
&gt; &gt; isHTMLAudioElement(node) only check whether element has a tag name &quot;audio&quot;, see HTMLElementTypeHelpers.h.
&gt; &gt; But |audioConstructor| in HTMLElementFactory.cpp create HTMLAudioElement failed since MediaPlayer::isAvailable() return false because QuickTime did not installed. HTMLUnknownELement was created as fallback, see HTMLElementFactory::createHTMLElement.
&gt; 
&gt; That is the bug we have to fix. We need to make isHTMLAudioElement return false in such cases.

All right. Thanks for clarification.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>931210</commentid>
    <comment_count>11</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-09-20 00:36:24 -0700</bug_when>
    <thetext>Bug #120297 is trying to solve the same problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>932090</commentid>
    <comment_count>12</comment_count>
    <who name="Xueqing Huang">xqhuang.webkit</who>
    <bug_when>2013-09-23 02:45:04 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 120297 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>211979</attachid>
            <date>2013-09-18 00:42:57 -0700</date>
            <delta_ts>2013-09-19 20:38:17 -0700</delta_ts>
            <desc>patch for reviewing</desc>
            <filename>fix_crash.patch</filename>
            <type>text/plain</type>
            <size>1526</size>
            <attacher name="Xueqing Huang">xqhuang.webkit</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE1NjAyNSkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE1IEBACisyMDEzLTA5LTE3ICBYdWVxaW5n
IEh1YW5nICA8aHVhbmd4cS53ZWJraXRAZ21haWwuY29tPgorCisgICAgICAgIHRvSFRNTEF1ZGlv
RUxlbWVudCgpIG1heWJlIGdldCBIVE1MVW5rbm93bkVsZW1lbnQgaW4gd2hpY2ggY2FzZSB3ZSBz
aG91bGQgbm90IGNhbGwgcGF1c2VkKCkuCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3Jn
L3Nob3dfYnVnLmNnaT9pZD0xMjE1MzcKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9P
UFMhKS4KKworICAgICAgICBUaGlzIGNhc2UgcmVwcm9kdWNlIHdoaWxlIEphdmFTY3JpcHRDb3Jl
IGNvbGxlY3QgR0MgdGh1cyBJIGhhdmUgbm8gaWRlYSBob3cgdG8gdGVzdCBpdC4gCisKKyAgICA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xlbWVudChub2RlKS0+aXNIVE1MVW5rbm93bkVs
ZW1lbnQoKSAmJiAhdG9IVE1MQXVkaW9FbGVtZW50KG5vZGUpLT5wYXVzZWQoKSkKICAgICAgICAg
ICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgfQogICAgICNlbmRpZgo=
</data>
<flag name="review"
          id="234124"
          type_id="1"
          status="-"
          setter="darin"
    />
    <flag name="commit-queue"
          id="234125"
          type_id="3"
          status="-"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>