Bug 92168 - [V8] Correct WebIDL type should be used in the testing IDL file
Summary: [V8] Correct WebIDL type should be used in the testing IDL file
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-24 15:19 PDT by Jian Li
Modified: 2012-07-24 17:27 PDT (History)
6 users (show)

See Also:


Attachments
Proposed Patch (9.05 KB, patch)
2012-07-24 15:42 PDT, Jian Li
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.