[webkit-changes] [WebKit/WebKit] 030b60: Support regular and static operations with the sam...

Andreu Botella noreply at github.com
Thu Mar 9 14:56:42 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 030b6006721b6d98c23068771e5d07352c89bf4c
      https://github.com/WebKit/WebKit/commit/030b6006721b6d98c23068771e5d07352c89bf4c
  Author: Andreu Botella <abotella at igalia.com>
  Date:   2023-03-09 (Thu, 09 Mar 2023)

  Changed paths:
    M Source/WebCore/bindings/scripts/CodeGenerator.pm
    M Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
    M Source/WebCore/bindings/scripts/test/TestObj.idl

  Log Message:
  -----------
  Support regular and static operations with the same identifier
https://bugs.webkit.org/show_bug.cgi?id=239672

Reviewed by Darin Adler and Chris Dumez.

WebIDL used to disallow static operations from having the same name as
a regular operation of the same interface. WebKit never included this
as a check in the parser or code generator; instead, the code
generator would treat all operations with the same name as part of the
same overload set, and would produce the wrong generated code.

However, WebIDL changed to allow static and regular operations with
the same name in https://github.com/whatwg/webidl/issues/1097, which
would not share an overload set. This change implements this in
WebKit.

* Source/WebCore/bindings/scripts/CodeGenerator.pm:
(LinkOverloadedOperations):
* Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjDOMConstructor::construct):
(WebCore::jsTestObjPrototypeFunction_instanceAndStaticMethodWithTheSameIdentifierBody):
(WebCore::JSC_DEFINE_HOST_FUNCTION):
(WebCore::jsTestObjConstructorFunction_instanceAndStaticMethodWithTheSameIdentifierBody):
* Source/WebCore/bindings/scripts/test/TestObj.idl:

Canonical link: https://commits.webkit.org/261472@main




More information about the webkit-changes mailing list