<?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>132021</bug_id>
          
          <creation_ts>2014-04-22 12:49:11 -0700</creation_ts>
          <short_desc>WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript() needs to acquire the JSLock before calling into JS</short_desc>
          <delta_ts>2014-04-24 16:46:03 -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>JavaScriptCore</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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Lam">mark.lam</reporter>
          <assigned_to name="Mark Lam">mark.lam</assigned_to>
          <cc>calvaris</cc>
    
    <cc>commit-queue</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>esprehn+autocc</cc>
    
    <cc>glenn</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>jer.noble</cc>
    
    <cc>mhahnenberg</cc>
    
    <cc>msaboff</cc>
    
    <cc>philipj</cc>
    
    <cc>sergio</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1003036</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2014-04-22 12:49:11 -0700</bug_when>
    <thetext>And because it&apos;s not acquiring the lock, we see the following failure:

http://build.webkit.org/results/Apple%20Mavericks%20Debug%20WK2%20(Tests)/r167665%20(4123)/media/video-controller-currentTime-crash-log.txt

ASSERTION FAILED: vm()-&gt;currentThreadIsHoldingAPILock()
/Volumes/Data/slave/mavericks-debug/build/Source/JavaScriptCore/heap/Heap.cpp(977) : void JSC::Heap::collect(JSC::HeapOperation)
1   0x1092840a0 WTFCrash
2   0x108e9eabd JSC::Heap::collect(JSC::HeapOperation)
3   0x108b58e67 JSC::Heap::collectIfNecessaryOrDefer()
4   0x108b58d92 JSC::Heap::decrementDeferralDepthAndGCIfNeeded()
5   0x108b58d68 JSC::DeferGC::~DeferGC()
6   0x108b58435 JSC::DeferGC::~DeferGC()
7   0x10920888e JSC::Structure::get(JSC::VM&amp;, JSC::PropertyName, unsigned int&amp;, JSC::JSCell*&amp;)
8   0x108b5b08d JSC::JSObject::inlineGetOwnPropertySlot(JSC::ExecState*, JSC::VM&amp;, JSC::Structure&amp;, JSC::PropertyName, JSC::PropertySlot&amp;)
9   0x108b5479e JSC::JSObject::getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&amp;)
10  0x108fa9c19 bool JSC::getStaticFunctionSlot&lt;JSC::JSSegmentedVariableObject&gt;(JSC::ExecState*, JSC::HashTable const&amp;, JSC::JSObject*, JSC::PropertyName, JSC::PropertySlot&amp;)
11  0x108f9762c JSC::JSGlobalObject::getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&amp;)
12  0x10b28f9ed WebCore::JSDOMWindow::getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&amp;)
13  0x10a89ff74 JSC::JSObject::fastGetOwnPropertySlot(JSC::ExecState*, JSC::VM&amp;, JSC::Structure&amp;, JSC::PropertyName, JSC::PropertySlot&amp;)
14  0x10a89fd1e JSC::JSObject::getPropertySlot(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&amp;)
15  0x10a89db95 JSC::JSObject::get(JSC::ExecState*, JSC::PropertyName) const
16  0x10ada8974 WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript()
17  0x10ada8b93 WebCore::HTMLMediaElement::didAddUserAgentShadowRoot(WebCore::ShadowRoot*)
18  0x10aa3f586 WebCore::Element::ensureUserAgentShadowRoot()
19  0x10ad949cb WebCore::HTMLMediaElement::configureMediaControls()
20  0x10ad95414 WebCore::HTMLMediaElement::insertedInto(WebCore::ContainerNode&amp;)
21  0x10a5feff3 WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument(WebCore::Node&amp;)
22  0x10a5f72a3 WebCore::ChildNodeInsertionNotifier::notify(WebCore::Node&amp;)
23  0x10a5f2dc6 WebCore::ContainerNode::parserAppendChild(WTF::PassRefPtr&lt;WebCore::Node&gt;)
24  0x10ad2859a WebCore::insert(WebCore::HTMLConstructionSiteTask&amp;)
25  0x10ad281ee WebCore::executeInsertTask(WebCore::HTMLConstructionSiteTask&amp;)
26  0x10ad24d00 WebCore::executeTask(WebCore::HTMLConstructionSiteTask&amp;)
27  0x10ad24c92 WebCore::HTMLConstructionSite::executeQueuedTasks()
28  0x10ae33245 WebCore::HTMLTreeBuilder::constructTree(WebCore::AtomicHTMLToken*)
29  0x10ad35a27 WebCore::HTMLDocumentParser::constructTreeFromHTMLToken(WebCore::HTMLToken&amp;)
30  0x10ad34e32 WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode)
31  0x10ad34419 WebCore::HTMLDocumentParser::pumpTokenizerIfPossible(WebCore::HTMLDocumentParser::SynchronousMode)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1003038</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2014-04-22 12:49:56 -0700</bug_when>
    <thetext>&lt;rdar://problem/16689723&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1003039</commentid>
    <comment_count>2</comment_count>
      <attachid>229908</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2014-04-22 12:54:04 -0700</bug_when>
    <thetext>Created attachment 229908
