Bug 69311 - Add static ClassInfo structs to classes that override JSCell::getCallData
Summary: Add static ClassInfo structs to classes that override JSCell::getCallData
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
Depends on: 69368
Blocks: 67690 69186
  Show dependency treegraph
Reported: 2011-10-03 18:03 PDT by Mark Hahnenberg
Modified: 2011-10-04 19:46 PDT (History)
2 users (show)

See Also:

Patch (11.57 KB, patch)
2011-10-03 18:45 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff
Patch (13.17 KB, patch)
2011-10-04 15:11 PDT, Mark Hahnenberg
darin: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2011-10-03 18:03:26 PDT
In order for the dynamic lookup on the method table to work properly, every class that implements its own version of the function in question (in this case, getCallData) needs to provide its own static ClassInfo structure, otherwise the wrong method will be called (the next parent in the class hierarchy that defines its own ClassInfo).  We therefore need to add new structures to those classes that override getCallData but don't yet have them.
Comment 1 Mark Hahnenberg 2011-10-03 18:45:53 PDT
Created attachment 109567 [details]
Comment 2 Darin Adler 2011-10-04 09:28:50 PDT
Comment on attachment 109567 [details]

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

> Source/JavaScriptCore/ChangeLog:9
> +        Added ClassInfo structs to each class that defined its own getCallData 
> +        function but did not already have its own ClassInfo struct.  This is a 

Are these structs used yet, or is that a task for a separate patch?

> Source/JavaScriptCore/runtime/Error.cpp:207
> +    virtual CallType getCallDataVirtual(CallData& callData)
>      {
>          return getCallData(this, callData);
>      }

Typically we don’t want virtual functions to also have inline function definitions. Not new in this patch and probably not a problem since we’ll be deleting this soon.
Comment 3 Mark Hahnenberg 2011-10-04 11:07:42 PDT
> Are these structs used yet, or is that a task for a separate patch?

These structs are not yet used, but they are a preliminary step for bug 69186 to make it easier to review.
Comment 4 WebKit Review Bot 2011-10-04 12:21:07 PDT
Comment on attachment 109567 [details]

Clearing flags on attachment: 109567

Committed r96630: <http://trac.webkit.org/changeset/96630>
Comment 5 WebKit Review Bot 2011-10-04 12:21:11 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Mark Hahnenberg 2011-10-04 13:41:02 PDT
Reopening because the patch caused assertion failures in validateCell due to fact that not all of the new ClassInfo structs are being used in their associated Structures due to a lack of createStructure methods in these classes.  Rolled out and will resubmit with fixes.
Comment 7 Mark Hahnenberg 2011-10-04 15:11:04 PDT
Created attachment 109701 [details]
Comment 8 WebKit Review Bot 2011-10-04 19:18:55 PDT
Comment on attachment 109701 [details]

Rejecting attachment 109701 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
r96672 = b07c6f5e8ee25b998824c8fae4991c8b2df68c6c
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.
Updating chromium port dependencies using gclient...

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://queues.webkit.org/results/9944597
Comment 9 Mark Hahnenberg 2011-10-04 19:46:46 PDT
Committed r96674: <http://trac.webkit.org/changeset/96674>