Changeset 196563 in webkit


Ignore:
Timestamp:
Feb 14, 2016 6:17:33 PM (8 years ago)
Author:
Chris Dumez
Message:

Window and WorkerGlobalScope should inherit EventTarget
https://bugs.webkit.org/show_bug.cgi?id=154170
<rdar://problem/24642377>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline now that a couple of checks are passing.

  • web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Window and WorkerGlobalScope should inherit EventTarget instead of
duplicating the EventTarget API in their IDL. These were the last
interfaces that needed fixing. The next step will be to get rid
of the [EventTarget] IDL extended attribute and rely entirely
on the EventTarget inheritance.

Test:

  • fast/frames/detached-frame-eventListener.html
  • Covered by existing tests.
  • WebCore.xcodeproj/project.pbxproj:

Add JSEventTargetCustom.h header to the project.

  • bindings/js/JSDOMWindowCustom.cpp:

Drop custom bindings for Window's addEventListener() and
removeEventListener(). The only reason these needed custom
code was to add a check for frameless windows. The frameless
Window checks was moved to the respective methods in the
JSEventTarget generated bindings.

  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::setWindow):
Set WindowPrototype's prototype to EventTarget's prototype.

  • bindings/js/JSDOMWindowShell.h:
  • bindings/js/JSDictionary.cpp:

Include "DOMWindow.h" to fix the build.

  • bindings/js/JSEventTargetCustom.cpp:

(WebCore::JSEventTarget::toWrapped):
Handle DOMWindow and WorkerGlobalScope explicitely in toWrapped()
and get rid of the DOM_EVENT_TARGET_INTERFACES_FOR_EACH(TRY_TO_UNWRAP_WITH_INTERFACE)
now that all interfaces inherit EventTarget when they should.
The reason DOMWindow and WorkerGlobalScope still need special
handling is because their wrappers (JSDOMWindow /
JSWorkerGlobalScope) do not subclass JSEventTarget.

(WebCore::JSEventTargetOrGlobalScope::create):

  • bindings/js/JSEventTargetCustom.h: Added.

(WebCore::JSEventTargetOrGlobalScope::wrapped):
(WebCore::JSEventTargetOrGlobalScope::operator JSC::JSObject&):
(WebCore::JSEventTargetOrGlobalScope::JSEventTargetOrGlobalScope):
Add a wrapper type for JSEventTarget / JSDOMWindow and
JSWorkerGlobalScope for use in the generated bindings. This is
needed because JSDOMWindow and JSWorkerGlobalScope do not
subclass JSEventTarget. Subclassing JSEventTarget would be
complicated for them because they already subclass
JSDOMWindowBase / JSWorkerGlobalScopeBase, which subclasses
JSDOMGlobalObject.

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initScript):
Set WorkerGlobalScopePrototype's prototype to EventTarget's prototype.

  • bindings/scripts/CodeGeneratorJS.pm:

(ShouldGenerateToJSDeclaration):
Do not generate to toJS() implementation for interfaces that use
the [CustomProxyToJSObject] IDL extended attribute, even if they
inherit EventTarget.

(GetCastingHelperForThisObject):
To initialize castedThis from thisValue JSValue, we now use the
JSEventTargetOrGlobalScope wrapper for the EventTarget
implementation. This is to work around the fact that JSDOMWindow
and JSWorkerGlobalScope do not subclass JSEventTarget.

(GenerateFunctionCastedThis):

  • Drop code handling [WorkerGlobalScope] IDL extended attribute as there is no such attribute.
  • Use auto instead of auto* type for castedThis because JSEventTargetOrGlobalScope::create() returns a unique_ptr.
  • Do not check that castedThis inherits JSEventTarget in the EventTarget bindings code as this no longer holds true.

(GenerateImplementation):
Generate frameless window() and security checks for EventTarget
methods when thisValue is a JSDOMWindow.

  • dom/EventTarget.idl:

Add [JSCustomHeader] IDL Extended attribute as we need a header
to expose JSEventTargetOrGlobalScope class.

  • page/DOMWindow.idl:
  • workers/WorkerGlobalScope.idl:

Inherit EventTarget and stop duplicating the EventTarget API.
This matches the HTML specification.

LayoutTests:

  • fast/frames/detached-frame-eventListener-expected.txt: Added.
  • fast/frames/detached-frame-eventListener.html: Added.

Add test case to cover the use of the EventListener API on a detached
frame.

  • fast/loader/window-clearing-expected.txt:

Rebaseline now that window has one more object in its prototype chain.

  • http/tests/security/cross-frame-access-call-expected.txt:
  • http/tests/security/cross-frame-access-call.html:

Add test coverage for cross-origin access to window.dispatchEvent() which
should not be allowed, in addition to window.addEventListener() and
window.removeEventListener() which were already tested.