the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1003040</commentid>
    <comment_count>3</comment_count>
      <attachid>229908</attachid>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-04-22 12:55:58 -0700</bug_when>
    <thetext>Comment on attachment 229908
the patch.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1003041</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2014-04-22 12:59:26 -0700</bug_when>
    <thetext>Thanks.  Landed in r167676: &lt;http://trac.webkit.org/r167676&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1003879</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2014-04-24 16:46:03 -0700</bug_when>
    <thetext>Moving all JavaScriptGlue bugs to JavaScriptCore. The JavaScriptGlue framework itself is long gone. And most of the more recent bugs put in this component were put there by people who thought this was for some other aspect of “JavaScript glue” and have nothing to do with the actual original reason for the existence of this component, which was an OS-X-only framework named JavaScriptGlue.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>229908</attachid>
            <date>2014-04-22 12:54:04 -0700</date>
            <delta_ts>2014-04-22 12:55:58 -0700</delta_ts>
            <desc>the patch.</desc>
            <filename>bug-132021.patch</filename>
            <type>text/plain</type>
            <size>1467</size>
            <attacher name="Mark Lam">mark.lam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlza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Q29yZS9odG1sL0hUTUxNZWRpYUVs
ZW1lbnQuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC01OTM0LDYgKzU5MzQsNyBAQCBib29sIEhUTUxN
ZWRpYUVsZW1lbnQ6OmVuc3VyZU1lZGlhQ29udHJvCiAgICAgU2NyaXB0Q29udHJvbGxlciYgc2Ny
aXB0Q29udHJvbGxlciA9IHBhZ2UtPm1haW5GcmFtZSgpLnNjcmlwdCgpOwogICAgIEpTRE9NR2xv
YmFsT2JqZWN0KiBnbG9iYWxPYmplY3QgPSBKU0M6OmpzQ2FzdDxKU0RPTUdsb2JhbE9iamVjdCo+
KHNjcmlwdENvbnRyb2xsZXIuZ2xvYmFsT2JqZWN0KHdvcmxkKSk7CiAgICAgSlNDOjpFeGVjU3Rh
dGUqIGV4ZWMgPSBnbG9iYWxPYmplY3QtPmdsb2JhbEV4ZWMoKTsKKyAgICBKU0M6OkpTTG9ja0hv
bGRlciBsb2NrKGV4ZWMpOwogCiAgICAgSlNDOjpKU1ZhbHVlIGZ1bmN0aW9uVmFsdWUgPSBnbG9i
YWxPYmplY3QtPmdldChleGVjLCBKU0M6OklkZW50aWZpZXIoZXhlYywgImNyZWF0ZUNvbnRyb2xz
IikpOwogICAgIGlmIChmdW5jdGlvblZhbHVlLmlzRnVuY3Rpb24oKSkK
</data>
<flag name="review"
          id="254275"
          type_id="1"
          status="+"
          setter="mhahnenberg"
    />
          </attachment>
      

    </bug>

</bugzilla>