bind-gen: Fix HTML{Embed,Object}Element's named definer

For a historical reason, HTML{Embed,Object}Element's named
definer depends on a fallback logic of the definer and also
the named property setter.

This patch fixes the bug with a minimal change so that it's
easy to backport it.

(cherry picked from commit 7895d48b4faf51d22ece2f75ff021c484e61e1cb)

(cherry picked from commit 1de53ad456499c03f57df16e005a7b9fd2368858)

Bug: 1137541
Change-Id: Ic3af70604a379814fae24970317868ab89f7c4c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2467744
Reviewed-by: Kentaro Hara <[email protected]>
Commit-Queue: Yuki Shiino <[email protected]>
Cr-Original-Original-Commit-Position: refs/heads/master@{#816597}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2473320
Reviewed-by: Yuki Shiino <[email protected]>
Cr-Original-Commit-Position: refs/branch-heads/4280@{#405}
Cr-Original-Branched-From: ea420fb963f9658c9969b6513c56b8f47efa1a2a-refs/heads/master@{#812852}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2481462
Reviewed-by: Krishna Govind <[email protected]>
Commit-Queue: Krishna Govind <[email protected]>
Cr-Commit-Position: refs/branch-heads/4240@{#1263}
Cr-Branched-From: f297677702651916bbf65e59c0d4bbd4ce57d1ee-refs/heads/master@{#800218}
diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py b/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
index 40b06ca..d2ef2a5 100644
--- a/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
+++ b/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
@@ -2942,6 +2942,17 @@
   }
   return;
 }
+"""))
+        if cg_context.interface.identifier in ("HTMLEmbedElement",
+                                               "HTMLObjectElement"):
+            body.append(
+                TextNode("""\
+// HTMLEmbedElement and HTMLObjectElement's named properties implementation
+// depend on the default fallback behavior.  So, just fallback.
+"""))
+        else:
+            body.append(
+                TextNode("""\
 // step 2.2.2.2. Invoke the named property setter with P and Desc.[[Value]].
 ${class_name}::NamedPropertySetterCallback(
     ${v8_property_name}, ${v8_property_desc}.value(), ${info});