Bug 76036 - Implement the [Supplemental] IDL for custom methods
Summary: Implement the [Supplemental] IDL for custom methods
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: 72138
  Show dependency treegraph
 
Reported: 2012-01-10 23:53 PST by Kentaro Hara
Modified: 2012-01-11 16:56 PST (History)
5 users (show)

See Also:


Attachments
Patch (11.10 KB, patch)
2012-01-11 03:14 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff
Patch (8.23 KB, patch)
2012-01-11 15:44 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-01-10 23:53:27 PST
We have implemented the [Supplemental] IDL for non-custom methods in bug 75944. We should also implement it for custom methods.

By this fix, we will have implemented the [Supplemental] IDL for custom attributes, non-custom attributes, custom methods and non-custom methods, which will cover most practical use cases.
Comment 1 Kentaro Hara 2012-01-11 03:14:00 PST
Created attachment 122001 [details]
Patch
Comment 2 Kentaro Hara 2012-01-11 03:18:25 PST
Comment on attachment 122001 [details]
Patch

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

> Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.h:48
> +- (void)supplementalMethod3;

Currently ObjC does not support custom attributes nor methods, but ObjC outputs meaningless code for them. I'll stop those outputs in a follow-up patch.
Comment 3 Adam Barth 2012-01-11 10:17:07 PST
Comment on attachment 122001 [details]
Patch

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

> Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp:332
> +    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
> +    return JSValue::encode(castedThis->supplementalMethod3(impl, exec));

I'm not sure I understand.  This looks like we're calling a non-static method of JSTestInterface, which means we don't need to passing impl as an argument because JSTestInterface already knows about impl.
Comment 4 Kentaro Hara 2012-01-11 15:44:08 PST
Created attachment 122111 [details]
Patch
Comment 5 Kentaro Hara 2012-01-11 15:45:25 PST
Comment on attachment 122001 [details]
Patch

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

>> Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp:332
>> +    return JSValue::encode(castedThis->supplementalMethod3(impl, exec));
> 
> I'm not sure I understand.  This looks like we're calling a non-static method of JSTestInterface, which means we don't need to passing impl as an argument because JSTestInterface already knows about impl.

Right. Fixed it. I've made a similar mistake in bug 74837 and bug 74841. I'll fix them in the next patch.
Comment 6 WebKit Review Bot 2012-01-11 16:56:41 PST
Comment on attachment 122111 [details]
Patch

Clearing flags on attachment: 122111

Committed r104767: <http://trac.webkit.org/changeset/104767>
Comment 7 WebKit Review Bot 2012-01-11 16:56:47 PST
All reviewed patches have been landed.  Closing bug.