Bug 80788 - Web Inspector: [chromium] ScriptGCEvent should not be static
Summary: Web Inspector: [chromium] ScriptGCEvent should not be static
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ilya Tikhonovsky
Depends on:
Reported: 2012-03-11 08:59 PDT by Andrey Kosyakov
Modified: 2012-05-04 08:13 PDT (History)
12 users (show)

See Also:

Patch (5.39 KB, patch)
2012-05-04 06:07 PDT, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff
Patch (6.75 KB, patch)
2012-05-04 07:20 PDT, Ilya Tikhonovsky
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2012-03-11 08:59:26 PDT
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.
Comment 1 Ilya Tikhonovsky 2012-05-04 06:07:18 PDT
Created attachment 140202 [details]
Comment 2 Yury Semikhatsky 2012-05-04 06:49:27 PDT
Comment on attachment 140202 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=140202&action=review

> Source/WebCore/bindings/v8/ScriptGCEvent.cpp:113
>      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.
Comment 3 Ilya Tikhonovsky 2012-05-04 07:20:19 PDT
Created attachment 140219 [details]
Comment 4 Ilya Tikhonovsky 2012-05-04 08:13:33 PDT
Committed r116103: <http://trac.webkit.org/changeset/116103>