Currently, all fields/methods of ScriptGCEvent are static and it will only register its callbacks on for first thread it's called on -- subsequent calls will bail out from addEventListener(). If we need to instrument multiple isolates concurrently, one instance of ScriptGCEvent should be maintained per isolate.
Created attachment 140202 [details]
Comment on attachment 140202 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=140202&action=review
> for (GCEventListeners::iterator i = listeners.begin(); i != listeners.end(); ++i)
Please get rid of this static list of listeners as all of the listeners will be called for all GC events no matter in which isolate they happen.
Created attachment 140219 [details]
Committed r116103: <http://trac.webkit.org/changeset/116103>