Skip to content

Commit

Permalink
IDL Callbacks with variadic params cause build failures on some platf…
Browse files Browse the repository at this point in the history
…orms

https://bugs.webkit.org/show_bug.cgi?id=267548

Reviewed by Chris Dumez.

Includes the IDLType import in the header file to prevent template
specialization errors on some platforms.

* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeaderContent):
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithVariadic.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithVariadic.h:

Canonical link: https://commits.webkit.org/273050@main
  • Loading branch information
lukewarlow committed Jan 15, 2024
1 parent 3074b66 commit a505bd7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6674,6 +6674,7 @@ sub GenerateCallbackHeaderContent
my $IDLType = GetIDLType($interfaceOrCallback, $argument->type);
if ($argument->isVariadic) {
AddToIncludes("JSDOMConvertVariadic.h", $includesRef, 1);
AddToIncludesForIDLType($argument->type, $includesRef, 1);
push(@arguments, "FixedVector<typename VariadicConverter<${IDLType}>::Item>&& " . $argument->name);
} else {
push(@arguments, "typename ${IDLType}::ParameterType " . $argument->name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "JSTestCallbackFunctionWithVariadic.h"

#include "ContextDestructionObserverInlines.h"
#include "JSDOMConvertAny.h"
#include "JSDOMConvertStrings.h"
#include "JSDOMExceptionHandling.h"
#include "ScriptExecutionContext.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "IDLTypes.h"
#include "JSCallbackData.h"
#include "JSDOMConvertAny.h"
#include "JSDOMConvertVariadic.h"
#include "TestCallbackFunctionWithVariadic.h"
#include <wtf/Forward.h>
Expand Down

0 comments on commit a505bd7

Please sign in to comment.