Bug 92168

Summary: [V8] Correct WebIDL type should be used in the testing IDL file
Product: WebKit Reporter: Jian Li <jianli>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, haraken, japhet, jochen, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed Patch none

Description Jian Li 2012-07-24 15:19:07 PDT
The V8int used in the bindings code is incorrect.

> Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp:1740
> +    EXCEPTION_BLOCK(int, intArg, V8int::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)) ? V8int::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined))) : 0);
Comment 1 Adam Barth 2012-07-24 15:26:34 PDT
V8int isn't the problem.  The problem is that you're using "int" in the IDL file, which is wrong.  The correct type for integers in IDL is long.
Comment 2 Jian Li 2012-07-24 15:42:11 PDT
Created attachment 154159 [details]
Proposed Patch
Comment 3 Kentaro Hara 2012-07-24 16:25:48 PDT
Comment on attachment 154159 [details]
Proposed Patch

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

> Source/WebCore/bindings/scripts/test/TestObj.idl:193
> +        [V8EnabledAtRuntime=FeatureName] void enabledAtRuntimeMethod2(in long intArg);

Let's rename to longArg.

> Source/WebCore/bindings/scripts/test/TestObj.idl:198
> +        [V8EnabledPerContext] void enabledPerContextMethod1(in long intArg);
> +        [V8EnabledPerContext=FeatureName] void enabledPerContextMethod2(in long intArg);

Ditto.
Comment 4 Jian Li 2012-07-24 16:52:04 PDT
Committed as http://trac.webkit.org/changeset/123550.