NEW 188484
[GLIB] Add symbol types
https://bugs.webkit.org/show_bug.cgi?id=188484
Summary [GLIB] Add symbol types
Yusuke Suzuki
Reported 2018-08-11 12:46:56 PDT
[GLIB] Add symbol types
Attachments
Patch (6.68 KB, patch)
2018-08-11 12:48 PDT, Yusuke Suzuki
no flags
Patch (7.37 KB, patch)
2018-08-11 13:39 PDT, Yusuke Suzuki
no flags
Yusuke Suzuki
Comment 1 2018-08-11 12:48:35 PDT
Yusuke Suzuki
Comment 2 2018-08-11 13:39:15 PDT
Carlos Garcia Campos
Comment 3 2018-08-13 00:35:56 PDT
Comment on attachment 346969 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=346969&action=review What about the new API to get/set/query/delete properties using a symbol as a key? I started this patch adding jsc_value_object_set_property_by_key_value, jsc_value_object_get_property_by_key_value, jsc_value_object_has_property_key_value and jsc_value_object_delete_property_by_key_value. But then I realized that JSCClassRef callbacks only work with string keys. > Source/JavaScriptCore/API/glib/JSCValue.cpp:500 > + auto string = String::fromUTF8(data, dataSize); Since bytes is always going to be used as an UTF-8 string, I think it would be better to not use GBytes. We could allow null-bytes in string using a single function new_symbol() that receives a const char* and gssize length. When -1 is given as length, the string is considered a null terminated string. That's how jsc_context_evaluate works. I know we have new_string_from_bytes(), but in that case it's more obvious that the GBytes is going to be used as a string.
Alex Christensen
Comment 4 2021-11-01 12:50:37 PDT
Comment on attachment 346969 [details] Patch This has been requesting review for more than one year. If this is still needed, please rebase and re-request review.
Note You need to log in before you can comment on or make changes to this bug.