Bug 153847

Summary: ArrayPrototype should have a destroy function
Product: WebKit Reporter: Keith Miller <keith_miller>
Component: New BugsAssignee: Keith Miller <keith_miller>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, mark.lam, msaboff, saam
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Keith Miller 2016-02-03 17:08:11 PST
ArrayPrototype should have a destroy function
Comment 1 Keith Miller 2016-02-03 17:11:10 PST
Created attachment 270612 [details]
Patch
Comment 2 Andreas Kling 2016-02-03 17:24:23 PST
Comment on attachment 270612 [details]
Patch

destroy() will not be called unless you also add
static const bool needsDestruction = true;
to ArrayPrototype.

(This will cause it to get allocated in a MarkedBlock that runs destructors.)
Comment 3 Keith Miller 2016-02-04 14:29:11 PST
rdar://problem/24494029
Comment 4 Keith Miller 2016-02-04 14:30:39 PST
Created attachment 270697 [details]
Patch
Comment 5 Saam Barati 2016-02-04 14:33:32 PST
Comment on attachment 270697 [details]
Patch

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

> Source/JavaScriptCore/jsc.cpp:2092
> +        vm->heap.collectAllGarbage();

why not tear down the VM here?
Comment 6 Keith Miller 2016-02-04 14:44:27 PST
Per an offline conversation with Filip, users don't usually do it and a we want jsc.cpp to act in a way that models how people the framework. I wouldn't be opposed to adding another option doing so in a different patch, however.
Comment 7 Filip Pizlo 2016-02-04 16:02:46 PST
Comment on attachment 270697 [details]
Patch

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

>> Source/JavaScriptCore/jsc.cpp:2092
>> +        vm->heap.collectAllGarbage();
> 
> why not tear down the VM here?

VM tear-down would test other things that maybe we don't want to test with gcAtEnd.
Comment 8 WebKit Commit Bot 2016-02-04 16:36:26 PST
Comment on attachment 270697 [details]
Patch

Clearing flags on attachment: 270697

Committed r196155: <http://trac.webkit.org/changeset/196155>
Comment 9 WebKit Commit Bot 2016-02-04 16:36:29 PST
All reviewed patches have been landed.  Closing bug.