[GLIB] Add symbol types
Created attachment 346966 [details] Patch
Created attachment 346969 [details] Patch
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.
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.