Location:
trunk
Files:
3 added
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r196546 r196563  
     12016-02-14  Chris Dumez  <cdumez@apple.com>
     2
     3        Window and WorkerGlobalScope should inherit EventTarget
     4        https://bugs.webkit.org/show_bug.cgi?id=154170
     5        <rdar://problem/24642377>
     6
     7        Reviewed by Darin Adler.
     8
     9        * fast/frames/detached-frame-eventListener-expected.txt: Added.
     10        * fast/frames/detached-frame-eventListener.html: Added.
     11        Add test case to cover the use of the EventListener API on a detached
     12        frame.
     13
     14        * fast/loader/window-clearing-expected.txt:
     15        Rebaseline now that window has one more object in its prototype chain.
     16
     17        * http/tests/security/cross-frame-access-call-expected.txt:
     18        * http/tests/security/cross-frame-access-call.html:
     19        Add test coverage for cross-origin access to window.dispatchEvent() which
     20        should not be allowed, in addition to window.addEventListener() and
     21        window.removeEventListener() which were already tested.
     22
    1232016-02-12  Nan Wang  <n_wang@apple.com>
    224
  • trunk/LayoutTests/fast/loader/window-clearing-expected.txt

    r13865 r196563  
    88
    99PASS: element 2 in the window's prototype chain was cleared
     10
     11PASS: element 3 in the window's prototype chain was cleared
  • trunk/LayoutTests/http/tests/security/cross-frame-access-call-expected.txt

    r196227 r196563  
     1CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
    12CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
    23CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
     
    4647PASS: window.addEventListener.call(targetWindow, 'load', null, false); should be 'undefined' and is.
    4748PASS: window.removeEventListener.call(targetWindow, 'load', null, false); should be 'undefined' and is.
     49PASS: window.dispatchEvent.call(targetWindow, new Event('click')); should be 'undefined' and is.
    4850PASS: window.clearTimeout.call(targetWindow, 0); should be 'undefined' and is.
    4951PASS: window.clearInterval.call(targetWindow, 0); should be 'undefined' and is.
  • trunk/LayoutTests/http/tests/security/cross-frame-access-call.html

    r196227 r196563  
    4343    shouldBe("window.addEventListener.call(targetWindow, 'load', null, false);", "undefined");
    4444    shouldBe("window.removeEventListener.call(targetWindow, 'load', null, false);", "undefined");
     45    shouldBe("window.dispatchEvent.call(targetWindow, new Event('click'));", "undefined");
    4546    shouldBe("window.clearTimeout.call(targetWindow, 0);", "undefined");
    4647    shouldBe("window.clearInterval.call(targetWindow, 0);", "undefined");
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r196520 r196563  
     12016-02-14  Chris Dumez  <cdumez@apple.com>
     2
     3        Window and WorkerGlobalScope should inherit EventTarget
     4        https://bugs.webkit.org/show_bug.cgi?id=154170
     5        <rdar://problem/24642377>
     6
     7        Reviewed by Darin Adler.
     8
     9        Rebaseline now that a couple of checks are passing.
     10
     11        * web-platform-tests/html/dom/interfaces-expected.txt:
     12
    1132016-02-12  Jiewen Tan  <jiewen_tan@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt

    r196520 r196563  
    38003800FAIL DragEvent interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "DragEvent" expected property "DragEvent" missing
    38013801FAIL DragEvent interface: attribute dataTransfer assert_own_property: self does not have own property "DragEvent" expected property "DragEvent" missing
    3802 FAIL Window interface: existence and properties of interface object assert_equals: prototype of Window is not EventTarget expected function "function EventTarget() {
    3803     [native code]
    3804 }" but got function "function () {
    3805     [native code]
    3806 }"
     3802PASS Window interface: existence and properties of interface object
    38073803PASS Window interface object length
    38083804PASS Window interface object name
    3809 FAIL Window interface: existence and properties of interface prototype object assert_equals: Class name for prototype of Window.prototype is not "WindowProperties" expected "[object WindowProperties]" but got "[object Object]"
     3805FAIL Window interface: existence and properties of interface prototype object assert_equals: Class name for prototype of Window.prototype is not "WindowProperties" expected "[object WindowProperties]" but got "[object EventTargetPrototype]"
    38103806FAIL Window interface: existence and properties of interface prototype object's "constructor" property assert_own_property: Window.prototype does not have own property "constructor" expected property "constructor" missing
    38113807PASS Window interface: attribute self
  • trunk/Source/WebCore/ChangeLog

    r196561 r196563  
     12016-02-14  Chris Dumez  <cdumez@apple.com>
     2
     3        Window and WorkerGlobalScope should inherit EventTarget
     4        https://bugs.webkit.org/show_bug.cgi?id=154170
     5        <rdar://problem/24642377>
     6
     7        Reviewed by Darin Adler.
     8
     9        Window and WorkerGlobalScope should inherit EventTarget instead of
     10        duplicating the EventTarget API in their IDL. These were the last
     11        interfaces that needed fixing. The next step will be to get rid
     12        of the [EventTarget] IDL extended attribute and rely entirely
     13        on the EventTarget inheritance.
     14
     15        Test:
     16        - fast/frames/detached-frame-eventListener.html
     17        - Covered by existing tests.
     18
     19        * WebCore.xcodeproj/project.pbxproj:
     20        Add JSEventTargetCustom.h header to the project.
     21
     22        * bindings/js/JSDOMWindowCustom.cpp:
     23        Drop custom bindings for Window's addEventListener() and
     24        removeEventListener(). The only reason these needed custom
     25        code was to add a check for frameless windows. The frameless
     26        Window checks was moved to the respective methods in the
     27        JSEventTarget generated bindings.
     28
     29        * bindings/js/JSDOMWindowShell.cpp:
     30        (WebCore::JSDOMWindowShell::setWindow):
     31        Set WindowPrototype's prototype to EventTarget's prototype.
     32
     33        * bindings/js/JSDOMWindowShell.h:
     34        * bindings/js/JSDictionary.cpp:
     35        Include "DOMWindow.h" to fix the build.
     36
     37        * bindings/js/JSEventTargetCustom.cpp:
     38        (WebCore::JSEventTarget::toWrapped):
     39        Handle DOMWindow and WorkerGlobalScope explicitely in toWrapped()
     40        and get rid of the DOM_EVENT_TARGET_INTERFACES_FOR_EACH(TRY_TO_UNWRAP_WITH_INTERFACE)
     41        now that all interfaces inherit EventTarget when they should.
     42        The reason DOMWindow and WorkerGlobalScope still need special
     43        handling is because their wrappers (JSDOMWindow /
     44        JSWorkerGlobalScope) do not subclass JSEventTarget.
     45
     46        (WebCore::JSEventTargetOrGlobalScope::create):
     47        * bindings/js/JSEventTargetCustom.h: Added.
     48        (WebCore::JSEventTargetOrGlobalScope::wrapped):
     49        (WebCore::JSEventTargetOrGlobalScope::operator JSC::JSObject&):
     50        (WebCore::JSEventTargetOrGlobalScope::JSEventTargetOrGlobalScope):
     51        Add a wrapper type for JSEventTarget / JSDOMWindow and
     52        JSWorkerGlobalScope for use in the generated bindings. This is
     53        needed because JSDOMWindow and JSWorkerGlobalScope do not
     54        subclass JSEventTarget. Subclassing JSEventTarget would be
     55        complicated for them because they already subclass
     56        JSDOMWindowBase / JSWorkerGlobalScopeBase, which subclasses
     57        JSDOMGlobalObject.
     58
     59        * bindings/js/WorkerScriptController.cpp:
     60        (WebCore::WorkerScriptController::initScript):
     61        Set WorkerGlobalScopePrototype's prototype to EventTarget's prototype.
     62
     63        * bindings/scripts/CodeGeneratorJS.pm:
     64        (ShouldGenerateToJSDeclaration):
     65        Do not generate to toJS() implementation for interfaces that use
     66        the [CustomProxyToJSObject] IDL extended attribute, even if they
     67        inherit EventTarget.
     68
     69        (GetCastingHelperForThisObject):
     70        To initialize castedThis from thisValue JSValue, we now use the
     71        JSEventTargetOrGlobalScope wrapper for the EventTarget
     72        implementation. This is to work around the fact that JSDOMWindow
     73        and JSWorkerGlobalScope do not subclass JSEventTarget.
     74
     75        (GenerateFunctionCastedThis):
     76        - Drop code handling [WorkerGlobalScope] IDL extended attribute
     77          as there is no such attribute.
     78        - Use auto instead of auto* type for castedThis because
     79          JSEventTargetOrGlobalScope::create() returns a unique_ptr.
     80        - Do not check that castedThis inherits JSEventTarget in the
     81          EventTarget bindings code as this no longer holds true.
     82
     83        (GenerateImplementation):
     84        Generate frameless window() and security checks for EventTarget
     85        methods when thisValue is a JSDOMWindow.
     86
     87        * dom/EventTarget.idl:
     88        Add [JSCustomHeader] IDL Extended attribute as we need a header
     89        to expose JSEventTargetOrGlobalScope class.
     90
     91        * page/DOMWindow.idl:
     92        * workers/WorkerGlobalScope.idl:
     93        Inherit EventTarget and stop duplicating the EventTarget API.
     94        This matches the HTML specification.
     95
    1962016-02-14  Darin Adler  <darin@apple.com>
    297
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r196560 r196563  
    17101710                467302021C4EFE7800BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h in Headers */ = {isa = PBXBuildFile; fileRef = 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */; };
    17111711                4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 4689F1AE1267BAE100E8D380 /* FileMetadata.h */; };
     1712                46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */; settings = {ATTRIBUTES = (Private, ); }; };
    17121713                46C83EFD1A9BBE2900A79A41 /* GeoNotifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */; };
    17131714                46C83EFE1A9BBE2900A79A41 /* GeoNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    91939194                467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IgnoreOpensDuringUnloadCountIncrementer.h; sourceTree = "<group>"; };
    91949195                4689F1AE1267BAE100E8D380 /* FileMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileMetadata.h; sourceTree = "<group>"; };
     9196                46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEventTargetCustom.h; sourceTree = "<group>"; };
    91959197                46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeoNotifier.cpp; sourceTree = "<group>"; };
    91969198                46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeoNotifier.h; sourceTree = "<group>"; };
     
    2219822200                                F3D461471161D53200CA0D09 /* JSErrorHandler.h */,
    2219922201                                BC60901E0E91B8EC000C68B5 /* JSEventTargetCustom.cpp */,
     22202                                46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */,
    2220022203                                3314ACE910892086000F0E56 /* JSExceptionBase.cpp */,
    2220122204                                3314ACEA10892086000F0E56 /* JSExceptionBase.h */,
     
    2498824991                                2EB4BCD3121F03E300EC4885 /* BlobResourceHandle.h in Headers */,
    2498924992                                976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */,
     24993                                46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */,
    2499024994                                93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */,
    2499124995                                BC5EB5E10E81BE8700B25965 /* BorderData.h in Headers */,
  • trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp

    r196494 r196563  
    752752}
    753753
    754 JSValue JSDOMWindow::addEventListener(ExecState& state)
    755 {
    756     Frame* frame = wrapped().frame();
    757     if (!frame)
    758         return jsUndefined();
    759 
    760     JSValue listener = state.argument(1);
    761     if (!listener.isObject())
    762         return jsUndefined();
    763 
    764     wrapped().addEventListener(state.argument(0).toString(&state)->toAtomicString(&state), JSEventListener::create(asObject(listener), this, false, globalObject()->world()), state.argument(2).toBoolean(&state));
    765     return jsUndefined();
    766 }
    767 
    768 JSValue JSDOMWindow::removeEventListener(ExecState& state)
    769 {
    770     Frame* frame = wrapped().frame();
    771     if (!frame)
    772         return jsUndefined();
    773 
    774     JSValue listener = state.argument(1);
    775     if (!listener.isObject())
    776         return jsUndefined();
    777 
    778     wrapped().removeEventListener(state.argument(0).toString(&state)->toAtomicString(&state), JSEventListener::create(asObject(listener), this, false, globalObject()->world()).ptr(), state.argument(2).toBoolean(&state));
    779     return jsUndefined();
    780 }
    781 
    782754DOMWindow* JSDOMWindow::toWrapped(JSValue value)
    783755{
  • trunk/Source/WebCore/bindings/js/JSDOMWindowShell.cpp

    r191887 r196563  
    3333#include "GCController.h"
    3434#include "JSDOMWindow.h"
    35 #include "DOMWindow.h"
     35#include "JSEventTarget.h"
    3636#include "ScriptController.h"
    3737#include <heap/StrongInlines.h>
     
    8686    JSDOMWindow* jsDOMWindow = JSDOMWindow::create(vm, structure, *domWindow, this);
    8787    prototype->structure()->setGlobalObject(vm, jsDOMWindow);
     88    prototype->structure()->setPrototypeWithoutTransition(vm, JSEventTarget::getPrototype(vm, jsDOMWindow));
    8889    setWindow(vm, jsDOMWindow);
    8990    ASSERT(jsDOMWindow->globalObject() == jsDOMWindow);
  • trunk/Source/WebCore/bindings/js/JSDOMWindowShell.h

    r191887 r196563  
    3030#define JSDOMWindowShell_h
    3131
     32#include "DOMWindow.h"
    3233#include "JSDOMWindow.h"
    3334#include <runtime/JSProxy.h>
     
    3536namespace WebCore {
    3637
    37     class DOMWindow;
    3838    class Frame;
    3939
  • trunk/Source/WebCore/bindings/js/JSDictionary.cpp

    r195954 r196563  
    2828
    2929#include "ArrayValue.h"
     30#include "DOMWindow.h"
    3031#include "Dictionary.h"
    3132#include "JSCSSFontFaceRule.h"
  • trunk/Source/WebCore/bindings/js/JSEventTargetCustom.cpp

    r191887 r196563  
    11/*
    2  * Copyright (C) 2008 Apple Inc. All Rights Reserved.
     2 * Copyright (C) 2008, 2016 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727#include "JSEventTarget.h"
    2828
     29#include "DOMWindow.h"
     30#include "EventTarget.h"
    2931#include "EventTargetHeaders.h"
    3032#include "EventTargetInterfaces.h"
     33#include "JSDOMWindow.h"
    3134#include "JSDOMWindowShell.h"
    3235#include "JSEventListener.h"
     36#include "JSWorkerGlobalScope.h"
     37#include "WorkerGlobalScope.h"
    3338
    3439using namespace JSC;
     
    6267{
    6368    TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindowShell)
     69    TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindow)
     70    TRY_TO_UNWRAP_WITH_INTERFACE(WorkerGlobalScope)
    6471    TRY_TO_UNWRAP_WITH_INTERFACE(EventTarget)
    65     // FIXME: Remove this once all event targets extend EventTarget
    66     DOM_EVENT_TARGET_INTERFACES_FOR_EACH(TRY_TO_UNWRAP_WITH_INTERFACE)
    67     return 0;
     72    return nullptr;
    6873}
    6974
    7075#undef TRY_TO_UNWRAP_WITH_INTERFACE
    7176
     77std::unique_ptr<JSEventTargetWrapper> jsEventTargetCast(JSC::JSValue thisValue)
     78{
     79    if (auto* target = JSC::jsDynamicCast<JSEventTarget*>(thisValue))
     80        return std::make_unique<JSEventTargetWrapper>(target->wrapped(), *target);
     81    if (auto* window = toJSDOMWindow(thisValue))
     82        return std::make_unique<JSEventTargetWrapper>(window->wrapped(), *window);
     83    if (auto* scope = toJSWorkerGlobalScope(thisValue))
     84        return std::make_unique<JSEventTargetWrapper>(scope->wrapped(), *scope);
     85    return nullptr;
     86}
     87
    7288} // namespace WebCore
  • trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp

    r193649 r196563  
    3131#include "JSDOMBinding.h"
    3232#include "JSDedicatedWorkerGlobalScope.h"
     33#include "JSEventTarget.h"
    3334#include "ScriptSourceCode.h"
    3435#include "WebCoreJSClientData.h"
     
    9091        ASSERT(m_workerGlobalScopeWrapper->structure()->globalObject() == m_workerGlobalScopeWrapper);
    9192        workerGlobalScopePrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get());
     93        workerGlobalScopePrototype->structure()->setPrototypeWithoutTransition(*m_vm, JSEventTarget::getPrototype(*m_vm, m_workerGlobalScopeWrapper.get()));
    9294        dedicatedContextPrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get());
    9395    }
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r196476 r196563  
    559559    return 0 if not NeedsImplementationClass($interface);
    560560    return 0 if $interface->name eq "AbstractView";
     561    return 0 if $interface->extendedAttributes->{"CustomProxyToJSObject"};
    561562    return 1 if (!$hasParent or $interface->extendedAttributes->{"JSGenerateToJSObject"} or $interface->extendedAttributes->{"CustomToJSObject"});
    562563    return 1 if $interface->parent && $interface->parent eq "EventTarget";
     
    17311732{
    17321733    my $interface = shift;
    1733 
    1734     if ($interface->name eq "Node") {
    1735         return "jsNodeCast";
    1736     }
    1737     if ($interface->name eq "Element") {
    1738         return "jsElementCast";
    1739     }
    1740     if ($interface->name eq "Document") {
    1741         return "jsDocumentCast";
    1742     }
    1743     return "jsDynamicCast<JS" . $interface->name . "*>";
     1734    my $interfaceName = $interface->name;
     1735
     1736    return "jsNodeCast" if $interfaceName eq "Node";
     1737    return "jsElementCast" if $interfaceName eq "Element";
     1738    return "jsDocumentCast" if $interfaceName eq "Document";
     1739    return "jsEventTargetCast" if $interfaceName eq "EventTarget";
     1740    return "jsDynamicCast<JS$interfaceName*>";
    17441741}
    17451742
     
    29452942                    }
    29462943
     2944                    # EventTarget needs to do some extra checks if castedThis is a JSDOMWindow.
     2945                    if ($interface->name eq "EventTarget") {
     2946                        $implIncludes{"DOMWindow.h"} = 1;
     2947                        push(@implContent, "    if (auto* window = castedThis->wrapped().toDOMWindow()) {\n");
     2948                        push(@implContent, "        if (!window->frame() || !BindingSecurity::shouldAllowAccessToDOMWindow(state, *window))\n");
     2949                        push(@implContent, "            return JSValue::encode(jsUndefined());\n");
     2950                        push(@implContent, "    }\n");
     2951                    }
    29472952                    # For compatibility with legacy content, the EventListener calls are generated without GenerateArgumentsCountCheck.
    29482953                    if ($function->signature->name eq "addEventListener") {
     
    32293234        push(@implContent, "    if (UNLIKELY(!castedThis))\n");
    32303235        push(@implContent, "        return throwVMTypeError(state);\n");
    3231     } elsif ($interface->extendedAttributes->{"WorkerGlobalScope"}) {
    3232         push(@implContent, "    $className* castedThis = to${className}(state->thisValue().toThis(state, NotStrictMode));\n");
    3233         push(@implContent, "    if (UNLIKELY(!castedThis))\n");
    3234         push(@implContent, "        return throwVMTypeError(state);\n");
    32353236    } else {
    32363237        push(@implContent, "    JSValue thisValue = state->thisValue();\n");
    3237         push(@implContent, "    $className* castedThis = " . GetCastingHelperForThisObject($interface) . "(thisValue);\n");
     3238        push(@implContent, "    auto castedThis = " . GetCastingHelperForThisObject($interface) . "(thisValue);\n");
    32383239        my $domFunctionName = $function->signature->name;
    32393240        push(@implContent, "    if (UNLIKELY(!castedThis))\n");
     
    32413242    }
    32423243
    3243     push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(castedThis, ${className}::info());\n");
     3244    push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(castedThis, ${className}::info());\n") unless $interfaceName eq "EventTarget";
    32443245}
    32453246
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp

    r196396 r196563  
    201201{
    202202    JSValue thisValue = state->thisValue();
    203     JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);
     203    auto castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);
    204204    if (UNLIKELY(!castedThis))
    205205        return throwThisTypeError(*state, "TestActiveDOMObject", "excitingFunction");
     
    220220{
    221221    JSValue thisValue = state->thisValue();
    222     JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);
     222    auto castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);
    223223    if (UNLIKELY(!castedThis))
    224224        return throwThisTypeError(*state, "TestActiveDOMObject", "postMessage");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp

    r196396 r196563  
    187187{
    188188    JSValue thisValue = state->thisValue();
    189     JSTestCustomNamedGetter* castedThis = jsDynamicCast<JSTestCustomNamedGetter*>(thisValue);
     189    auto castedThis = jsDynamicCast<JSTestCustomNamedGetter*>(thisValue);
    190190    if (UNLIKELY(!castedThis))
    191191        return throwThisTypeError(*state, "TestCustomNamedGetter", "anotherFunction");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp

    r196466 r196563  
    199199{
    200200    JSValue thisValue = state->thisValue();
    201     JSTestEventTarget* castedThis = jsDynamicCast<JSTestEventTarget*>(thisValue);
     201    auto castedThis = jsDynamicCast<JSTestEventTarget*>(thisValue);
    202202    if (UNLIKELY(!castedThis))
    203203        return throwThisTypeError(*state, "TestEventTarget", "item");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r196396 r196563  
    766766{
    767767    JSValue thisValue = state->thisValue();
    768     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
     768    auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
    769769    if (UNLIKELY(!castedThis))
    770770        return throwThisTypeError(*state, "TestInterface", "implementsMethod1");
     
    781781{
    782782    JSValue thisValue = state->thisValue();
    783     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
     783    auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
    784784    if (UNLIKELY(!castedThis))
    785785        return throwThisTypeError(*state, "TestInterface", "implementsMethod2");
     
    810810{
    811811    JSValue thisValue = state->thisValue();
    812     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
     812    auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
    813813    if (UNLIKELY(!castedThis))
    814814        return throwThisTypeError(*state, "TestInterface", "implementsMethod3");
     
    832832{
    833833    JSValue thisValue = state->thisValue();
    834     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
     834    auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
    835835    if (UNLIKELY(!castedThis))
    836836        return throwThisTypeError(*state, "TestInterface", "supplementalMethod1");
     
    847847{
    848848    JSValue thisValue = state->thisValue();
    849     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
     849    auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
    850850    if (UNLIKELY(!castedThis))
    851851        return throwThisTypeError(*state, "TestInterface", "supplementalMethod2");
     
    876876{
    877877    JSValue thisValue = state->thisValue();
    878     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
     878    auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
    879879    if (UNLIKELY(!castedThis))
    880880        return throwThisTypeError(*state, "TestInterface", "supplementalMethod3");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp

    r196396 r196563  
    200200{
    201201    JSValue thisValue = state->thisValue();
    202     JSTestJSBuiltinConstructor* castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(thisValue);
     202    auto castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(thisValue);
    203203    if (UNLIKELY(!castedThis))
    204204        return throwThisTypeError(*state, "TestJSBuiltinConstructor", "testCustomFunction");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp

    r196396 r196563  
    152152{
    153153    JSValue thisValue = state->thisValue();
    154     JSTestMediaQueryListListener* castedThis = jsDynamicCast<JSTestMediaQueryListListener*>(thisValue);
     154    auto castedThis = jsDynamicCast<JSTestMediaQueryListListener*>(thisValue);
    155155    if (UNLIKELY(!castedThis))
    156156        return throwThisTypeError(*state, "TestMediaQueryListListener", "method");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp

    r196396 r196563  
    422422{
    423423    JSValue thisValue = state->thisValue();
    424     JSTestNondeterministic* castedThis = jsDynamicCast<JSTestNondeterministic*>(thisValue);
     424    auto castedThis = jsDynamicCast<JSTestNondeterministic*>(thisValue);
    425425    if (UNLIKELY(!castedThis))
    426426        return throwThisTypeError(*state, "TestNondeterministic", "nondeterministicZeroArgFunction");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r196396 r196563  
    30193019{
    30203020    JSValue thisValue = state->thisValue();
    3021     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3021    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    30223022    if (UNLIKELY(!castedThis))
    30233023        return throwThisTypeError(*state, "TestObj", "voidMethod");
     
    30313031{
    30323032    JSValue thisValue = state->thisValue();
    3033     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3033    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    30343034    if (UNLIKELY(!castedThis))
    30353035        return throwThisTypeError(*state, "TestObj", "voidMethodWithArgs");
     
    30543054{
    30553055    JSValue thisValue = state->thisValue();
    3056     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3056    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    30573057    if (UNLIKELY(!castedThis))
    30583058        return throwThisTypeError(*state, "TestObj", "byteMethod");
     
    30663066{
    30673067    JSValue thisValue = state->thisValue();
    3068     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3068    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    30693069    if (UNLIKELY(!castedThis))
    30703070        return throwThisTypeError(*state, "TestObj", "byteMethodWithArgs");
     
    30893089{
    30903090    JSValue thisValue = state->thisValue();
    3091     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3091    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    30923092    if (UNLIKELY(!castedThis))
    30933093        return throwThisTypeError(*state, "TestObj", "octetMethod");
     
    31013101{
    31023102    JSValue thisValue = state->thisValue();
    3103     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3103    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    31043104    if (UNLIKELY(!castedThis))
    31053105        return throwThisTypeError(*state, "TestObj", "octetMethodWithArgs");
     
    31243124{
    31253125    JSValue thisValue = state->thisValue();
    3126     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3126    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    31273127    if (UNLIKELY(!castedThis))
    31283128        return throwThisTypeError(*state, "TestObj", "longMethod");
     
    31363136{
    31373137    JSValue thisValue = state->thisValue();
    3138     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3138    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    31393139    if (UNLIKELY(!castedThis))
    31403140        return throwThisTypeError(*state, "TestObj", "longMethodWithArgs");
     
    31593159{
    31603160    JSValue thisValue = state->thisValue();
    3161     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3161    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    31623162    if (UNLIKELY(!castedThis))
    31633163        return throwThisTypeError(*state, "TestObj", "objMethod");
     
    31713171{
    31723172    JSValue thisValue = state->thisValue();
    3173     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3173    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    31743174    if (UNLIKELY(!castedThis))
    31753175        return throwThisTypeError(*state, "TestObj", "objMethodWithArgs");
     
    31943194{
    31953195    JSValue thisValue = state->thisValue();
    3196     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3196    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    31973197    if (UNLIKELY(!castedThis))
    31983198        return throwThisTypeError(*state, "TestObj", "methodWithSequenceArg");
     
    32113211{
    32123212    JSValue thisValue = state->thisValue();
    3213     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3213    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    32143214    if (UNLIKELY(!castedThis))
    32153215        return throwThisTypeError(*state, "TestObj", "methodReturningSequence");
     
    32283228{
    32293229    JSValue thisValue = state->thisValue();
    3230     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3230    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    32313231    if (UNLIKELY(!castedThis))
    32323232        return throwThisTypeError(*state, "TestObj", "methodWithEnumArg");
     
    32493249{
    32503250    JSValue thisValue = state->thisValue();
    3251     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3251    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    32523252    if (UNLIKELY(!castedThis))
    32533253        return throwThisTypeError(*state, "TestObj", "methodWithOptionalEnumArgAndDefaultValue");
     
    32783278{
    32793279    JSValue thisValue = state->thisValue();
    3280     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3280    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    32813281    if (UNLIKELY(!castedThis))
    32823282        return throwThisTypeError(*state, "TestObj", "methodThatRequiresAllArgsAndThrows");
     
    33013301{
    33023302    JSValue thisValue = state->thisValue();
    3303     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3303    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    33043304    if (UNLIKELY(!castedThis))
    33053305        return throwThisTypeError(*state, "TestObj", "serializedValue");
     
    33183318{
    33193319    JSValue thisValue = state->thisValue();
    3320     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3320    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    33213321    if (UNLIKELY(!castedThis))
    33223322        return throwThisTypeError(*state, "TestObj", "optionsObject");
     
    33383338{
    33393339    JSValue thisValue = state->thisValue();
    3340     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3340    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    33413341    if (UNLIKELY(!castedThis))
    33423342        return throwThisTypeError(*state, "TestObj", "methodWithException");
     
    33523352{
    33533353    JSValue thisValue = state->thisValue();
    3354     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3354    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    33553355    if (UNLIKELY(!castedThis))
    33563356        return throwThisTypeError(*state, "TestObj", "methodWithExceptionWithMessage");
     
    33663366{
    33673367    JSValue thisValue = state->thisValue();
    3368     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3368    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    33693369    if (UNLIKELY(!castedThis))
    33703370        return throwThisTypeError(*state, "TestObj", "customMethod");
     
    33763376{
    33773377    JSValue thisValue = state->thisValue();
    3378     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3378    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    33793379    if (UNLIKELY(!castedThis))
    33803380        return throwThisTypeError(*state, "TestObj", "customMethodWithArgs");
     
    33863386{
    33873387    JSValue thisValue = state->thisValue();
    3388     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3388    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    33893389    if (UNLIKELY(!castedThis))
    33903390        return throwThisTypeError(*state, "TestObj", "privateMethod");
     
    34033403{
    34043404    JSValue thisValue = state->thisValue();
    3405     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3405    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    34063406    if (UNLIKELY(!castedThis))
    34073407        return throwThisTypeError(*state, "TestObj", "addEventListener");
     
    34183418{
    34193419    JSValue thisValue = state->thisValue();
    3420     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3420    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    34213421    if (UNLIKELY(!castedThis))
    34223422        return throwThisTypeError(*state, "TestObj", "removeEventListener");
     
    34333433{
    34343434    JSValue thisValue = state->thisValue();
    3435     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3435    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    34363436    if (UNLIKELY(!castedThis))
    34373437        return throwThisTypeError(*state, "TestObj", "withScriptStateVoid");
     
    34453445{
    34463446    JSValue thisValue = state->thisValue();
    3447     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3447    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    34483448    if (UNLIKELY(!castedThis))
    34493449        return throwThisTypeError(*state, "TestObj", "withScriptStateObj");
     
    34593459{
    34603460    JSValue thisValue = state->thisValue();
    3461     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3461    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    34623462    if (UNLIKELY(!castedThis))
    34633463        return throwThisTypeError(*state, "TestObj", "withScriptStateVoidException");
     
    34733473{
    34743474    JSValue thisValue = state->thisValue();
    3475     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3475    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    34763476    if (UNLIKELY(!castedThis))
    34773477        return throwThisTypeError(*state, "TestObj", "withScriptStateObjException");
     
    34903490{
    34913491    JSValue thisValue = state->thisValue();
    3492     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3492    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    34933493    if (UNLIKELY(!castedThis))
    34943494        return throwThisTypeError(*state, "TestObj", "withScriptExecutionContext");
     
    35053505{
    35063506    JSValue thisValue = state->thisValue();
    3507     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3507    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    35083508    if (UNLIKELY(!castedThis))
    35093509        return throwThisTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptState");
     
    35203520{
    35213521    JSValue thisValue = state->thisValue();
    3522     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3522    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    35233523    if (UNLIKELY(!castedThis))
    35243524        return throwThisTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateObjException");
     
    35403540{
    35413541    JSValue thisValue = state->thisValue();
    3542     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3542    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    35433543    if (UNLIKELY(!castedThis))
    35443544        return throwThisTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateWithSpaces");
     
    35573557{
    35583558    JSValue thisValue = state->thisValue();
    3559     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3559    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    35603560    if (UNLIKELY(!castedThis))
    35613561        return throwThisTypeError(*state, "TestObj", "withScriptArgumentsAndCallStack");
     
    35703570{
    35713571    JSValue thisValue = state->thisValue();
    3572     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3572    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    35733573    if (UNLIKELY(!castedThis))
    35743574        return throwThisTypeError(*state, "TestObj", "methodWithOptionalArg");
     
    35923592{
    35933593    JSValue thisValue = state->thisValue();
    3594     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3594    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    35953595    if (UNLIKELY(!castedThis))
    35963596        return throwThisTypeError(*state, "TestObj", "methodWithOptionalArgAndDefaultValue");
     
    36143614{
    36153615    JSValue thisValue = state->thisValue();
    3616     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3616    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    36173617    if (UNLIKELY(!castedThis))
    36183618        return throwThisTypeError(*state, "TestObj", "methodWithNonOptionalArgAndOptionalArg");
     
    36413641{
    36423642    JSValue thisValue = state->thisValue();
    3643     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3643    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    36443644    if (UNLIKELY(!castedThis))
    36453645        return throwThisTypeError(*state, "TestObj", "methodWithNonOptionalArgAndTwoOptionalArgs");
     
    36763676{
    36773677    JSValue thisValue = state->thisValue();
    3678     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3678    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    36793679    if (UNLIKELY(!castedThis))
    36803680        return throwThisTypeError(*state, "TestObj", "methodWithOptionalString");
     
    36983698{
    36993699    JSValue thisValue = state->thisValue();
    3700     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3700    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    37013701    if (UNLIKELY(!castedThis))
    37023702        return throwThisTypeError(*state, "TestObj", "methodWithOptionalStringAndDefaultValue");
     
    37203720{
    37213721    JSValue thisValue = state->thisValue();
    3722     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3722    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    37233723    if (UNLIKELY(!castedThis))
    37243724        return throwThisTypeError(*state, "TestObj", "methodWithOptionalStringIsUndefined");
     
    37353735{
    37363736    JSValue thisValue = state->thisValue();
    3737     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3737    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    37383738    if (UNLIKELY(!castedThis))
    37393739        return throwThisTypeError(*state, "TestObj", "methodWithOptionalStringIsNullString");
     
    37503750{
    37513751    JSValue thisValue = state->thisValue();
    3752     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3752    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    37533753    if (UNLIKELY(!castedThis))
    37543754        return throwThisTypeError(*state, "TestObj", "methodWithCallbackArg");
     
    37673767{
    37683768    JSValue thisValue = state->thisValue();
    3769     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3769    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    37703770    if (UNLIKELY(!castedThis))
    37713771        return throwThisTypeError(*state, "TestObj", "methodWithNonCallbackArgAndCallbackArg");
     
    37873787{
    37883788    JSValue thisValue = state->thisValue();
    3789     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3789    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    37903790    if (UNLIKELY(!castedThis))
    37913791        return throwThisTypeError(*state, "TestObj", "methodWithCallbackAndOptionalArg");
     
    38053805{
    38063806    JSValue thisValue = state->thisValue();
    3807     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3807    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    38083808    if (UNLIKELY(!castedThis))
    38093809        return throwThisTypeError(*state, "TestObj", "methodWithCallbackFunctionArg");
     
    38223822{
    38233823    JSValue thisValue = state->thisValue();
    3824     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3824    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    38253825    if (UNLIKELY(!castedThis))
    38263826        return throwThisTypeError(*state, "TestObj", "methodWithNonCallbackArgAndCallbackFunctionArg");
     
    38423842{
    38433843    JSValue thisValue = state->thisValue();
    3844     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3844    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    38453845    if (UNLIKELY(!castedThis))
    38463846        return throwThisTypeError(*state, "TestObj", "methodWithCallbackFunctionAndOptionalArg");
     
    38843884{
    38853885    JSValue thisValue = state->thisValue();
    3886     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3886    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    38873887    if (UNLIKELY(!castedThis))
    38883888        return throwThisTypeError(*state, "TestObj", "conditionalMethod1");
     
    38993899{
    39003900    JSValue thisValue = state->thisValue();
    3901     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3901    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    39023902    if (UNLIKELY(!castedThis))
    39033903        return throwThisTypeError(*state, "TestObj", "conditionalMethod2");
     
    39143914{
    39153915    JSValue thisValue = state->thisValue();
    3916     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3916    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    39173917    if (UNLIKELY(!castedThis))
    39183918        return throwThisTypeError(*state, "TestObj", "conditionalMethod3");
     
    39283928{
    39293929    JSValue thisValue = state->thisValue();
    3930     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3930    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    39313931    if (UNLIKELY(!castedThis))
    39323932        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    39483948{
    39493949    JSValue thisValue = state->thisValue();
    3950     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3950    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    39513951    if (UNLIKELY(!castedThis))
    39523952        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    39753975{
    39763976    JSValue thisValue = state->thisValue();
    3977     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3977    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    39783978    if (UNLIKELY(!castedThis))
    39793979        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    39923992{
    39933993    JSValue thisValue = state->thisValue();
    3994     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3994    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    39953995    if (UNLIKELY(!castedThis))
    39963996        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    40094009{
    40104010    JSValue thisValue = state->thisValue();
    4011     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4011    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    40124012    if (UNLIKELY(!castedThis))
    40134013        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    40264026{
    40274027    JSValue thisValue = state->thisValue();
    4028     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4028    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    40294029    if (UNLIKELY(!castedThis))
    40304030        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    40434043{
    40444044    JSValue thisValue = state->thisValue();
    4045     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4045    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    40464046    if (UNLIKELY(!castedThis))
    40474047        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    40604060{
    40614061    JSValue thisValue = state->thisValue();
    4062     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4062    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    40634063    if (UNLIKELY(!castedThis))
    40644064        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    40774077{
    40784078    JSValue thisValue = state->thisValue();
    4079     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4079    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    40804080    if (UNLIKELY(!castedThis))
    40814081        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    40944094{
    40954095    JSValue thisValue = state->thisValue();
    4096     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4096    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    40974097    if (UNLIKELY(!castedThis))
    40984098        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    41114111{
    41124112    JSValue thisValue = state->thisValue();
    4113     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4113    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    41144114    if (UNLIKELY(!castedThis))
    41154115        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    41284128{
    41294129    JSValue thisValue = state->thisValue();
    4130     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4130    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    41314131    if (UNLIKELY(!castedThis))
    41324132        return throwThisTypeError(*state, "TestObj", "overloadedMethod");
     
    41804180{
    41814181    JSValue thisValue = state->thisValue();
    4182     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4182    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    41834183    if (UNLIKELY(!castedThis))
    41844184        return throwThisTypeError(*state, "TestObj", "overloadedMethodWithOptionalParameter");
     
    42074207{
    42084208    JSValue thisValue = state->thisValue();
    4209     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4209    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    42104210    if (UNLIKELY(!castedThis))
    42114211        return throwThisTypeError(*state, "TestObj", "overloadedMethodWithOptionalParameter");
     
    43244324{
    43254325    JSValue thisValue = state->thisValue();
    4326     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4326    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    43274327    if (UNLIKELY(!castedThis))
    43284328        return throwThisTypeError(*state, "TestObj", "classMethodWithClamp");
     
    43544354{
    43554355    JSValue thisValue = state->thisValue();
    4356     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4356    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    43574357    if (UNLIKELY(!castedThis))
    43584358        return throwThisTypeError(*state, "TestObj", "methodWithUnsignedLongSequence");
     
    43714371{
    43724372    JSValue thisValue = state->thisValue();
    4373     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4373    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    43744374    if (UNLIKELY(!castedThis))
    43754375        return throwThisTypeError(*state, "TestObj", "stringArrayFunction");
     
    43914391{
    43924392    JSValue thisValue = state->thisValue();
    4393     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4393    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    43944394    if (UNLIKELY(!castedThis))
    43954395        return throwThisTypeError(*state, "TestObj", "domStringListFunction");
     
    44114411{
    44124412    JSValue thisValue = state->thisValue();
    4413     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4413    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    44144414    if (UNLIKELY(!castedThis))
    44154415        return throwThisTypeError(*state, "TestObj", "methodWithAndWithoutNullableSequence");
     
    44314431{
    44324432    JSValue thisValue = state->thisValue();
    4433     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4433    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    44344434    if (UNLIKELY(!castedThis))
    44354435        return throwThisTypeError(*state, "TestObj", "methodWithAndWithoutNullableSequence2");
     
    44514451{
    44524452    JSValue thisValue = state->thisValue();
    4453     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4453    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    44544454    if (UNLIKELY(!castedThis))
    44554455        return throwThisTypeError(*state, "TestObj", "getSVGDocument");
     
    44684468{
    44694469    JSValue thisValue = state->thisValue();
    4470     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4470    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    44714471    if (UNLIKELY(!castedThis))
    44724472        return throwThisTypeError(*state, "TestObj", "convert1");
     
    44854485{
    44864486    JSValue thisValue = state->thisValue();
    4487     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4487    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    44884488    if (UNLIKELY(!castedThis))
    44894489        return throwThisTypeError(*state, "TestObj", "convert2");
     
    45024502{
    45034503    JSValue thisValue = state->thisValue();
    4504     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4504    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    45054505    if (UNLIKELY(!castedThis))
    45064506        return throwThisTypeError(*state, "TestObj", "convert4");
     
    45194519{
    45204520    JSValue thisValue = state->thisValue();
    4521     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4521    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    45224522    if (UNLIKELY(!castedThis))
    45234523        return throwThisTypeError(*state, "TestObj", "convert5");
     
    45364536{
    45374537    JSValue thisValue = state->thisValue();
    4538     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4538    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    45394539    if (UNLIKELY(!castedThis))
    45404540        return throwThisTypeError(*state, "TestObj", "mutablePointFunction");
     
    45484548{
    45494549    JSValue thisValue = state->thisValue();
    4550     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4550    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    45514551    if (UNLIKELY(!castedThis))
    45524552        return throwThisTypeError(*state, "TestObj", "immutablePointFunction");
     
    45604560{
    45614561    JSValue thisValue = state->thisValue();
    4562     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4562    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    45634563    if (UNLIKELY(!castedThis))
    45644564        return throwThisTypeError(*state, "TestObj", "orange");
     
    45724572{
    45734573    JSValue thisValue = state->thisValue();
    4574     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4574    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    45754575    if (UNLIKELY(!castedThis))
    45764576        return throwThisTypeError(*state, "TestObj", "strictFunction");
     
    45984598{
    45994599    JSValue thisValue = state->thisValue();
    4600     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4600    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    46014601    if (UNLIKELY(!castedThis))
    46024602        return throwThisTypeError(*state, "TestObj", "strictFunctionWithSequence");
     
    46234623{
    46244624    JSValue thisValue = state->thisValue();
    4625     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4625    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    46264626    if (UNLIKELY(!castedThis))
    46274627        return throwThisTypeError(*state, "TestObj", "strictFunctionWithArray");
     
    46484648{
    46494649    JSValue thisValue = state->thisValue();
    4650     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4650    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    46514651    if (UNLIKELY(!castedThis))
    46524652        return throwThisTypeError(*state, "TestObj", "variadicStringMethod");
     
    46684668{
    46694669    JSValue thisValue = state->thisValue();
    4670     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4670    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    46714671    if (UNLIKELY(!castedThis))
    46724672        return throwThisTypeError(*state, "TestObj", "variadicDoubleMethod");
     
    46884688{
    46894689    JSValue thisValue = state->thisValue();
    4690     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4690    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    46914691    if (UNLIKELY(!castedThis))
    46924692        return throwThisTypeError(*state, "TestObj", "variadicNodeMethod");
     
    47114711{
    47124712    JSValue thisValue = state->thisValue();
    4713     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4713    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    47144714    if (UNLIKELY(!castedThis))
    47154715        return throwThisTypeError(*state, "TestObj", "any");
     
    47374737{
    47384738    JSValue thisValue = state->thisValue();
    4739     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4739    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    47404740    if (UNLIKELY(!castedThis))
    47414741        return throwThisTypeError(*state, "TestObj", "testPromiseFunction");
     
    47554755{
    47564756    JSValue thisValue = state->thisValue();
    4757     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4757    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    47584758    if (UNLIKELY(!castedThis))
    47594759        return throwThisTypeError(*state, "TestObj", "testPromiseFunctionWithFloatArgument");
     
    47824782{
    47834783    JSValue thisValue = state->thisValue();
    4784     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4784    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    47854785    if (UNLIKELY(!castedThis))
    47864786        return throwThisTypeError(*state, "TestObj", "testPromiseFunctionWithException");
     
    48024802{
    48034803    JSValue thisValue = state->thisValue();
    4804     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     4804    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    48054805    if (UNLIKELY(!castedThis))
    48064806        return throwThisTypeError(*state, "TestObj", "testPromiseFunctionWithOptionalIntArgument");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp

    r196396 r196563  
    196196{
    197197    JSValue thisValue = state->thisValue();
    198     JSTestOverrideBuiltins* castedThis = jsDynamicCast<JSTestOverrideBuiltins*>(thisValue);
     198    auto castedThis = jsDynamicCast<JSTestOverrideBuiltins*>(thisValue);
    199199    if (UNLIKELY(!castedThis))
    200200        return throwThisTypeError(*state, "TestOverrideBuiltins", "namedItem");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp

    r196396 r196563  
    459459{
    460460    JSValue thisValue = state->thisValue();
    461     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
     461    auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    462462    if (UNLIKELY(!castedThis))
    463463        return throwThisTypeError(*state, "TestTypedefs", "func");
     
    481481{
    482482    JSValue thisValue = state->thisValue();
    483     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
     483    auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    484484    if (UNLIKELY(!castedThis))
    485485        return throwThisTypeError(*state, "TestTypedefs", "setShadow");
     
    522522{
    523523    JSValue thisValue = state->thisValue();
    524     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
     524    auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    525525    if (UNLIKELY(!castedThis))
    526526        return throwThisTypeError(*state, "TestTypedefs", "methodWithSequenceArg");
     
    539539{
    540540    JSValue thisValue = state->thisValue();
    541     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
     541    auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    542542    if (UNLIKELY(!castedThis))
    543543        return throwThisTypeError(*state, "TestTypedefs", "nullableArrayArg");
     
    556556{
    557557    JSValue thisValue = state->thisValue();
    558     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
     558    auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    559559    if (UNLIKELY(!castedThis))
    560560        return throwThisTypeError(*state, "TestTypedefs", "funcWithClamp");
     
    593593{
    594594    JSValue thisValue = state->thisValue();
    595     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
     595    auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    596596    if (UNLIKELY(!castedThis))
    597597        return throwThisTypeError(*state, "TestTypedefs", "immutablePointFunction");
     
    605605{
    606606    JSValue thisValue = state->thisValue();
    607     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
     607    auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    608608    if (UNLIKELY(!castedThis))
    609609        return throwThisTypeError(*state, "TestTypedefs", "stringArrayFunction");
     
    625625{
    626626    JSValue thisValue = state->thisValue();
    627     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
     627    auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    628628    if (UNLIKELY(!castedThis))
    629629        return throwThisTypeError(*state, "TestTypedefs", "stringArrayFunction2");
     
    645645{
    646646    JSValue thisValue = state->thisValue();
    647     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
     647    auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    648648    if (UNLIKELY(!castedThis))
    649649        return throwThisTypeError(*state, "TestTypedefs", "callWithSequenceThatRequiresInclude");
     
    662662{
    663663    JSValue thisValue = state->thisValue();
    664     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
     664    auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    665665    if (UNLIKELY(!castedThis))
    666666        return throwThisTypeError(*state, "TestTypedefs", "methodWithException");
  • trunk/Source/WebCore/dom/EventTarget.idl

    r196520 r196563  
    2626    JSCustomToNativeObject,
    2727    EventTarget,
     28    JSCustomHeader,
    2829] interface EventTarget {
    2930    [ObjCLegacyUnnamedParameters] void addEventListener(DOMString type, EventListener listener, optional boolean useCapture);
  • trunk/Source/WebCore/dom/ScriptExecutionContext.cpp

    r194496 r196563  
    391391
    392392#if PLATFORM(IOS)
    393     if (target == target->toDOMWindow() && is<Document>(*this)) {
     393    if (target->toDOMWindow() && is<Document>(*this)) {
    394394        Settings* settings = downcast<Document>(*this).settings();
    395395        if (settings && !settings->shouldDispatchJavaScriptWindowOnErrorEvents())
  • trunk/Source/WebCore/page/DOMWindow.idl

    r196520 r196563  
    3737    CustomPutFunction,
    3838    EventTarget,
    39     JSGenerateToNativeObject,
    4039    JSLegacyParent=JSDOMWindowBase,
    4140    InterfaceName=Window,
    42 ] interface DOMWindow {
     41] interface DOMWindow : EventTarget {
    4342    // DOM Level 0
    4443    [Replaceable] readonly attribute Screen screen;
     
    187186    [Replaceable] readonly attribute DOMWindowCSS CSS;
    188187
    189     // EventTarget interface
    190     [Custom] void addEventListener(DOMString type, EventListener listener, optional boolean useCapture);
    191     [Custom] void removeEventListener(DOMString type, EventListener listener, optional boolean useCapture);
    192     [ImplementedAs=dispatchEventForBindings, RaisesException] boolean dispatchEvent(Event event);
    193 
    194188    void captureEvents(/*in long eventFlags*/);
    195189    void releaseEvents(/*in long eventFlags*/);
  • trunk/Source/WebCore/workers/WorkerGlobalScope.idl

    r196520 r196563  
    3232    EventTarget,
    3333    JSLegacyParent=JSWorkerGlobalScopeBase,
    34 ] interface WorkerGlobalScope {
     34] interface WorkerGlobalScope : EventTarget {
    3535
    3636#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
     
    4949    [Replaceable] readonly attribute WorkerNavigator navigator;
    5050
    51     // EventTarget interface
    52 
    53     void addEventListener(DOMString type, EventListener listener, optional boolean useCapture);
    54     void removeEventListener(DOMString type, EventListener listener, optional boolean useCapture);
    55     [ImplementedAs=dispatchEventForBindings, RaisesException] boolean dispatchEvent(Event event);
    56 
    5751    // Additional constructors
    5852
Note: See TracChangeset for help on using the changeset viewer.