Bug 66567 - Move calls to finishCreation() from constructor to static create() methods
Summary: Move calls to finishCreation() from constructor to static create() methods
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on: 65288 66827 66957 67064 67174 67420 67692 68122
Blocks: 65347
  Show dependency treegraph
 
Reported: 2011-08-19 10:05 PDT by Mark Hahnenberg
Modified: 2011-09-20 14:31 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2011-08-19 10:05:03 PDT
In this step we want to pull all calls to constructorBody() up out of the constructors and into the static create methods.  This change will also require us to chain the constructorBody() calls.
Comment 1 Mark Hahnenberg 2011-08-23 17:23:30 PDT
There are quite a few classes that inherit either directly or indirectly from JSCell.  To get around having to submit one gigantic patch, I can submit the changes to the hierarchy incrementally in a top-down fashion.    

The first step is to add the validation functionality to JSCell (see: https://bugs.webkit.org/show_bug.cgi?id=65288).  This will essentially check and set the "isInitializing" flag inside the allocateCell function and add a constructorBody() to JSCell, which will in turn check and clear the "isInitializing" flag.  This change alone will not perform very extensive checks, since the flag will be turned on and then almost immediately turned back off before we visit any constructor bodies except for JSCell's.

We will then move down the inheritance hierarchy level by level, starting from the top, adding constructorBody() methods wherever there is a non-trivial constructor body, which will call the next constructorBody() method above it in the inheritance hierarchy.  As we go down, we will move those constructorBody() calls out of their constructors and into their static create methods.  This leads to a kind of "unzipping" of initialization lists and constructor bodies down the inheritance hierarchy, which allows us to maintain the correctness of the code across each patch.

As there are seven levels of the inheritance hierarchy not including JSCell, it seems appropriate to split this into seven patches.  This will be a tracking bug for those seven sub-bugs.
Comment 2 Mark Hahnenberg 2011-09-20 14:31:47 PDT
Finished all the levels, closing bug.