Bug 102881 - [V8] Rename v8/custom/*Constructor.cpp to v8/custom/*Custom.cpp
Summary: [V8] Rename v8/custom/*Constructor.cpp to v8/custom/*Custom.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-20 22:32 PST by Kentaro Hara
Modified: 2012-11-21 02:24 PST (History)
5 users (show)

See Also:


Attachments
Patch (39.82 KB, patch)
2012-11-20 22:35 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff
Patch (24.65 KB, patch)
2012-11-21 01:58 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2012-11-20 22:32:50 PST
Writing constructorCallback()s in *Custom.cpp is a convention of custom bindings of JSC and V8. We can rename v8/custom/*Constructor.cpp to v8/custom/*Custom.cpp.
Comment 1 Kentaro Hara 2012-11-20 22:35:54 PST
Created attachment 175343 [details]
Patch
Comment 2 Kentaro Hara 2012-11-20 22:41:51 PST
Comment on attachment 175343 [details]
Patch

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

> Source/WebCore/bindings/v8/custom/V8HTMLImageElementCustom.cpp:80
> +    int width;
> +    int height;
> +    int* optionalWidth = 0;
> +    int* optionalHeight = 0;
> +    if (args.Length() > 0) {
> +        width = toInt32(args[0]);
> +        optionalWidth = &width;
> +    }
> +    if (args.Length() > 1) {
> +        height = toInt32(args[1]);
> +        optionalHeight = &height;
> +    }
> +
> +    RefPtr<HTMLImageElement> image = HTMLImageElement::createForJSConstructor(document, optionalWidth, optionalHeight);

This weird logic prevents me from killing HTMLImageElement's custom constructor... We need to distinguish 'new Image()' from 'new Image(null, null)' and 'new Image(undefined, undefined)'. Maybe we need to support overloaded constructors for NamedConstructor, which would be over-engineering.
Comment 3 Adam Barth 2012-11-21 00:24:41 PST
Comment on attachment 175343 [details]
Patch

ok
Comment 4 WebKit Review Bot 2012-11-21 01:07:39 PST
Comment on attachment 175343 [details]
Patch

Clearing flags on attachment: 175343

Committed r135358: <http://trac.webkit.org/changeset/135358>
Comment 5 WebKit Review Bot 2012-11-21 01:07:45 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Kentaro Hara 2012-11-21 01:26:48 PST
Reverted r135358 for reason:

It broke Chromium/Linux build

Committed r135361: <http://trac.webkit.org/changeset/135361>
Comment 7 Kentaro Hara 2012-11-21 01:58:13 PST
Created attachment 175382 [details]
Patch
Comment 8 WebKit Review Bot 2012-11-21 02:24:52 PST
Comment on attachment 175382 [details]
Patch

Clearing flags on attachment: 175382

Committed r135368: <http://trac.webkit.org/changeset/135368>
Comment 9 WebKit Review Bot 2012-11-21 02:24:57 PST
All reviewed patches have been landed.  Closing bug.