Bug 153847 - ArrayPrototype should have a destroy function
Summary: ArrayPrototype should have a destroy function
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Miller
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-02-03 17:08 PST by Keith Miller
Modified: 2016-02-04 16:36 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.24 KB, patch)
2016-02-03 17:11 PST, Keith Miller
no flags Details | Formatted Diff | Diff
Patch (8.62 KB, patch)
2016-02-04 14:30 PST, Keith Miller
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.