[Webkit-unassigned] [Bug 189991] [WTF] Add ExternalStringImpl, a StringImpl for user controlled buffers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 26 09:00:25 PDT 2018


--- Comment #6 from Yusuke Suzuki <yusukesuzuki at slowstart.org> ---
(In reply to Koby from comment #5)
> That's a good point, but what about the user supplied "free" function? In
> node-jsc I must be able to call a user supplied dispose function (when
> JSStrings are freed).

I suggest putting it in ~StringImpl().

if (ownership == BufferExternal) {
    static_cast<ExternalStringImpl*>(this)->FreeExternalBuffer(const_cast<LChar*>(m_data8), sizeInBytes());

> Just for reference, The the v8 apis I need "shim" are v8::String's
> NewExternalOneByte\NewExternalTwoByte, where the user supply the buffer and
> a dispose function (by providing an object which inherits from an abstract 
> External(One)ByteStringResource class).

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180926/37f18b76/attachment.html>

More information about the webkit-unassigned mailing list