[Webkit-unassigned] [Bug 147393] Parse the entire WebAssembly modules
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 30 14:13:45 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=147393
--- Comment #5 from Geoffrey Garen <ggaren at apple.com> ---
> (In reply to comment #3)
> > > Source/JavaScriptCore/wasm/WASMModuleParser.h:60
> > > + JSWASMModule* m_module;
> >
> > You need to do something to prevent m_module from being garbage collected.
>
> Since WASMModuleParser is allocated on the stack, doesn't that prevent
> m_module from being GC'd? Do I need to do something extra to protect it?
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<T>.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150730/55c4739d/attachment.html>
More information about the webkit-unassigned
mailing list