<?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>209585</bug_id>
          
          <creation_ts>2020-03-26 00:31:35 -0700</creation_ts>
          <short_desc>Crash in RadioButtonGroups::requiredStateChanged</short_desc>
          <delta_ts>2020-03-26 14:26:14 -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>Forms</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=206337</see_also>
          <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="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>cdumez</cc>
    
    <cc>darin</cc>
    
    <cc>esprehn+autocc</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>kangil.han</cc>
    
    <cc>koivisto</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1634230</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-03-26 00:31:35 -0700</bug_when>
    <thetext>e.g.

1   0x6aa089a19 WTFCrash
2   0x68d1959bb WTFCrashWithInfo(int, char const*, char const*, int)
3   0x68fcb94f7 WebCore::RadioButtonGroups::requiredStateChanged(WebCore::HTMLInputElement&amp;)
4   0x68fff8024 WebCore::HTMLInputElement::requiredStateChanged()
5   0x68ffafa87 WebCore::HTMLFormControlElement::parseAttribute(WebCore::QualifiedName const&amp;, WTF::AtomString const&amp;)
6   0x6900eec5e WebCore::HTMLTextFormControlElement::parseAttribute(WebCore::QualifiedName const&amp;, WTF::AtomString const&amp;)
7   0x68fff43f0 WebCore::HTMLInputElement::parseAttribute(WebCore::QualifiedName const&amp;, WTF::AtomString const&amp;)
8   0x68fb8ccf4 WebCore::Element::attributeChanged(WebCore::QualifiedName const&amp;, WTF::AtomString const&amp;, WTF::AtomString const&amp;, WebCore::Element::AttributeModificationReason)
9   0x68fd1accc WebCore::StyledElement::attributeChanged(WebCore::QualifiedName const&amp;, WTF::AtomString const&amp;, WTF::AtomString const&amp;, WebCore::Element::AttributeModificationReason)
10  0x68fb934b2 WebCore::Element::didAddAttribute(WebCore::QualifiedName const&amp;, WTF::AtomString const&amp;)
11  0x68fb93400 WebCore::Element::addAttributeInternal(WebCore::QualifiedName const&amp;, WTF::AtomString const&amp;, WebCore::Element::SynchronizationOfLazyAttribute)
12  0x68fb8c3f5 WebCore::Element::setAttributeInternal(unsigned int, WebCore::QualifiedName const&amp;, WTF::AtomString const&amp;, WebCore::Element::SynchronizationOfLazyAttribute)
13  0x68fb859c2 WebCore::Element::setAttribute(WebCore::QualifiedName const&amp;, WTF::AtomString const&amp;)
14  0x68fb85925 WebCore::Element::setBooleanAttribute(WebCore::QualifiedName const&amp;, bool)
15  0x68ddda3be WebCore::setJSHTMLInputElementRequiredSetter(JSC::JSGlobalObject&amp;, WebCore::JSHTMLInputElement&amp;, JSC::JSValue, JSC::ThrowScope&amp;)::&apos;lambda&apos;()::operator()() const
16  0x68ddda34d std::__1::enable_if&lt;std::is_same&lt;void, decltype(fp1())&gt;::value, void&gt;::type WebCore::AttributeSetter::call&lt;WebCore::setJSHTMLInputElementRequiredSetter(JSC::JSGlobalObject&amp;, WebCore::JSHTMLInputElement&amp;, JSC::JSValue, JSC::ThrowScope&amp;)::&apos;lambda&apos;()&gt;(JSC::JSGlobalObject&amp;, JSC::ThrowScope&amp;, WebCore::setJSHTMLInputElementRequiredSetter(JSC::JSGlobalObject&amp;, WebCore::JSHTMLInputElement&amp;, JSC::JSValue, JSC::ThrowScope&amp;)::&apos;lambda&apos;()&amp;&amp;)
17  0x68ddda30a WebCore::setJSHTMLInputElementRequiredSetter(JSC::JSGlobalObject&amp;, WebCore::JSHTMLInputElement&amp;, JSC::JSValue, JSC::ThrowScope&amp;)
18  0x68dd2c854 bool WebCore::IDLAttribute&lt;WebCore::JSHTMLInputElement&gt;::set&lt;&amp;(WebCore::setJSHTMLInputElementRequiredSetter(JSC::JSGlobalObject&amp;, WebCore::JSHTMLInputElement&amp;, JSC::JSValue, JSC::ThrowScope&amp;)), (WebCore::CastedThisErrorBehavior)0&gt;(JSC::JSGlobalObject&amp;, long long, long long, char const*)
19  0x68dd2c6fc WebCore::setJSHTMLInputElementRequired(JSC::JSGlobalObject*, long long, long long)
20  0x6ab74414e JSC::callCustomSetter(JSC::JSGlobalObject*, bool (*)(JSC::JSGlobalObject*, long long, long long), bool, JSC::JSValue, JSC::JSValue)
21  0x6ab744222 JSC::callCustomSetter(JSC::JSGlobalObject*, JSC::JSValue, bool, JSC::JSObject*, JSC::JSValue, JSC::JSValue)
22  0x6ab8c72de JSC::JSObject::putInlineSlow(JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&amp;)
23  0x6ab8c6c8e JSC::JSObject::putInlineForJSObject(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&amp;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634234</commentid>
    <comment_count>1</comment_count>
      <attachid>394584</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-03-26 00:55:28 -0700</bug_when>
    <thetext>Created attachment 394584
Fixes the bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634399</commentid>
    <comment_count>2</comment_count>
      <attachid>394584</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-03-26 10:26:43 -0700</bug_when>
    <thetext>Comment on attachment 394584
Fixes the bug

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

&gt; Source/WebCore/dom/RadioButtonGroups.cpp:241
&gt; +        return; // FIXME: Update the radio button group before author script had a chance to run in didFinishInsertingNode().

I know this code pretty well, and I at least don’t understand what this comment asks us to fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634400</commentid>
    <comment_count>3</comment_count>
      <attachid>394584</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-03-26 10:26:44 -0700</bug_when>
    <thetext>Comment on attachment 394584
Fixes the bug

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

&gt; Source/WebCore/dom/RadioButtonGroups.cpp:241
&gt; +        return; // FIXME: Update the radio button group before author script had a chance to run in didFinishInsertingNode().

I know this code pretty well, and I at least don’t understand what this comment asks us to fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634477</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-03-26 12:10:22 -0700</bug_when>
    <thetext>(In reply to Darin Adler from comment #3)
&gt; Comment on attachment 394584 [details]
&gt; Fixes the bug
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=394584&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/dom/RadioButtonGroups.cpp:241
&gt; &gt; +        return; // FIXME: Update the radio button group before author script had a chance to run in didFinishInsertingNode().
&gt; 
&gt; I know this code pretty well, and I at least don’t understand what this
&gt; comment asks us to fix.

So the issue is that radio button groups are updated in didFinishInsertingNode() overrides but didFinishInsertingNode() calls on a node which appears earlier in the tree order could have ran arbitrary scripts and accessed this function. This FIXME can go away if we could update the radio button groups before running any author scripts in didFinishInsertingNode() somehow.

e.g.

#34	0x00000001166055c8 in WebCore::JSExecState::profiledCall(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;) at /Volumes/Data/webkit/Source/WebCore/bindings/js/JSExecState.h:73
#35	0x000000011662232b in WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&amp;, WebCore::Event&amp;) at /Volumes/Data/webkit/Source/WebCore/bindings/js/JSEventListener.cpp:180
#36	0x0000000116ce4ee7 in WebCore::EventTarget::innerInvokeEventListeners(WebCore::Event&amp;, WTF::Vector&lt;WTF::RefPtr&lt;WebCore::RegisteredEventListener, WTF::DumbPtrTraits&lt;WebCore::RegisteredEventListener&gt; &gt;, 1ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;, WebCore::EventTarget::EventInvokePhase) at /Volumes/Data/webkit/Source/WebCore/dom/EventTarget.cpp:325
#37	0x0000000116ce1104 in WebCore::EventTarget::fireEventListeners(WebCore::Event&amp;, WebCore::EventTarget::EventInvokePhase) at /Volumes/Data/webkit/Source/WebCore/dom/EventTarget.cpp:257
#38	0x0000000116d6c442 in WebCore::Node::handleLocalEvents(WebCore::Event&amp;, WebCore::EventTarget::EventInvokePhase) at /Volumes/Data/webkit/Source/WebCore/dom/Node.cpp:2364
#39	0x0000000116ccc281 in WebCore::EventContext::handleLocalEvents(WebCore::Event&amp;, WebCore::EventTarget::EventInvokePhase) const at /Volumes/Data/webkit/Source/WebCore/dom/EventContext.cpp:55
#40	0x0000000116cccd6f in WebCore::dispatchEventInDOM(WebCore::Event&amp;, WebCore::EventPath const&amp;) at /Volumes/Data/webkit/Source/WebCore/dom/EventDispatcher.cpp:100
#41	0x0000000116ccc8a7 in WebCore::EventDispatcher::dispatchEvent(WebCore::Node&amp;, WebCore::Event&amp;) at /Volumes/Data/webkit/Source/WebCore/dom/EventDispatcher.cpp:154
#42	0x0000000116d6c49d in WebCore::Node::dispatchEvent(WebCore::Event&amp;) at /Volumes/Data/webkit/Source/WebCore/dom/Node.cpp:2374
#43	0x0000000117933b65 in WebCore::DOMWindow::dispatchLoadEvent() at /Volumes/Data/webkit/Source/WebCore/page/DOMWindow.cpp:2205
#44	0x0000000116bca998 in WebCore::Document::dispatchWindowLoadEvent() at /Volumes/Data/webkit/Source/WebCore/dom/Document.cpp:4762
#45	0x0000000116bca4f5 in WebCore::Document::implicitClose() at /Volumes/Data/webkit/Source/WebCore/dom/Document.cpp:3056
#46	0x000000011778037b in WebCore::FrameLoader::checkCallImplicitClose() at /Volumes/Data/webkit/Source/WebCore/loader/FrameLoader.cpp:957
#47	0x000000011777fe8a in WebCore::FrameLoader::checkCompleted() at /Volumes/Data/webkit/Source/WebCore/loader/FrameLoader.cpp:898
#48	0x000000011777e187 in WebCore::FrameLoader::finishedParsing() at /Volumes/Data/webkit/Source/WebCore/loader/FrameLoader.cpp:808
#49	0x0000000116bdd7e6 in WebCore::Document::finishedParsing() at /Volumes/Data/webkit/Source/WebCore/dom/Document.cpp:5823
#50	0x000000011735c418 in WebCore::HTMLConstructionSite::finishedParsing() at /Volumes/Data/webkit/Source/WebCore/html/parser/HTMLConstructionSite.cpp:419
#51	0x00000001173a4597 in WebCore::HTMLTreeBuilder::finished() at /Volumes/Data/webkit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp:2843
#52	0x0000000117363808 in WebCore::HTMLDocumentParser::end() at /Volumes/Data/webkit/Source/WebCore/html/parser/HTMLDocumentParser.cpp:449
#53	0x00000001173616b8 in WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd() at /Volumes/Data/webkit/Source/WebCore/html/parser/HTMLDocumentParser.cpp:458
#54	0x00000001173613e7 in WebCore::HTMLDocumentParser::prepareToStopParsing() at /Volumes/Data/webkit/Source/WebCore/html/parser/HTMLDocumentParser.cpp:153
#55	0x0000000117363872 in WebCore::HTMLDocumentParser::attemptToEnd() at /Volumes/Data/webkit/Source/WebCore/html/parser/HTMLDocumentParser.cpp:470
#56	0x0000000117363949 in WebCore::HTMLDocumentParser::finish() at /Volumes/Data/webkit/Source/WebCore/html/parser/HTMLDocumentParser.cpp:498
#57	0x00000001177185c2 in WebCore::DocumentWriter::end() at /Volumes/Data/webkit/Source/WebCore/loader/DocumentWriter.cpp:288
#58	0x000000011771756f in WebCore::DocumentLoader::finishedLoading() at /Volumes/Data/webkit/Source/WebCore/loader/DocumentLoader.cpp:449
#59	0x0000000117722c64 in WebCore::DocumentLoader::maybeLoadEmpty() at /Volumes/Data/webkit/Source/WebCore/loader/DocumentLoader.cpp:1793
#60	0x0000000117722df5 in WebCore::DocumentLoader::startLoadingMainResource() at /Volumes/Data/webkit/Source/WebCore/loader/DocumentLoader.cpp:1807
#61	0x00000001177b366c in WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&amp;, WebCore::FormState*, WebCore::NavigationPolicyDecision, WebCore::AllowNavigationToInvalidURL)::$_11::operator()() at /Volumes/Data/webkit/Source/WebCore/loader/FrameLoader.cpp:3547
#62	0x00000001177b2f7e in WTF::Detail::CallableWrapper&lt;WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&amp;, WebCore::FormState*, WebCore::NavigationPolicyDecision, WebCore::AllowNavigationToInvalidURL)::$_11, void&gt;::call() at /Volumes/Data/webkit/WebKitBuild/Debug/usr/local/include/wtf/Function.h:52
#63	0x00000001142a2362 in WTF::Function&lt;void ()&gt;::operator()() const at /Volumes/Data/webkit/WebKitBuild/Debug/usr/local/include/wtf/Function.h:84
#64	0x00000001143056ee in WTF::CompletionHandler&lt;void ()&gt;::operator()() at /Volumes/Data/webkit/WebKitBuild/Debug/usr/local/include/wtf/CompletionHandler.h:62
#65	0x0000000117789cba in WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&amp;, WebCore::FormState*, WebCore::NavigationPolicyDecision, WebCore::AllowNavigationToInvalidURL) at /Volumes/Data/webkit/Source/WebCore/loader/FrameLoader.cpp:3551
#66	0x00000001177b0830 in WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr&lt;WebCore::FormState, WTF::DumbPtrTraits&lt;WebCore::FormState&gt; &gt;&amp;&amp;, WebCore::AllowNavigationToInvalidURL, WebCore::ShouldTreatAsContinuingLoad, WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;)::$_8::operator()(WebCore::ResourceRequest const&amp;, WTF::WeakPtr&lt;WebCore::FormState&gt;&amp;&amp;, WebCore::NavigationPolicyDecision) at /Volumes/Data/webkit/Source/WebCore/loader/FrameLoader.cpp:1647
#67	0x00000001177b06ec in WTF::Detail::CallableWrapper&lt;WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr&lt;WebCore::FormState, WTF::DumbPtrTraits&lt;WebCore::FormState&gt; &gt;&amp;&amp;, WebCore::AllowNavigationToInvalidURL, WebCore::ShouldTreatAsContinuingLoad, WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;)::$_8, void, WebCore::ResourceRequest&amp;&amp;, WTF::WeakPtr&lt;WebCore::FormState&gt;&amp;&amp;, WebCore::NavigationPolicyDecision&gt;::call(WebCore::ResourceRequest&amp;&amp;, WTF::WeakPtr&lt;WebCore::FormState&gt;&amp;&amp;, WebCore::NavigationPolicyDecision) at /Volumes/Data/webkit/WebKitBuild/Debug/usr/local/include/wtf/Function.h:52
#68	0x00000001177eb9e1 in WTF::Function&lt;void (WebCore::ResourceRequest&amp;&amp;, WTF::WeakPtr&lt;WebCore::FormState&gt;&amp;&amp;, WebCore::NavigationPolicyDecision)&gt;::operator()(WebCore::ResourceRequest&amp;&amp;, WTF::WeakPtr&lt;WebCore::FormState&gt;&amp;&amp;, WebCore::NavigationPolicyDecision) const at /Volumes/Data/webkit/WebKitBuild/Debug/usr/local/include/wtf/Function.h:84
#69	0x00000001177de1d7 in WTF::CompletionHandler&lt;void (WebCore::ResourceRequest&amp;&amp;, WTF::WeakPtr&lt;WebCore::FormState&gt;&amp;&amp;, WebCore::NavigationPolicyDecision)&gt;::operator()(WebCore::ResourceRequest&amp;&amp;, WTF::WeakPtr&lt;WebCore::FormState&gt;&amp;&amp;, WebCore::NavigationPolicyDecision) at /Volumes/Data/webkit/WebKitBuild/Debug/usr/local/include/wtf/CompletionHandler.h:62
#70	0x00000001177eef3a in WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest&amp;&amp;, WebCore::ResourceResponse const&amp;, WebCore::DocumentLoader*, WTF::RefPtr&lt;WebCore::FormState, WTF::DumbPtrTraits&lt;WebCore::FormState&gt; &gt;&amp;&amp;, WTF::CompletionHandler&lt;void (WebCore::ResourceRequest&amp;&amp;, WTF::WeakPtr&lt;WebCore::FormState&gt;&amp;&amp;, WebCore::NavigationPolicyDecision)&gt;&amp;&amp;, WebCore::PolicyDecisionMode)::$_7::operator()(WebCore::PolicyAction, WebCore::PolicyCheckIdentifier) at /Volumes/Data/webkit/Source/WebCore/loader/PolicyChecker.cpp:237
#71	0x00000001177edcd7 in WTF::Detail::CallableWrapper&lt;WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest&amp;&amp;, WebCore::ResourceResponse const&amp;, WebCore::DocumentLoader*, WTF::RefPtr&lt;WebCore::FormState, WTF::DumbPtrTraits&lt;WebCore::FormState&gt; &gt;&amp;&amp;, WTF::CompletionHandler&lt;void (WebCore::ResourceRequest&amp;&amp;, WTF::WeakPtr&lt;WebCore::FormState&gt;&amp;&amp;, WebCore::NavigationPolicyDecision)&gt;&amp;&amp;, WebCore::PolicyDecisionMode)::$_7, void, WebCore::PolicyAction, WebCore::PolicyCheckIdentifier&gt;::call(WebCore::PolicyAction, WebCore::PolicyCheckIdentifier) at /Volumes/Data/webkit/WebKitBuild/Debug/usr/local/include/wtf/Function.h:52
#72	0x000000011777c078 in WTF::Function&lt;void (WebCore::PolicyAction, WebCore::PolicyCheckIdentifier)&gt;::operator()(WebCore::PolicyAction, WebCore::PolicyCheckIdentifier) const at /Volumes/Data/webkit/WebKitBuild/Debug/usr/local/include/wtf/Function.h:84
#73	0x00000001177ddc64 in WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest&amp;&amp;, WebCore::ResourceResponse const&amp;, WebCore::DocumentLoader*, WTF::RefPtr&lt;WebCore::FormState, WTF::DumbPtrTraits&lt;WebCore::FormState&gt; &gt;&amp;&amp;, WTF::CompletionHandler&lt;void (WebCore::ResourceRequest&amp;&amp;, WTF::WeakPtr&lt;WebCore::FormState&gt;&amp;&amp;, WebCore::NavigationPolicyDecision)&gt;&amp;&amp;, WebCore::PolicyDecisionMode) at /Volumes/Data/webkit/Source/WebCore/loader/PolicyChecker.cpp:245
#74	0x0000000117788ad1 in WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr&lt;WebCore::FormState, WTF::DumbPtrTraits&lt;WebCore::FormState&gt; &gt;&amp;&amp;, WebCore::AllowNavigationToInvalidURL, WebCore::ShouldTreatAsContinuingLoad, WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;) at /Volumes/Data/webkit/Source/WebCore/loader/FrameLoader.cpp:1646
#75	0x0000000117786b1e in WebCore::FrameLoader::loadWithNavigationAction(WebCore::ResourceRequest const&amp;, WebCore::NavigationAction&amp;&amp;, WebCore::LockHistory, WebCore::FrameLoadType, WTF::RefPtr&lt;WebCore::FormState, WTF::DumbPtrTraits&lt;WebCore::FormState&gt; &gt;&amp;&amp;, WebCore::AllowNavigationToInvalidURL, WTF::String const&amp;, WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;) at /Volumes/Data/webkit/Source/WebCore/loader/FrameLoader.cpp:1515
#76	0x0000000117782e07 in WebCore::FrameLoader::loadURL(WebCore::FrameLoadRequest&amp;&amp;, WTF::String const&amp;, WebCore::FrameLoadType, WebCore::Event*, WTF::RefPtr&lt;WebCore::FormState, WTF::DumbPtrTraits&lt;WebCore::FormState&gt; &gt;&amp;&amp;, WTF::Optional&lt;WebCore::AdClickAttribution&gt;&amp;&amp;, WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;) at /Volumes/Data/webkit/Source/WebCore/loader/FrameLoader.cpp:1423
#77	0x0000000117780d09 in WebCore::FrameLoader::loadURLIntoChildFrame(WTF::URL const&amp;, WTF::String const&amp;, WebCore::Frame*) at /Volumes/Data/webkit/Source/WebCore/loader/FrameLoader.cpp:990
#78	0x00000001132eaad7 in WebFrameLoaderClient::createFrame(WTF::URL const&amp;, WTF::String const&amp;, WebCore::HTMLFrameOwnerElement&amp;, WTF::String const&amp;) at /Volumes/Data/webkit/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm:1641
#79	0x0000000117800e48 in WebCore::SubframeLoader::loadSubframe(WebCore::HTMLFrameOwnerElement&amp;, WTF::URL const&amp;, WTF::String const&amp;, WTF::String const&amp;) at /Volumes/Data/webkit/Source/WebCore/loader/SubframeLoader.cpp:343
#80	0x00000001177ff743 in WebCore::SubframeLoader::loadOrRedirectSubframe(WebCore::HTMLFrameOwnerElement&amp;, WTF::URL const&amp;, WTF::AtomString const&amp;, WebCore::LockHistory, WebCore::LockBackForwardList) at /Volumes/Data/webkit/Source/WebCore/loader/SubframeLoader.cpp:310
#81	0x00000001177ff1b0 in WebCore::SubframeLoader::requestFrame(WebCore::HTMLFrameOwnerElement&amp;, WTF::String const&amp;, WTF::AtomString const&amp;, WebCore::LockHistory, WebCore::LockBackForwardList) at /Volumes/Data/webkit/Source/WebCore/loader/SubframeLoader.cpp:99
#82	0x00000001170cc6c8 in WebCore::HTMLFrameElementBase::openURL(WebCore::LockHistory, WebCore::LockBackForwardList) at /Volumes/Data/webkit/Source/WebCore/html/HTMLFrameElementBase.cpp:102
#83	0x00000001170cc8f2 in WebCore::HTMLFrameElementBase::didFinishInsertingNode() at /Volumes/Data/webkit/Source/WebCore/html/HTMLFrameElementBase.cpp:142</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634502</commentid>
    <comment_count>5</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-03-26 12:53:53 -0700</bug_when>
    <thetext>(In reply to Ryosuke Niwa from comment #4)
&gt; (In reply to Darin Adler from comment #3)
&gt; &gt; Comment on attachment 394584 [details]
&gt; &gt; Fixes the bug
&gt; &gt; 
&gt; &gt; View in context:
&gt; &gt; https://bugs.webkit.org/attachment.cgi?id=394584&amp;action=review
&gt; &gt; 
&gt; &gt; &gt; Source/WebCore/dom/RadioButtonGroups.cpp:241
&gt; &gt; &gt; +        return; // FIXME: Update the radio button group before author script had a chance to run in didFinishInsertingNode().
&gt; &gt; 
&gt; &gt; I know this code pretty well, and I at least don’t understand what this
&gt; &gt; comment asks us to fix.
&gt; 
&gt; So the issue is that radio button groups are updated in
&gt; didFinishInsertingNode() overrides but didFinishInsertingNode() calls on a
&gt; node which appears earlier in the tree order could have ran arbitrary
&gt; scripts and accessed this function. This FIXME can go away if we could
&gt; update the radio button groups before running any author scripts in
&gt; didFinishInsertingNode() somehow.

Maybe we can rephrase it like this:

FIXME: Update the radio button groups before didFinishInsertingNode() on other nodes which appear earlier in the tree order could have ran scripts and mutated DOM

WDYT?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634505</commentid>
    <comment_count>6</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-03-26 13:02:53 -0700</bug_when>
    <thetext>I don’t think this null check requires a FIXME. It makes total sense that if there’s no group we don’t update it, and doesn’t really &quot;raise my eyebrows&quot; much.

I do think we might want to add an assertion if we could resolve the FIXME. But this doesn’t seem super-important to me. Not sure we need to record it in the code at all. What we do need is a test case that exercises this!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634508</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-03-26 13:05:50 -0700</bug_when>
    <thetext>(In reply to Darin Adler from comment #6)
&gt; I don’t think this null check requires a FIXME. It makes total sense that if
&gt; there’s no group we don’t update it, and doesn’t really &quot;raise my eyebrows&quot;
&gt; much.
&gt;
&gt; I do think we might want to add an assertion if we could resolve the FIXME.
&gt; But this doesn’t seem super-important to me. Not sure we need to record it
&gt; in the code at all. What we do need is a test case that exercises this!

Sure. The newly added test does exercise this code path.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634509</commentid>
    <comment_count>8</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-03-26 13:06:38 -0700</bug_when>
    <thetext>I&apos;m gonna land the patch without FIXME.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634565</commentid>
    <comment_count>9</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-03-26 14:25:23 -0700</bug_when>
    <thetext>Committed r259079: &lt;https://trac.webkit.org/changeset/259079&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634566</commentid>
    <comment_count>10</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-03-26 14:26:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/60936486&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>394584</attachid>
            <date>2020-03-26 00:55:28 -0700</date>
            <delta_ts>2020-03-26 07:37:49 -0700</delta_ts>
            <desc>Fixes the bug</desc>
            <filename>bug-209585-20200326005527.patch</filename>
            <type>text/plain</type>
            <size>4247</size>
            <attacher name="Ryosuke Niwa">rniwa</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJld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S5h
cHBlbmRDaGlsZChpbnB1dDIpOworCitkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKGRpdik7CisK
Kzwvc2NyaXB0PgorPC9ib2R5PgorPC9odG1sPgo=
</data>
<flag name="review"
          id="410011"
          type_id="1"
          status="+"
          setter="zalan"
    />
          </attachment>
      

    </bug>

</bugzilla>