<?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>251111</bug_id>
          
          <creation_ts>2023-01-24 13:37:06 -0800</creation_ts>
          <short_desc>StrongInlines.h methods should be marked as &quot;inline&quot; in Strong.h</short_desc>
          <delta_ts>2023-02-20 21:36:15 -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>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Jer Noble">jer.noble</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fujii</cc>
    
    <cc>mark.lam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1927922</commentid>
    <comment_count>0</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2023-01-24 13:37:06 -0800</bug_when>
    <thetext>Because they&apos;re not marked as &quot;inline&quot;, if you include Strong.h and use Strong::Strong() or Strong::set() and _don&apos;t_ include StrongInlines.h, you will end up with a linker error, as these methods are not exported.

However, adding &quot;inline&quot; to these methods expose a number of build errors. Someone should do the work to mark these as &quot;inline&quot; and clean up all the places where these methods are used without including StrongInlines.h.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927923</commentid>
    <comment_count>1</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2023-01-24 13:37:41 -0800</bug_when>
    <thetext>E.g.:

OpenSource/Source/JavaScriptCore/heap/Strong.h:97:17: error: inline function &apos;JSC::Strong&lt;JSC::JSObject, JSC::ShouldStrongDestructorGrabLock::No&gt;::set&apos; is not defined [-Werror,-Wundefined-inline]
    inline void set(VM&amp;, ExternalType);
                ^
In file included from OpenSource/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:31:
In file included from OpenSource/WebKitBuild/Debug/DerivedSources/JavaScriptCore/BytecodeStructs.h:31:
In file included from OpenSource/Source/JavaScriptCore/bytecode/BytecodeDumper.h:31:
In file included from OpenSource/Source/JavaScriptCore/bytecode/CallLinkInfo.h:34:
In file included from OpenSource/Source/JavaScriptCore/jit/PolymorphicCallStubRoutine.h:30:
In file included from OpenSource/Source/JavaScriptCore/bytecode/CallEdge.h:28:
In file included from OpenSource/Source/JavaScriptCore/bytecode/CallVariant.h:28:
In file included from OpenSource/Source/JavaScriptCore/runtime/ExecutableBaseInlines.h:28:
In file included from OpenSource/Source/JavaScriptCore/runtime/ExecutableBase.h:33:
OpenSource/Source/JavaScriptCore/runtime/JSGlobalObject.h:1092:99: note: used here
    void setUnhandledRejectionCallback(VM&amp; vm, JSObject* function) { m_unhandledRejectionCallback.set(vm, function); }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929858</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-01-31 13:38:24 -0800</bug_when>
    <thetext>&lt;rdar://problem/104882770&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1935402</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2023-02-20 21:35:36 -0800</bug_when>
    <thetext>Some methods are deliberately not marked as `inline` to avoid this dance.  The user of these methods should know to inline the Inlines.h if they actually needed the implementation of the inline function.  The alternative is an expensive exercise to move a lot of code around for little benefit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1935404</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2023-02-20 21:36:15 -0800</bug_when>
    <thetext>(In reply to Mark Lam from comment #3)
&gt; Some methods are deliberately not marked as `inline` to avoid this dance. 
&gt; The user of these methods should know to inline the Inlines.h if they
&gt; actually needed the implementation of the inline function.  The alternative
&gt; is an expensive exercise to move a lot of code around for little benefit.

&quot;should know to inline the Inlines.h&quot; =&gt; &quot;should know to #include the Inlines.h&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>