New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 658098 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on: View detail
issue 650150
issue 839389


Participants' hotlists:
Hotlist-Bindings-IDLCompiler


Sign in to add a comment

idl compiler should not special case interface names

Project Member Reported by esprehn@chromium.org, Oct 21 2016

Issue description

The idl compiler has a bunch of special casing for what code is generated based on the interface name, for example the only reason addEventListener allows a callback object with a handleEvent method on it is because of special case handling inside the idl compiler for interfaces named "EventListener".

All custom behavior in the idl compiler should be handled through either [Custom] or other custom attributes like [ImplementedAs] etc.

No interface should have special treatment inside the idl compiler. This is important for maintainability, making the idl system predictable (it took me an hour of reading through the generated code and idl code to understand why the various callback interfaces all generate different code), and for making the idl compiler reusable such that we could generate something like webmodules.
 
Cc: yukishiino@chromium.org bashi@chromium.org
Yeah, this totally makes sense.

(Though we have massively reduced # of hard-coded interface names in the IDL compiler.)

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/310f96a12cbf42ca7e29148970d35f75221e0e87

commit 310f96a12cbf42ca7e29148970d35f75221e0e87
Author: bashi <bashi@chromium.org>
Date: Tue Oct 25 05:21:56 2016

bindings: Drop |idl_name| from IdlDefinitions

|idl_name| comes from filename but it's a bad idea to control code
generation by using filename. Fortunately we no longer use it, so let's
remove it.

BUG=658098

Review-Url: https://codereview.chromium.org/2446923002
Cr-Commit-Position: refs/heads/master@{#427281}

[modify] https://crrev.com/310f96a12cbf42ca7e29148970d35f75221e0e87/third_party/WebKit/Source/bindings/scripts/idl_definitions.py
[modify] https://crrev.com/310f96a12cbf42ca7e29148970d35f75221e0e87/third_party/WebKit/Source/bindings/scripts/idl_reader.py
[modify] https://crrev.com/310f96a12cbf42ca7e29148970d35f75221e0e87/third_party/WebKit/Source/bindings/scripts/v8_interface.py

Comment 3 by peria@chromium.org, Nov 1 2016

Cc: peria@chromium.org
Status: Available (was: Untriaged)
Project Member

Comment 5 by sheriffbot@chromium.org, Nov 10 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 6 by peria@chromium.org, Nov 20 2017

Blockedon: 650150
Owner: peria@chromium.org
Status: Assigned (was: Untriaged)

Comment 7 by peria@chromium.org, May 3 2018

Blockedon: 839389

Comment 8 by peria@chromium.org, May 25 2018

Labels: Hotlist-Bindings-IDLCompiler

Sign in to add a comment