Bug 94455 - [V8] Move collectGarbage() from ScriptController to V8GCController
Summary: [V8] Move collectGarbage() from ScriptController to V8GCController
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks: 85330
  Show dependency treegraph
 
Reported: 2012-08-20 01:47 PDT by Kentaro Hara
Modified: 2012-08-20 19:47 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.71 KB, patch)
2012-08-20 01:51 PDT, Kentaro Hara
no flags Details | Formatted Diff | Diff
Patch (3.19 KB, patch)
2012-08-20 17:15 PDT, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2012-08-20 01:47:17 PDT
We can move collectGarbage() from ScriptController to V8GCController. Also we can remove ScriptController::lowMemoryNotification() since it is not used at all.
Comment 1 Kentaro Hara 2012-08-20 01:51:19 PDT
Created attachment 159368 [details]
Patch
Comment 2 Adam Barth 2012-08-20 11:20:21 PDT
Comment on attachment 159368 [details]
Patch

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

> Source/WebCore/bindings/v8/V8GCController.cpp:534
> +void V8GCController::collectGarbage()

It's a bit strange that collectGarbageIfNecessary is so different from collectGarbage.

> Source/WebCore/bindings/v8/V8GCController.cpp:538
> +    v8::Persistent<v8::Context> v8Context = v8::Context::New();

v8Context -> context
Comment 3 Kentaro Hara 2012-08-20 17:02:47 PDT
Committed r126098: <http://trac.webkit.org/changeset/126098>
Comment 4 Kentaro Hara 2012-08-20 17:06:51 PDT
(In reply to comment #2)
> > Source/WebCore/bindings/v8/V8GCController.cpp:534
> > +void V8GCController::collectGarbage()
> 
> It's a bit strange that collectGarbageIfNecessary is so different from collectGarbage.

collectGarbage() always collects garbage. collectGarbageIfNecessary() just sends an idle notification to V8, which is just a hint for V8 to trigger GC. Maybe can we rename collectGarbageIfNecessary() to hintForCollectGarbage()?

> > Source/WebCore/bindings/v8/V8GCController.cpp:538
> > +    v8::Persistent<v8::Context> v8Context = v8::Context::New();
> 
> v8Context -> context

Done.
Comment 5 Adam Barth 2012-08-20 17:09:38 PDT
> hintForCollectGarbage

Ok.  I think that's the name you had before I asked you to change it.  :)
Comment 6 Kentaro Hara 2012-08-20 17:15:22 PDT
Reopening to attach new patch.
Comment 7 Kentaro Hara 2012-08-20 17:15:26 PDT
Created attachment 159568 [details]
Patch
Comment 8 WebKit Review Bot 2012-08-20 19:47:37 PDT
Comment on attachment 159568 [details]
Patch

Clearing flags on attachment: 159568

Committed r126123: <http://trac.webkit.org/changeset/126123>
Comment 9 WebKit Review Bot 2012-08-20 19:47:41 PDT
All reviewed patches have been landed.  Closing bug.