<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Parse the entire WebAssembly modules"
   href="https://bugs.webkit.org/show_bug.cgi?id=147393#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Parse the entire WebAssembly modules"
   href="https://bugs.webkit.org/show_bug.cgi?id=147393">bug 147393</a>
              from <span class="vcard"><a class="email" href="mailto:ggaren&#64;apple.com" title="Geoffrey Garen &lt;ggaren&#64;apple.com&gt;"> <span class="fn">Geoffrey Garen</span></a>
</span></b>
        <pre><span class="quote">&gt; (In reply to <a href="show_bug.cgi?id=147393#c3">comment #3</a>)
&gt; &gt; &gt; Source/JavaScriptCore/wasm/WASMModuleParser.h:60
&gt; &gt; &gt; +    JSWASMModule* m_module;
&gt; &gt; 
&gt; &gt; You need to do something to prevent m_module from being garbage collected.
&gt; 
&gt; Since WASMModuleParser is allocated on the stack, doesn't that prevent
&gt; m_module from being GC'd? Do I need to do something extra to protect it?</span >

In practice, you can probably produce GC safety by allocating WASMModuleParser on the stack. But that's a dangerous thing to do because there's no way to prevent a future coder from moving WASMModuleParser to the heap, and in general, C++ is intentionally agnostic about whether an object was instantiated on the stack or the heap.

I think a better solution is to use Strong&lt;T&gt;.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>