WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
121305
StrictTypeChecking extended attribute fails for methods with sequence<T>
https://bugs.webkit.org/show_bug.cgi?id=121305
Summary
StrictTypeChecking extended attribute fails for methods with sequence<T>
Antonio Gomes
Reported
2013-09-13 09:59:19 PDT
it tries to include JSSequence.h, which does not exist.
Attachments
patch
(8.63 KB, patch)
2013-09-16 11:44 PDT
,
Antonio Gomes
no flags
Details
Formatted Diff
Diff
actual patch
(8.61 KB, patch)
2013-09-16 13:14 PDT
,
Antonio Gomes
darin
: review+
Details
Formatted Diff
Diff
patch - addressing Chris' comments
(10.58 KB, patch)
2013-09-18 12:49 PDT
,
Antonio Gomes
no flags
Details
Formatted Diff
Diff
patch - make added tests JS-only
(2.20 KB, patch)
2013-09-20 09:36 PDT
,
Antonio Gomes
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Antonio Gomes
Comment 1
2013-09-13 14:00:13 PDT
Hey Chris, I have a simple patch for this that basically just adds a further if check, and works find. See
https://gist.github.com/tonikitoo/ca92684ace9f226d8060
I am wondering if you have feedback and what is the way to test it (if any)? TestObj.idl?
Antonio Gomes
Comment 2
2013-09-16 11:44:24 PDT
Created
attachment 211812
[details]
patch
WebKit Commit Bot
Comment 3
2013-09-16 11:47:07 PDT
Attachment 211812
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/bindings/scripts/CodeGeneratorJS.pm', u'Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp', u'Source/WebCore/bindings/scripts/test/JS/JSTestObj.h', u'Source/WebCore/bindings/scripts/test/TestObj.idl']" exit_code: 1 Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:3047: Omit int when using unsigned [runtime/unsigned] [1] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Antonio Gomes
Comment 4
2013-09-16 13:14:44 PDT
Created
attachment 211825
[details]
actual patch
Chris Dumez
Comment 5
2013-09-16 23:39:41 PDT
Comment on
attachment 211825
[details]
actual patch View in context:
https://bugs.webkit.org/attachment.cgi?id=211825&action=review
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2925 > + if (!IsNativeType($argType) && !$codeGenerator->GetSequenceType($argType)) {
Based on the comment above, the type needs to be an interface. I believe the check we really want is: if ($codeGenerator->IsWrapperType($argType)) This is exclude native types, sequences, arrays, basically everything that is not a wrapper type. Also note that there is another place in the script where the check needs to be updated.
Chris Dumez
Comment 6
2013-09-16 23:41:16 PDT
Comment on
attachment 211825
[details]
actual patch View in context:
https://bugs.webkit.org/attachment.cgi?id=211825&action=review
> Source/WebCore/bindings/scripts/test/TestObj.idl:227 > + [StrictTypeChecking, RaisesException] bool strictFunctionWithSequence(TestObj objArg, sequence<unsigned long> a);
Please add a test with an array as well.
Antonio Gomes
Comment 7
2013-09-18 12:49:05 PDT
Created
attachment 212014
[details]
patch - addressing Chris' comments Here is an updated patch. Chris, if you have any additional suggestion, please advice. Otherwise, it should be good to land.
Chris Dumez
Comment 8
2013-09-18 13:15:00 PDT
Comment on
attachment 212014
[details]
patch - addressing Chris' comments View in context:
https://bugs.webkit.org/attachment.cgi?id=212014&action=review
LGTM with a bit.
> Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp:-357 > - if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(JSlong[]::info()))
Ah, we fixed another bug :)
> Source/WebCore/bindings/scripts/test/TestObj.idl:227 > + [StrictTypeChecking, RaisesException] bool strictFunctionWithSequence(TestObj objArg, sequence<unsigned long> a);
nit: It would be nice to add a method taking an array as well.
Chris Dumez
Comment 9
2013-09-18 13:15:41 PDT
Comment on
attachment 212014
[details]
patch - addressing Chris' comments View in context:
https://bugs.webkit.org/attachment.cgi?id=212014&action=review
LGTM with a nit.
> Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp:-357 > - if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(JSlong[]::info()))
Ah, we fixed another bug :)
> Source/WebCore/bindings/scripts/test/TestObj.idl:227 > + [StrictTypeChecking, RaisesException] bool strictFunctionWithSequence(TestObj objArg, sequence<unsigned long> a);
nit: It would be nice to add a method taking an array as well.
Antonio Gomes
Comment 10
2013-09-20 06:32:38 PDT
> > Source/WebCore/bindings/scripts/test/TestObj.idl:227 > > + [StrictTypeChecking, RaisesException] bool strictFunctionWithSequence(TestObj objArg, sequence<unsigned long> a); > > nit: It would be nice to add a method taking an array as well.
Done:
http://trac.webkit.org/changeset/156157
Alexey Proskuryakov
Comment 11
2013-09-20 08:43:48 PDT
This broke bindings tests, <
http://build.webkit.org/builders/Apple%20MountainLion%20Release%20WK1%20%28Tests%29/builds/13106/steps/bindings-generation-tests/logs/stdio
>. Antonio, are you around to fix these now?
Antonio Gomes
Comment 12
2013-09-20 09:10:21 PDT
(In reply to
comment #11
)
> This broke bindings tests, <
http://build.webkit.org/builders/Apple%20MountainLion%20Release%20WK1%20%28Tests%29/builds/13106/steps/bindings-generation-tests/logs/stdio
>. Antonio, are you around to fix these now?
Hi ap. After looking at the failures, they are non-JS especific results that need rebaseline. I on propose only updated the JS ones, because I fixed a bug in CodeGeneratorJS.pm only. (GObject seems to generated odd results) So, if the policy just rebaseline all binding generator results, even if it is still broken (see below), I can do that. Please advice. FAIL: (CPP) WebDOMTestObj.h --- WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h 2013-07-11 08:13:02.000000000 -0700 +++ /var/folders/81/qcmw8mp11lvdf69qgyzyl2000000gn/T/tmpeC9T35/WebDOMTestObj.h 2013-09-20 08:38:22.000000000 -0700 @@ -41,6 +41,7 @@ class WebDOMTestNode; class WebDOMTestObj; class WebDOMbool; +class WebDOMlong[]; It looks wrong, but possibly because the code generator is buggy.
Antonio Gomes
Comment 13
2013-09-20 09:35:25 PDT
Reopening to commit a temporary band-aid patch.
Antonio Gomes
Comment 14
2013-09-20 09:36:16 PDT
Created
attachment 212182
[details]
patch - make added tests JS-only
WebKit Commit Bot
Comment 15
2013-09-20 10:09:09 PDT
Comment on
attachment 212182
[details]
patch - make added tests JS-only Clearing flags on attachment: 212182 Committed
r156175
: <
http://trac.webkit.org/changeset/156175
>
WebKit Commit Bot
Comment 16
2013-09-20 10:09:13 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug