This change allows to compile JSC with disabled RTTI, and use it in code which is compiled with RTTI enabled.
Created attachment 281371 [details] Patch
Created attachment 281373 [details] Patch
Comment on attachment 281373 [details] Patch r=me if the EWS bots are happy.
Comment on attachment 281373 [details] Patch Bots are not happy.
The bots are complaining about: Undefined symbols for architecture i386: "vtable for JSC::StringSourceProvider", referenced from: I think your patch is incorrect. What you want is to move the StringSourceProvider constructor to the cpp file, and make that JS_EXPORT_PRIVATE. Then, you won't need to export the vtable. You also don't need to override the destructor.
Intention of this patch was to move vtable of JSC::StringSourceProvider into JSC library/framework, as opposed to generation of vtable in user code as it's done now. Itanium C++ ABI says: "The virtual table for a class is emitted in the same object containing the definition of its key function, i.e. the first non-pure virtual function that is not inline at the point of class definition. If there is no key function, it is emitted everywhere used." So, making first virtual function (in this case, dtor) non-inline should move vtable definition into the library (and I believe this is the good thing on its own). Patch in its current form works as expected on Linux and Windows. I'll investigate it further.