Changeset 196563 in webkit
- Timestamp:
- Feb 14, 2016 6:17:33 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r196546 r196563 1 2016-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 1 23 2016-02-12 Nan Wang <n_wang@apple.com> 2 24 -
trunk/LayoutTests/fast/loader/window-clearing-expected.txt
r13865 r196563 8 8 9 9 PASS: element 2 in the window's prototype chain was cleared 10 11 PASS: element 3 in the window's prototype chain was cleared -
trunk/LayoutTests/http/tests/security/cross-frame-access-call-expected.txt
r196227 r196563 1 CONSOLE 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. 1 2 CONSOLE 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. 2 3 CONSOLE 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. … … 46 47 PASS: window.addEventListener.call(targetWindow, 'load', null, false); should be 'undefined' and is. 47 48 PASS: window.removeEventListener.call(targetWindow, 'load', null, false); should be 'undefined' and is. 49 PASS: window.dispatchEvent.call(targetWindow, new Event('click')); should be 'undefined' and is. 48 50 PASS: window.clearTimeout.call(targetWindow, 0); should be 'undefined' and is. 49 51 PASS: window.clearInterval.call(targetWindow, 0); should be 'undefined' and is. -
trunk/LayoutTests/http/tests/security/cross-frame-access-call.html
r196227 r196563 43 43 shouldBe("window.addEventListener.call(targetWindow, 'load', null, false);", "undefined"); 44 44 shouldBe("window.removeEventListener.call(targetWindow, 'load', null, false);", "undefined"); 45 shouldBe("window.dispatchEvent.call(targetWindow, new Event('click'));", "undefined"); 45 46 shouldBe("window.clearTimeout.call(targetWindow, 0);", "undefined"); 46 47 shouldBe("window.clearInterval.call(targetWindow, 0);", "undefined"); -
trunk/LayoutTests/imported/w3c/ChangeLog
r196520 r196563 1 2016-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 1 13 2016-02-12 Jiewen Tan <jiewen_tan@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
r196520 r196563 3800 3800 FAIL 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 3801 3801 FAIL 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 }" 3802 PASS Window interface: existence and properties of interface object 3807 3803 PASS Window interface object length 3808 3804 PASS 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]"3805 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 EventTargetPrototype]" 3810 3806 FAIL 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 3811 3807 PASS Window interface: attribute self -
trunk/Source/WebCore/ChangeLog
r196561 r196563 1 2016-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 1 96 2016-02-14 Darin Adler <darin@apple.com> 2 97 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r196560 r196563 1710 1710 467302021C4EFE7800BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h in Headers */ = {isa = PBXBuildFile; fileRef = 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */; }; 1711 1711 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, ); }; }; 1712 1713 46C83EFD1A9BBE2900A79A41 /* GeoNotifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */; }; 1713 1714 46C83EFE1A9BBE2900A79A41 /* GeoNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 9193 9194 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IgnoreOpensDuringUnloadCountIncrementer.h; sourceTree = "<group>"; }; 9194 9195 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>"; }; 9195 9197 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeoNotifier.cpp; sourceTree = "<group>"; }; 9196 9198 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeoNotifier.h; sourceTree = "<group>"; }; … … 22198 22200 F3D461471161D53200CA0D09 /* JSErrorHandler.h */, 22199 22201 BC60901E0E91B8EC000C68B5 /* JSEventTargetCustom.cpp */, 22202 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */, 22200 22203 3314ACE910892086000F0E56 /* JSExceptionBase.cpp */, 22201 22204 3314ACEA10892086000F0E56 /* JSExceptionBase.h */, … … 24988 24991 2EB4BCD3121F03E300EC4885 /* BlobResourceHandle.h in Headers */, 24989 24992 976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */, 24993 46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */, 24990 24994 93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */, 24991 24995 BC5EB5E10E81BE8700B25965 /* BorderData.h in Headers */, -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r196494 r196563 752 752 } 753 753 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 782 754 DOMWindow* JSDOMWindow::toWrapped(JSValue value) 783 755 { -
trunk/Source/WebCore/bindings/js/JSDOMWindowShell.cpp
r191887 r196563 33 33 #include "GCController.h" 34 34 #include "JSDOMWindow.h" 35 #include " DOMWindow.h"35 #include "JSEventTarget.h" 36 36 #include "ScriptController.h" 37 37 #include <heap/StrongInlines.h> … … 86 86 JSDOMWindow* jsDOMWindow = JSDOMWindow::create(vm, structure, *domWindow, this); 87 87 prototype->structure()->setGlobalObject(vm, jsDOMWindow); 88 prototype->structure()->setPrototypeWithoutTransition(vm, JSEventTarget::getPrototype(vm, jsDOMWindow)); 88 89 setWindow(vm, jsDOMWindow); 89 90 ASSERT(jsDOMWindow->globalObject() == jsDOMWindow); -
trunk/Source/WebCore/bindings/js/JSDOMWindowShell.h
r191887 r196563 30 30 #define JSDOMWindowShell_h 31 31 32 #include "DOMWindow.h" 32 33 #include "JSDOMWindow.h" 33 34 #include <runtime/JSProxy.h> … … 35 36 namespace WebCore { 36 37 37 class DOMWindow;38 38 class Frame; 39 39 -
trunk/Source/WebCore/bindings/js/JSDictionary.cpp
r195954 r196563 28 28 29 29 #include "ArrayValue.h" 30 #include "DOMWindow.h" 30 31 #include "Dictionary.h" 31 32 #include "JSCSSFontFaceRule.h" -
trunk/Source/WebCore/bindings/js/JSEventTargetCustom.cpp
r191887 r196563 1 1 /* 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.2 * Copyright (C) 2008, 2016 Apple Inc. All Rights Reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 #include "JSEventTarget.h" 28 28 29 #include "DOMWindow.h" 30 #include "EventTarget.h" 29 31 #include "EventTargetHeaders.h" 30 32 #include "EventTargetInterfaces.h" 33 #include "JSDOMWindow.h" 31 34 #include "JSDOMWindowShell.h" 32 35 #include "JSEventListener.h" 36 #include "JSWorkerGlobalScope.h" 37 #include "WorkerGlobalScope.h" 33 38 34 39 using namespace JSC; … … 62 67 { 63 68 TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindowShell) 69 TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindow) 70 TRY_TO_UNWRAP_WITH_INTERFACE(WorkerGlobalScope) 64 71 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; 68 73 } 69 74 70 75 #undef TRY_TO_UNWRAP_WITH_INTERFACE 71 76 77 std::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 72 88 } // namespace WebCore -
trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp
r193649 r196563 31 31 #include "JSDOMBinding.h" 32 32 #include "JSDedicatedWorkerGlobalScope.h" 33 #include "JSEventTarget.h" 33 34 #include "ScriptSourceCode.h" 34 35 #include "WebCoreJSClientData.h" … … 90 91 ASSERT(m_workerGlobalScopeWrapper->structure()->globalObject() == m_workerGlobalScopeWrapper); 91 92 workerGlobalScopePrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get()); 93 workerGlobalScopePrototype->structure()->setPrototypeWithoutTransition(*m_vm, JSEventTarget::getPrototype(*m_vm, m_workerGlobalScopeWrapper.get())); 92 94 dedicatedContextPrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get()); 93 95 } -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r196476 r196563 559 559 return 0 if not NeedsImplementationClass($interface); 560 560 return 0 if $interface->name eq "AbstractView"; 561 return 0 if $interface->extendedAttributes->{"CustomProxyToJSObject"}; 561 562 return 1 if (!$hasParent or $interface->extendedAttributes->{"JSGenerateToJSObject"} or $interface->extendedAttributes->{"CustomToJSObject"}); 562 563 return 1 if $interface->parent && $interface->parent eq "EventTarget"; … … 1731 1732 { 1732 1733 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*>"; 1744 1741 } 1745 1742 … … 2945 2942 } 2946 2943 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 } 2947 2952 # For compatibility with legacy content, the EventListener calls are generated without GenerateArgumentsCountCheck. 2948 2953 if ($function->signature->name eq "addEventListener") { … … 3229 3234 push(@implContent, " if (UNLIKELY(!castedThis))\n"); 3230 3235 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");3235 3236 } else { 3236 3237 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"); 3238 3239 my $domFunctionName = $function->signature->name; 3239 3240 push(@implContent, " if (UNLIKELY(!castedThis))\n"); … … 3241 3242 } 3242 3243 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"; 3244 3245 } 3245 3246 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
r196396 r196563 201 201 { 202 202 JSValue thisValue = state->thisValue(); 203 JSTestActiveDOMObject*castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);203 auto castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue); 204 204 if (UNLIKELY(!castedThis)) 205 205 return throwThisTypeError(*state, "TestActiveDOMObject", "excitingFunction"); … … 220 220 { 221 221 JSValue thisValue = state->thisValue(); 222 JSTestActiveDOMObject*castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);222 auto castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue); 223 223 if (UNLIKELY(!castedThis)) 224 224 return throwThisTypeError(*state, "TestActiveDOMObject", "postMessage"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
r196396 r196563 187 187 { 188 188 JSValue thisValue = state->thisValue(); 189 JSTestCustomNamedGetter*castedThis = jsDynamicCast<JSTestCustomNamedGetter*>(thisValue);189 auto castedThis = jsDynamicCast<JSTestCustomNamedGetter*>(thisValue); 190 190 if (UNLIKELY(!castedThis)) 191 191 return throwThisTypeError(*state, "TestCustomNamedGetter", "anotherFunction"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
r196466 r196563 199 199 { 200 200 JSValue thisValue = state->thisValue(); 201 JSTestEventTarget*castedThis = jsDynamicCast<JSTestEventTarget*>(thisValue);201 auto castedThis = jsDynamicCast<JSTestEventTarget*>(thisValue); 202 202 if (UNLIKELY(!castedThis)) 203 203 return throwThisTypeError(*state, "TestEventTarget", "item"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r196396 r196563 766 766 { 767 767 JSValue thisValue = state->thisValue(); 768 JSTestInterface*castedThis = jsDynamicCast<JSTestInterface*>(thisValue);768 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); 769 769 if (UNLIKELY(!castedThis)) 770 770 return throwThisTypeError(*state, "TestInterface", "implementsMethod1"); … … 781 781 { 782 782 JSValue thisValue = state->thisValue(); 783 JSTestInterface*castedThis = jsDynamicCast<JSTestInterface*>(thisValue);783 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); 784 784 if (UNLIKELY(!castedThis)) 785 785 return throwThisTypeError(*state, "TestInterface", "implementsMethod2"); … … 810 810 { 811 811 JSValue thisValue = state->thisValue(); 812 JSTestInterface*castedThis = jsDynamicCast<JSTestInterface*>(thisValue);812 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); 813 813 if (UNLIKELY(!castedThis)) 814 814 return throwThisTypeError(*state, "TestInterface", "implementsMethod3"); … … 832 832 { 833 833 JSValue thisValue = state->thisValue(); 834 JSTestInterface*castedThis = jsDynamicCast<JSTestInterface*>(thisValue);834 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); 835 835 if (UNLIKELY(!castedThis)) 836 836 return throwThisTypeError(*state, "TestInterface", "supplementalMethod1"); … … 847 847 { 848 848 JSValue thisValue = state->thisValue(); 849 JSTestInterface*castedThis = jsDynamicCast<JSTestInterface*>(thisValue);849 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); 850 850 if (UNLIKELY(!castedThis)) 851 851 return throwThisTypeError(*state, "TestInterface", "supplementalMethod2"); … … 876 876 { 877 877 JSValue thisValue = state->thisValue(); 878 JSTestInterface*castedThis = jsDynamicCast<JSTestInterface*>(thisValue);878 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); 879 879 if (UNLIKELY(!castedThis)) 880 880 return throwThisTypeError(*state, "TestInterface", "supplementalMethod3"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp
r196396 r196563 200 200 { 201 201 JSValue thisValue = state->thisValue(); 202 JSTestJSBuiltinConstructor*castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(thisValue);202 auto castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(thisValue); 203 203 if (UNLIKELY(!castedThis)) 204 204 return throwThisTypeError(*state, "TestJSBuiltinConstructor", "testCustomFunction"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
r196396 r196563 152 152 { 153 153 JSValue thisValue = state->thisValue(); 154 JSTestMediaQueryListListener*castedThis = jsDynamicCast<JSTestMediaQueryListListener*>(thisValue);154 auto castedThis = jsDynamicCast<JSTestMediaQueryListListener*>(thisValue); 155 155 if (UNLIKELY(!castedThis)) 156 156 return throwThisTypeError(*state, "TestMediaQueryListListener", "method"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
r196396 r196563 422 422 { 423 423 JSValue thisValue = state->thisValue(); 424 JSTestNondeterministic*castedThis = jsDynamicCast<JSTestNondeterministic*>(thisValue);424 auto castedThis = jsDynamicCast<JSTestNondeterministic*>(thisValue); 425 425 if (UNLIKELY(!castedThis)) 426 426 return throwThisTypeError(*state, "TestNondeterministic", "nondeterministicZeroArgFunction"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r196396 r196563 3019 3019 { 3020 3020 JSValue thisValue = state->thisValue(); 3021 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3021 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3022 3022 if (UNLIKELY(!castedThis)) 3023 3023 return throwThisTypeError(*state, "TestObj", "voidMethod"); … … 3031 3031 { 3032 3032 JSValue thisValue = state->thisValue(); 3033 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3033 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3034 3034 if (UNLIKELY(!castedThis)) 3035 3035 return throwThisTypeError(*state, "TestObj", "voidMethodWithArgs"); … … 3054 3054 { 3055 3055 JSValue thisValue = state->thisValue(); 3056 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3056 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3057 3057 if (UNLIKELY(!castedThis)) 3058 3058 return throwThisTypeError(*state, "TestObj", "byteMethod"); … … 3066 3066 { 3067 3067 JSValue thisValue = state->thisValue(); 3068 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3068 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3069 3069 if (UNLIKELY(!castedThis)) 3070 3070 return throwThisTypeError(*state, "TestObj", "byteMethodWithArgs"); … … 3089 3089 { 3090 3090 JSValue thisValue = state->thisValue(); 3091 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3091 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3092 3092 if (UNLIKELY(!castedThis)) 3093 3093 return throwThisTypeError(*state, "TestObj", "octetMethod"); … … 3101 3101 { 3102 3102 JSValue thisValue = state->thisValue(); 3103 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3103 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3104 3104 if (UNLIKELY(!castedThis)) 3105 3105 return throwThisTypeError(*state, "TestObj", "octetMethodWithArgs"); … … 3124 3124 { 3125 3125 JSValue thisValue = state->thisValue(); 3126 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3126 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3127 3127 if (UNLIKELY(!castedThis)) 3128 3128 return throwThisTypeError(*state, "TestObj", "longMethod"); … … 3136 3136 { 3137 3137 JSValue thisValue = state->thisValue(); 3138 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3138 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3139 3139 if (UNLIKELY(!castedThis)) 3140 3140 return throwThisTypeError(*state, "TestObj", "longMethodWithArgs"); … … 3159 3159 { 3160 3160 JSValue thisValue = state->thisValue(); 3161 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3161 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3162 3162 if (UNLIKELY(!castedThis)) 3163 3163 return throwThisTypeError(*state, "TestObj", "objMethod"); … … 3171 3171 { 3172 3172 JSValue thisValue = state->thisValue(); 3173 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3173 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3174 3174 if (UNLIKELY(!castedThis)) 3175 3175 return throwThisTypeError(*state, "TestObj", "objMethodWithArgs"); … … 3194 3194 { 3195 3195 JSValue thisValue = state->thisValue(); 3196 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3196 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3197 3197 if (UNLIKELY(!castedThis)) 3198 3198 return throwThisTypeError(*state, "TestObj", "methodWithSequenceArg"); … … 3211 3211 { 3212 3212 JSValue thisValue = state->thisValue(); 3213 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3213 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3214 3214 if (UNLIKELY(!castedThis)) 3215 3215 return throwThisTypeError(*state, "TestObj", "methodReturningSequence"); … … 3228 3228 { 3229 3229 JSValue thisValue = state->thisValue(); 3230 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3230 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3231 3231 if (UNLIKELY(!castedThis)) 3232 3232 return throwThisTypeError(*state, "TestObj", "methodWithEnumArg"); … … 3249 3249 { 3250 3250 JSValue thisValue = state->thisValue(); 3251 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3251 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3252 3252 if (UNLIKELY(!castedThis)) 3253 3253 return throwThisTypeError(*state, "TestObj", "methodWithOptionalEnumArgAndDefaultValue"); … … 3278 3278 { 3279 3279 JSValue thisValue = state->thisValue(); 3280 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3280 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3281 3281 if (UNLIKELY(!castedThis)) 3282 3282 return throwThisTypeError(*state, "TestObj", "methodThatRequiresAllArgsAndThrows"); … … 3301 3301 { 3302 3302 JSValue thisValue = state->thisValue(); 3303 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3303 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3304 3304 if (UNLIKELY(!castedThis)) 3305 3305 return throwThisTypeError(*state, "TestObj", "serializedValue"); … … 3318 3318 { 3319 3319 JSValue thisValue = state->thisValue(); 3320 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3320 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3321 3321 if (UNLIKELY(!castedThis)) 3322 3322 return throwThisTypeError(*state, "TestObj", "optionsObject"); … … 3338 3338 { 3339 3339 JSValue thisValue = state->thisValue(); 3340 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3340 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3341 3341 if (UNLIKELY(!castedThis)) 3342 3342 return throwThisTypeError(*state, "TestObj", "methodWithException"); … … 3352 3352 { 3353 3353 JSValue thisValue = state->thisValue(); 3354 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3354 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3355 3355 if (UNLIKELY(!castedThis)) 3356 3356 return throwThisTypeError(*state, "TestObj", "methodWithExceptionWithMessage"); … … 3366 3366 { 3367 3367 JSValue thisValue = state->thisValue(); 3368 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3368 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3369 3369 if (UNLIKELY(!castedThis)) 3370 3370 return throwThisTypeError(*state, "TestObj", "customMethod"); … … 3376 3376 { 3377 3377 JSValue thisValue = state->thisValue(); 3378 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3378 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3379 3379 if (UNLIKELY(!castedThis)) 3380 3380 return throwThisTypeError(*state, "TestObj", "customMethodWithArgs"); … … 3386 3386 { 3387 3387 JSValue thisValue = state->thisValue(); 3388 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3388 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3389 3389 if (UNLIKELY(!castedThis)) 3390 3390 return throwThisTypeError(*state, "TestObj", "privateMethod"); … … 3403 3403 { 3404 3404 JSValue thisValue = state->thisValue(); 3405 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3405 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3406 3406 if (UNLIKELY(!castedThis)) 3407 3407 return throwThisTypeError(*state, "TestObj", "addEventListener"); … … 3418 3418 { 3419 3419 JSValue thisValue = state->thisValue(); 3420 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3420 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3421 3421 if (UNLIKELY(!castedThis)) 3422 3422 return throwThisTypeError(*state, "TestObj", "removeEventListener"); … … 3433 3433 { 3434 3434 JSValue thisValue = state->thisValue(); 3435 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3435 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3436 3436 if (UNLIKELY(!castedThis)) 3437 3437 return throwThisTypeError(*state, "TestObj", "withScriptStateVoid"); … … 3445 3445 { 3446 3446 JSValue thisValue = state->thisValue(); 3447 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3447 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3448 3448 if (UNLIKELY(!castedThis)) 3449 3449 return throwThisTypeError(*state, "TestObj", "withScriptStateObj"); … … 3459 3459 { 3460 3460 JSValue thisValue = state->thisValue(); 3461 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3461 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3462 3462 if (UNLIKELY(!castedThis)) 3463 3463 return throwThisTypeError(*state, "TestObj", "withScriptStateVoidException"); … … 3473 3473 { 3474 3474 JSValue thisValue = state->thisValue(); 3475 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3475 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3476 3476 if (UNLIKELY(!castedThis)) 3477 3477 return throwThisTypeError(*state, "TestObj", "withScriptStateObjException"); … … 3490 3490 { 3491 3491 JSValue thisValue = state->thisValue(); 3492 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3492 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3493 3493 if (UNLIKELY(!castedThis)) 3494 3494 return throwThisTypeError(*state, "TestObj", "withScriptExecutionContext"); … … 3505 3505 { 3506 3506 JSValue thisValue = state->thisValue(); 3507 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3507 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3508 3508 if (UNLIKELY(!castedThis)) 3509 3509 return throwThisTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptState"); … … 3520 3520 { 3521 3521 JSValue thisValue = state->thisValue(); 3522 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3522 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3523 3523 if (UNLIKELY(!castedThis)) 3524 3524 return throwThisTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateObjException"); … … 3540 3540 { 3541 3541 JSValue thisValue = state->thisValue(); 3542 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3542 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3543 3543 if (UNLIKELY(!castedThis)) 3544 3544 return throwThisTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateWithSpaces"); … … 3557 3557 { 3558 3558 JSValue thisValue = state->thisValue(); 3559 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3559 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3560 3560 if (UNLIKELY(!castedThis)) 3561 3561 return throwThisTypeError(*state, "TestObj", "withScriptArgumentsAndCallStack"); … … 3570 3570 { 3571 3571 JSValue thisValue = state->thisValue(); 3572 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3572 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3573 3573 if (UNLIKELY(!castedThis)) 3574 3574 return throwThisTypeError(*state, "TestObj", "methodWithOptionalArg"); … … 3592 3592 { 3593 3593 JSValue thisValue = state->thisValue(); 3594 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3594 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3595 3595 if (UNLIKELY(!castedThis)) 3596 3596 return throwThisTypeError(*state, "TestObj", "methodWithOptionalArgAndDefaultValue"); … … 3614 3614 { 3615 3615 JSValue thisValue = state->thisValue(); 3616 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3616 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3617 3617 if (UNLIKELY(!castedThis)) 3618 3618 return throwThisTypeError(*state, "TestObj", "methodWithNonOptionalArgAndOptionalArg"); … … 3641 3641 { 3642 3642 JSValue thisValue = state->thisValue(); 3643 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3643 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3644 3644 if (UNLIKELY(!castedThis)) 3645 3645 return throwThisTypeError(*state, "TestObj", "methodWithNonOptionalArgAndTwoOptionalArgs"); … … 3676 3676 { 3677 3677 JSValue thisValue = state->thisValue(); 3678 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3678 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3679 3679 if (UNLIKELY(!castedThis)) 3680 3680 return throwThisTypeError(*state, "TestObj", "methodWithOptionalString"); … … 3698 3698 { 3699 3699 JSValue thisValue = state->thisValue(); 3700 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3700 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3701 3701 if (UNLIKELY(!castedThis)) 3702 3702 return throwThisTypeError(*state, "TestObj", "methodWithOptionalStringAndDefaultValue"); … … 3720 3720 { 3721 3721 JSValue thisValue = state->thisValue(); 3722 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3722 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3723 3723 if (UNLIKELY(!castedThis)) 3724 3724 return throwThisTypeError(*state, "TestObj", "methodWithOptionalStringIsUndefined"); … … 3735 3735 { 3736 3736 JSValue thisValue = state->thisValue(); 3737 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3737 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3738 3738 if (UNLIKELY(!castedThis)) 3739 3739 return throwThisTypeError(*state, "TestObj", "methodWithOptionalStringIsNullString"); … … 3750 3750 { 3751 3751 JSValue thisValue = state->thisValue(); 3752 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3752 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3753 3753 if (UNLIKELY(!castedThis)) 3754 3754 return throwThisTypeError(*state, "TestObj", "methodWithCallbackArg"); … … 3767 3767 { 3768 3768 JSValue thisValue = state->thisValue(); 3769 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3769 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3770 3770 if (UNLIKELY(!castedThis)) 3771 3771 return throwThisTypeError(*state, "TestObj", "methodWithNonCallbackArgAndCallbackArg"); … … 3787 3787 { 3788 3788 JSValue thisValue = state->thisValue(); 3789 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3789 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3790 3790 if (UNLIKELY(!castedThis)) 3791 3791 return throwThisTypeError(*state, "TestObj", "methodWithCallbackAndOptionalArg"); … … 3805 3805 { 3806 3806 JSValue thisValue = state->thisValue(); 3807 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3807 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3808 3808 if (UNLIKELY(!castedThis)) 3809 3809 return throwThisTypeError(*state, "TestObj", "methodWithCallbackFunctionArg"); … … 3822 3822 { 3823 3823 JSValue thisValue = state->thisValue(); 3824 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3824 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3825 3825 if (UNLIKELY(!castedThis)) 3826 3826 return throwThisTypeError(*state, "TestObj", "methodWithNonCallbackArgAndCallbackFunctionArg"); … … 3842 3842 { 3843 3843 JSValue thisValue = state->thisValue(); 3844 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3844 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3845 3845 if (UNLIKELY(!castedThis)) 3846 3846 return throwThisTypeError(*state, "TestObj", "methodWithCallbackFunctionAndOptionalArg"); … … 3884 3884 { 3885 3885 JSValue thisValue = state->thisValue(); 3886 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3886 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3887 3887 if (UNLIKELY(!castedThis)) 3888 3888 return throwThisTypeError(*state, "TestObj", "conditionalMethod1"); … … 3899 3899 { 3900 3900 JSValue thisValue = state->thisValue(); 3901 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3901 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3902 3902 if (UNLIKELY(!castedThis)) 3903 3903 return throwThisTypeError(*state, "TestObj", "conditionalMethod2"); … … 3914 3914 { 3915 3915 JSValue thisValue = state->thisValue(); 3916 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3916 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3917 3917 if (UNLIKELY(!castedThis)) 3918 3918 return throwThisTypeError(*state, "TestObj", "conditionalMethod3"); … … 3928 3928 { 3929 3929 JSValue thisValue = state->thisValue(); 3930 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3930 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3931 3931 if (UNLIKELY(!castedThis)) 3932 3932 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 3948 3948 { 3949 3949 JSValue thisValue = state->thisValue(); 3950 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3950 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3951 3951 if (UNLIKELY(!castedThis)) 3952 3952 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 3975 3975 { 3976 3976 JSValue thisValue = state->thisValue(); 3977 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3977 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3978 3978 if (UNLIKELY(!castedThis)) 3979 3979 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 3992 3992 { 3993 3993 JSValue thisValue = state->thisValue(); 3994 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);3994 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 3995 3995 if (UNLIKELY(!castedThis)) 3996 3996 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 4009 4009 { 4010 4010 JSValue thisValue = state->thisValue(); 4011 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4011 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4012 4012 if (UNLIKELY(!castedThis)) 4013 4013 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 4026 4026 { 4027 4027 JSValue thisValue = state->thisValue(); 4028 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4028 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4029 4029 if (UNLIKELY(!castedThis)) 4030 4030 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 4043 4043 { 4044 4044 JSValue thisValue = state->thisValue(); 4045 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4045 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4046 4046 if (UNLIKELY(!castedThis)) 4047 4047 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 4060 4060 { 4061 4061 JSValue thisValue = state->thisValue(); 4062 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4062 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4063 4063 if (UNLIKELY(!castedThis)) 4064 4064 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 4077 4077 { 4078 4078 JSValue thisValue = state->thisValue(); 4079 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4079 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4080 4080 if (UNLIKELY(!castedThis)) 4081 4081 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 4094 4094 { 4095 4095 JSValue thisValue = state->thisValue(); 4096 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4096 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4097 4097 if (UNLIKELY(!castedThis)) 4098 4098 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 4111 4111 { 4112 4112 JSValue thisValue = state->thisValue(); 4113 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4113 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4114 4114 if (UNLIKELY(!castedThis)) 4115 4115 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 4128 4128 { 4129 4129 JSValue thisValue = state->thisValue(); 4130 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4130 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4131 4131 if (UNLIKELY(!castedThis)) 4132 4132 return throwThisTypeError(*state, "TestObj", "overloadedMethod"); … … 4180 4180 { 4181 4181 JSValue thisValue = state->thisValue(); 4182 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4182 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4183 4183 if (UNLIKELY(!castedThis)) 4184 4184 return throwThisTypeError(*state, "TestObj", "overloadedMethodWithOptionalParameter"); … … 4207 4207 { 4208 4208 JSValue thisValue = state->thisValue(); 4209 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4209 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4210 4210 if (UNLIKELY(!castedThis)) 4211 4211 return throwThisTypeError(*state, "TestObj", "overloadedMethodWithOptionalParameter"); … … 4324 4324 { 4325 4325 JSValue thisValue = state->thisValue(); 4326 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4326 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4327 4327 if (UNLIKELY(!castedThis)) 4328 4328 return throwThisTypeError(*state, "TestObj", "classMethodWithClamp"); … … 4354 4354 { 4355 4355 JSValue thisValue = state->thisValue(); 4356 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4356 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4357 4357 if (UNLIKELY(!castedThis)) 4358 4358 return throwThisTypeError(*state, "TestObj", "methodWithUnsignedLongSequence"); … … 4371 4371 { 4372 4372 JSValue thisValue = state->thisValue(); 4373 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4373 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4374 4374 if (UNLIKELY(!castedThis)) 4375 4375 return throwThisTypeError(*state, "TestObj", "stringArrayFunction"); … … 4391 4391 { 4392 4392 JSValue thisValue = state->thisValue(); 4393 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4393 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4394 4394 if (UNLIKELY(!castedThis)) 4395 4395 return throwThisTypeError(*state, "TestObj", "domStringListFunction"); … … 4411 4411 { 4412 4412 JSValue thisValue = state->thisValue(); 4413 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4413 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4414 4414 if (UNLIKELY(!castedThis)) 4415 4415 return throwThisTypeError(*state, "TestObj", "methodWithAndWithoutNullableSequence"); … … 4431 4431 { 4432 4432 JSValue thisValue = state->thisValue(); 4433 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4433 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4434 4434 if (UNLIKELY(!castedThis)) 4435 4435 return throwThisTypeError(*state, "TestObj", "methodWithAndWithoutNullableSequence2"); … … 4451 4451 { 4452 4452 JSValue thisValue = state->thisValue(); 4453 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4453 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4454 4454 if (UNLIKELY(!castedThis)) 4455 4455 return throwThisTypeError(*state, "TestObj", "getSVGDocument"); … … 4468 4468 { 4469 4469 JSValue thisValue = state->thisValue(); 4470 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4470 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4471 4471 if (UNLIKELY(!castedThis)) 4472 4472 return throwThisTypeError(*state, "TestObj", "convert1"); … … 4485 4485 { 4486 4486 JSValue thisValue = state->thisValue(); 4487 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4487 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4488 4488 if (UNLIKELY(!castedThis)) 4489 4489 return throwThisTypeError(*state, "TestObj", "convert2"); … … 4502 4502 { 4503 4503 JSValue thisValue = state->thisValue(); 4504 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4504 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4505 4505 if (UNLIKELY(!castedThis)) 4506 4506 return throwThisTypeError(*state, "TestObj", "convert4"); … … 4519 4519 { 4520 4520 JSValue thisValue = state->thisValue(); 4521 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4521 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4522 4522 if (UNLIKELY(!castedThis)) 4523 4523 return throwThisTypeError(*state, "TestObj", "convert5"); … … 4536 4536 { 4537 4537 JSValue thisValue = state->thisValue(); 4538 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4538 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4539 4539 if (UNLIKELY(!castedThis)) 4540 4540 return throwThisTypeError(*state, "TestObj", "mutablePointFunction"); … … 4548 4548 { 4549 4549 JSValue thisValue = state->thisValue(); 4550 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4550 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4551 4551 if (UNLIKELY(!castedThis)) 4552 4552 return throwThisTypeError(*state, "TestObj", "immutablePointFunction"); … … 4560 4560 { 4561 4561 JSValue thisValue = state->thisValue(); 4562 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4562 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4563 4563 if (UNLIKELY(!castedThis)) 4564 4564 return throwThisTypeError(*state, "TestObj", "orange"); … … 4572 4572 { 4573 4573 JSValue thisValue = state->thisValue(); 4574 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4574 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4575 4575 if (UNLIKELY(!castedThis)) 4576 4576 return throwThisTypeError(*state, "TestObj", "strictFunction"); … … 4598 4598 { 4599 4599 JSValue thisValue = state->thisValue(); 4600 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4600 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4601 4601 if (UNLIKELY(!castedThis)) 4602 4602 return throwThisTypeError(*state, "TestObj", "strictFunctionWithSequence"); … … 4623 4623 { 4624 4624 JSValue thisValue = state->thisValue(); 4625 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4625 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4626 4626 if (UNLIKELY(!castedThis)) 4627 4627 return throwThisTypeError(*state, "TestObj", "strictFunctionWithArray"); … … 4648 4648 { 4649 4649 JSValue thisValue = state->thisValue(); 4650 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4650 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4651 4651 if (UNLIKELY(!castedThis)) 4652 4652 return throwThisTypeError(*state, "TestObj", "variadicStringMethod"); … … 4668 4668 { 4669 4669 JSValue thisValue = state->thisValue(); 4670 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4670 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4671 4671 if (UNLIKELY(!castedThis)) 4672 4672 return throwThisTypeError(*state, "TestObj", "variadicDoubleMethod"); … … 4688 4688 { 4689 4689 JSValue thisValue = state->thisValue(); 4690 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4690 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4691 4691 if (UNLIKELY(!castedThis)) 4692 4692 return throwThisTypeError(*state, "TestObj", "variadicNodeMethod"); … … 4711 4711 { 4712 4712 JSValue thisValue = state->thisValue(); 4713 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4713 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4714 4714 if (UNLIKELY(!castedThis)) 4715 4715 return throwThisTypeError(*state, "TestObj", "any"); … … 4737 4737 { 4738 4738 JSValue thisValue = state->thisValue(); 4739 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4739 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4740 4740 if (UNLIKELY(!castedThis)) 4741 4741 return throwThisTypeError(*state, "TestObj", "testPromiseFunction"); … … 4755 4755 { 4756 4756 JSValue thisValue = state->thisValue(); 4757 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4757 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4758 4758 if (UNLIKELY(!castedThis)) 4759 4759 return throwThisTypeError(*state, "TestObj", "testPromiseFunctionWithFloatArgument"); … … 4782 4782 { 4783 4783 JSValue thisValue = state->thisValue(); 4784 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4784 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4785 4785 if (UNLIKELY(!castedThis)) 4786 4786 return throwThisTypeError(*state, "TestObj", "testPromiseFunctionWithException"); … … 4802 4802 { 4803 4803 JSValue thisValue = state->thisValue(); 4804 JSTestObj*castedThis = jsDynamicCast<JSTestObj*>(thisValue);4804 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4805 4805 if (UNLIKELY(!castedThis)) 4806 4806 return throwThisTypeError(*state, "TestObj", "testPromiseFunctionWithOptionalIntArgument"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
r196396 r196563 196 196 { 197 197 JSValue thisValue = state->thisValue(); 198 JSTestOverrideBuiltins*castedThis = jsDynamicCast<JSTestOverrideBuiltins*>(thisValue);198 auto castedThis = jsDynamicCast<JSTestOverrideBuiltins*>(thisValue); 199 199 if (UNLIKELY(!castedThis)) 200 200 return throwThisTypeError(*state, "TestOverrideBuiltins", "namedItem"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r196396 r196563 459 459 { 460 460 JSValue thisValue = state->thisValue(); 461 JSTestTypedefs*castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);461 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 462 462 if (UNLIKELY(!castedThis)) 463 463 return throwThisTypeError(*state, "TestTypedefs", "func"); … … 481 481 { 482 482 JSValue thisValue = state->thisValue(); 483 JSTestTypedefs*castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);483 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 484 484 if (UNLIKELY(!castedThis)) 485 485 return throwThisTypeError(*state, "TestTypedefs", "setShadow"); … … 522 522 { 523 523 JSValue thisValue = state->thisValue(); 524 JSTestTypedefs*castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);524 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 525 525 if (UNLIKELY(!castedThis)) 526 526 return throwThisTypeError(*state, "TestTypedefs", "methodWithSequenceArg"); … … 539 539 { 540 540 JSValue thisValue = state->thisValue(); 541 JSTestTypedefs*castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);541 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 542 542 if (UNLIKELY(!castedThis)) 543 543 return throwThisTypeError(*state, "TestTypedefs", "nullableArrayArg"); … … 556 556 { 557 557 JSValue thisValue = state->thisValue(); 558 JSTestTypedefs*castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);558 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 559 559 if (UNLIKELY(!castedThis)) 560 560 return throwThisTypeError(*state, "TestTypedefs", "funcWithClamp"); … … 593 593 { 594 594 JSValue thisValue = state->thisValue(); 595 JSTestTypedefs*castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);595 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 596 596 if (UNLIKELY(!castedThis)) 597 597 return throwThisTypeError(*state, "TestTypedefs", "immutablePointFunction"); … … 605 605 { 606 606 JSValue thisValue = state->thisValue(); 607 JSTestTypedefs*castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);607 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 608 608 if (UNLIKELY(!castedThis)) 609 609 return throwThisTypeError(*state, "TestTypedefs", "stringArrayFunction"); … … 625 625 { 626 626 JSValue thisValue = state->thisValue(); 627 JSTestTypedefs*castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);627 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 628 628 if (UNLIKELY(!castedThis)) 629 629 return throwThisTypeError(*state, "TestTypedefs", "stringArrayFunction2"); … … 645 645 { 646 646 JSValue thisValue = state->thisValue(); 647 JSTestTypedefs*castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);647 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 648 648 if (UNLIKELY(!castedThis)) 649 649 return throwThisTypeError(*state, "TestTypedefs", "callWithSequenceThatRequiresInclude"); … … 662 662 { 663 663 JSValue thisValue = state->thisValue(); 664 JSTestTypedefs*castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);664 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 665 665 if (UNLIKELY(!castedThis)) 666 666 return throwThisTypeError(*state, "TestTypedefs", "methodWithException"); -
trunk/Source/WebCore/dom/EventTarget.idl
r196520 r196563 26 26 JSCustomToNativeObject, 27 27 EventTarget, 28 JSCustomHeader, 28 29 ] interface EventTarget { 29 30 [ObjCLegacyUnnamedParameters] void addEventListener(DOMString type, EventListener listener, optional boolean useCapture); -
trunk/Source/WebCore/dom/ScriptExecutionContext.cpp
r194496 r196563 391 391 392 392 #if PLATFORM(IOS) 393 if (target == target->toDOMWindow() && is<Document>(*this)) {393 if (target->toDOMWindow() && is<Document>(*this)) { 394 394 Settings* settings = downcast<Document>(*this).settings(); 395 395 if (settings && !settings->shouldDispatchJavaScriptWindowOnErrorEvents()) -
trunk/Source/WebCore/page/DOMWindow.idl
r196520 r196563 37 37 CustomPutFunction, 38 38 EventTarget, 39 JSGenerateToNativeObject,40 39 JSLegacyParent=JSDOMWindowBase, 41 40 InterfaceName=Window, 42 ] interface DOMWindow {41 ] interface DOMWindow : EventTarget { 43 42 // DOM Level 0 44 43 [Replaceable] readonly attribute Screen screen; … … 187 186 [Replaceable] readonly attribute DOMWindowCSS CSS; 188 187 189 // EventTarget interface190 [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 194 188 void captureEvents(/*in long eventFlags*/); 195 189 void releaseEvents(/*in long eventFlags*/); -
trunk/Source/WebCore/workers/WorkerGlobalScope.idl
r196520 r196563 32 32 EventTarget, 33 33 JSLegacyParent=JSWorkerGlobalScopeBase, 34 ] interface WorkerGlobalScope {34 ] interface WorkerGlobalScope : EventTarget { 35 35 36 36 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT … … 49 49 [Replaceable] readonly attribute WorkerNavigator navigator; 50 50 51 // EventTarget interface52 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 57 51 // Additional constructors 58 52
Note: See TracChangeset
for help on using the changeset viewer.