Taking WebKitFontFamilyNames as the example, there are sometimes generated strings that you may want to use from a Worker. Currently this isn't possible, as these are AtomStrings created on the main thread. It would be helpful if the data behind them was accessible so that Worker instances can make their own copies of them if needed. It would be good to modify the generation so that the data variables that are currently private were publicly accessible.
Created attachment 421826 [details]
Comment on attachment 421826 [details]
Is this going to make the binary bigger?
Is the name with the "Data" suffix good enough to use outside the file? The choice of the name was "low stakes" since it was used only within the generated code. Now that it’s visible for use elsewhere in WebKit the name could matter a little more.
(In reply to Darin Adler from comment #2)
> Comment on attachment 421826 [details]
> Is this going to make the binary bigger?
I wouldn't have thought so, but I'm not confident enough to say that's a definite no - I can test it out tomorrow.
> Is the name with the "Data" suffix good enough to use outside the file? The
> choice of the name was "low stakes" since it was used only within the
> generated code. Now that it’s visible for use elsewhere in WebKit the name
> could matter a little more.
Assuming that the name alone is enough, I think the Data suffix is good enough, but don't have strong feelings about it. Could always suffix it "StaticString", that would certainly make it pretty clear?
So testing a release build of before and after the patch, libwebkit2gtk-4.0.so shrinks by 8 bytes (122674608->122674600) and libWebCoreGTK.a increases by 480 bytes (14609776->14610256). Everything else is unaffected.
Created attachment 422191 [details]
Committed r273880: <https://commits.webkit.org/r273880>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 422191 [details].