Bug 94455

Summary: [V8] Move collectGarbage() from ScriptController to V8GCController
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, japhet, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 85330    
Attachments:
Description Flags
Patch
none
Patch none

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.