Bug 110765 - [V8] Generate a wrapper method for constructor callbacks
Summary: [V8] Generate a wrapper method for constructor callbacks
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: 110667
  Show dependency treegraph
 
Reported: 2013-02-25 09:55 PST by Kentaro Hara
Modified: 2013-02-25 13:30 PST (History)
6 users (show)

See Also:


Attachments
Patch (40.46 KB, patch)
2013-02-25 10:29 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 2013-02-25 09:55:55 PST
This is one of steps to insert TRACE_EVENT_STATE() macros into DOM bindings. This patch introduces an indirection function for constructor(), like this:

// For non-custom constructors
void constructorCallback(...) {
  return constructor(...);
}

// For custom constructors
void constructorCallback(...) {
  return constructorCustom(...);
}
Comment 1 Kentaro Hara 2013-02-25 10:29:28 PST
Created attachment 190088 [details]
Patch
Comment 2 Kentaro Hara 2013-02-25 10:33:45 PST
Comment on attachment 190088 [details]
Patch

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

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:2014
> +    if (HasCustomConstructor($interface)) {
> +        push(@implContent, "    return V8${interfaceName}::constructorCustom(args);\n");
> +    } else {
> +        push(@implContent, "    return ${interfaceName}V8Internal::constructor(args);\n");
> +    }

This is the essential part of this patch. Other diffs are just for making this part work.
Comment 3 Adam Barth 2013-02-25 11:54:41 PST
Comment on attachment 190088 [details]
Patch

ok
Comment 4 Kentaro Hara 2013-02-25 13:30:00 PST
Committed r143965: <http://trac.webkit.org/changeset/143965>