WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-154170-20160212204457.patch (text/plain), 99.15 KB, created by
Chris Dumez
on 2016-02-12 20:45:18 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2016-02-12 20:45:18 PST
Size:
99.15 KB
patch
obsolete
>Subversion Revision: 196539 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3d3e9ae1180dd8b49ddd7da765d4b2e3bcff338a..561ffe42f52414dd2db7a1ca1a55f09d2bcaf636 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,95 @@ >+2016-02-12 Chris Dumez <cdumez@apple.com> >+ >+ Window and WorkerGlobalScope should inherit EventTarget >+ https://bugs.webkit.org/show_bug.cgi?id=154170 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. >+ >+ No new tests, already 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. >+ > 2016-02-12 Ryan Haddad <ryanhaddad@apple.com> > > Reset results for bindings tests after r196520 >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index aac1efafa4581c0a20e6d02dae82a7264e3f6894..d42f135dfbba1eb1bc7affc93d86adebc8725f84 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -1709,6 +1709,7 @@ > 4669B2871B852A0B000F905F /* JSDOMNamedFlowCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F2768E1B85297F005C2556 /* JSDOMNamedFlowCollectionCustom.cpp */; }; > 467302021C4EFE7800BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h in Headers */ = {isa = PBXBuildFile; fileRef = 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */; }; > 4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 4689F1AE1267BAE100E8D380 /* FileMetadata.h */; }; >+ 46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 46C83EFD1A9BBE2900A79A41 /* GeoNotifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */; }; > 46C83EFE1A9BBE2900A79A41 /* GeoNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 46DB7D571B20FE46005651B2 /* VNodeTrackerCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */; }; >@@ -9190,6 +9191,7 @@ > 463EB6211B8789CB0096ED51 /* TagCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagCollection.h; sourceTree = "<group>"; }; > 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IgnoreOpensDuringUnloadCountIncrementer.h; sourceTree = "<group>"; }; > 4689F1AE1267BAE100E8D380 /* FileMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileMetadata.h; sourceTree = "<group>"; }; >+ 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEventTargetCustom.h; sourceTree = "<group>"; }; > 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeoNotifier.cpp; sourceTree = "<group>"; }; > 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeoNotifier.h; sourceTree = "<group>"; }; > 46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VNodeTrackerCocoa.cpp; sourceTree = "<group>"; }; >@@ -22193,6 +22195,7 @@ > F3D461461161D53200CA0D09 /* JSErrorHandler.cpp */, > F3D461471161D53200CA0D09 /* JSErrorHandler.h */, > BC60901E0E91B8EC000C68B5 /* JSEventTargetCustom.cpp */, >+ 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */, > 3314ACE910892086000F0E56 /* JSExceptionBase.cpp */, > 3314ACEA10892086000F0E56 /* JSExceptionBase.h */, > 8F934D841189F1EE00508D5D /* JSMainThreadExecState.cpp */, >@@ -24981,6 +24984,7 @@ > 2EDEF1F7121B0EFC00726DB2 /* BlobRegistryImpl.h in Headers */, > 2EB4BCD3121F03E300EC4885 /* BlobResourceHandle.h in Headers */, > 976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */, >+ 46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */, > 93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */, > BC5EB5E10E81BE8700B25965 /* BorderData.h in Headers */, > 589556ED18D4A44000764B03 /* BorderEdge.h in Headers */, >diff --git a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp b/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp >index 115dae56627e2fd67931408284e1e9c18d0a36e4..a518fc7bf5b312bc7cf6e219fff959f2ea8981b1 100644 >--- a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp >+++ b/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp >@@ -751,34 +751,6 @@ JSValue JSDOMWindow::setInterval(ExecState& state) > return jsNumber(result); > } > >-JSValue JSDOMWindow::addEventListener(ExecState& state) >-{ >- Frame* frame = wrapped().frame(); >- if (!frame) >- return jsUndefined(); >- >- JSValue listener = state.argument(1); >- if (!listener.isObject()) >- return jsUndefined(); >- >- wrapped().addEventListener(state.argument(0).toString(&state)->toAtomicString(&state), JSEventListener::create(asObject(listener), this, false, globalObject()->world()), state.argument(2).toBoolean(&state)); >- return jsUndefined(); >-} >- >-JSValue JSDOMWindow::removeEventListener(ExecState& state) >-{ >- Frame* frame = wrapped().frame(); >- if (!frame) >- return jsUndefined(); >- >- JSValue listener = state.argument(1); >- if (!listener.isObject()) >- return jsUndefined(); >- >- wrapped().removeEventListener(state.argument(0).toString(&state)->toAtomicString(&state), JSEventListener::create(asObject(listener), this, false, globalObject()->world()).ptr(), state.argument(2).toBoolean(&state)); >- return jsUndefined(); >-} >- > DOMWindow* JSDOMWindow::toWrapped(JSValue value) > { > if (!value.isObject()) >diff --git a/Source/WebCore/bindings/js/JSDOMWindowShell.cpp b/Source/WebCore/bindings/js/JSDOMWindowShell.cpp >index 1120668522229f7d16def869df917967f51ca704..660354072975e32b7ee158052d51cadf170358df 100644 >--- a/Source/WebCore/bindings/js/JSDOMWindowShell.cpp >+++ b/Source/WebCore/bindings/js/JSDOMWindowShell.cpp >@@ -32,7 +32,7 @@ > #include "Frame.h" > #include "GCController.h" > #include "JSDOMWindow.h" >-#include "DOMWindow.h" >+#include "JSEventTarget.h" > #include "ScriptController.h" > #include <heap/StrongInlines.h> > #include <runtime/JSObject.h> >@@ -85,6 +85,7 @@ void JSDOMWindowShell::setWindow(PassRefPtr<DOMWindow> domWindow) > Structure* structure = JSDOMWindow::createStructure(vm, 0, prototype.get()); > JSDOMWindow* jsDOMWindow = JSDOMWindow::create(vm, structure, *domWindow, this); > prototype->structure()->setGlobalObject(vm, jsDOMWindow); >+ prototype->structure()->setPrototypeWithoutTransition(vm, JSEventTarget::getPrototype(vm, jsDOMWindow)); > setWindow(vm, jsDOMWindow); > ASSERT(jsDOMWindow->globalObject() == jsDOMWindow); > ASSERT(prototype->globalObject() == jsDOMWindow); >diff --git a/Source/WebCore/bindings/js/JSDOMWindowShell.h b/Source/WebCore/bindings/js/JSDOMWindowShell.h >index 01f048d67a4f5b8d0f1ee969d5d27545f12746d0..bdfdd2fdd2e375bcf7a3af351990b2d2ff7c329d 100644 >--- a/Source/WebCore/bindings/js/JSDOMWindowShell.h >+++ b/Source/WebCore/bindings/js/JSDOMWindowShell.h >@@ -29,12 +29,12 @@ > #ifndef JSDOMWindowShell_h > #define JSDOMWindowShell_h > >+#include "DOMWindow.h" > #include "JSDOMWindow.h" > #include <runtime/JSProxy.h> > > namespace WebCore { > >- class DOMWindow; > class Frame; > > class JSDOMWindowShell : public JSC::JSProxy { >diff --git a/Source/WebCore/bindings/js/JSDictionary.cpp b/Source/WebCore/bindings/js/JSDictionary.cpp >index 3346ccfe6993fb949575d730855ed4d78f968db2..6634e16df73c333687357e375acda67f4ca5cfdb 100644 >--- a/Source/WebCore/bindings/js/JSDictionary.cpp >+++ b/Source/WebCore/bindings/js/JSDictionary.cpp >@@ -27,6 +27,7 @@ > #include "JSDictionary.h" > > #include "ArrayValue.h" >+#include "DOMWindow.h" > #include "Dictionary.h" > #include "JSCSSFontFaceRule.h" > #include "JSDOMError.h" >diff --git a/Source/WebCore/bindings/js/JSEventTargetCustom.cpp b/Source/WebCore/bindings/js/JSEventTargetCustom.cpp >index e8ead1c1d42f0ddffee966e1820ed0250882f4bf..60b176bfebfafc3865d790f1494345bb4069b454 100644 >--- a/Source/WebCore/bindings/js/JSEventTargetCustom.cpp >+++ b/Source/WebCore/bindings/js/JSEventTargetCustom.cpp >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2008 Apple Inc. All Rights Reserved. >+ * Copyright (C) 2008, 2016 Apple Inc. All Rights Reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -26,10 +26,15 @@ > #include "config.h" > #include "JSEventTarget.h" > >+#include "DOMWindow.h" >+#include "EventTarget.h" > #include "EventTargetHeaders.h" > #include "EventTargetInterfaces.h" >+#include "JSDOMWindow.h" > #include "JSDOMWindowShell.h" > #include "JSEventListener.h" >+#include "JSWorkerGlobalScope.h" >+#include "WorkerGlobalScope.h" > > using namespace JSC; > >@@ -61,12 +66,23 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget* targ > EventTarget* JSEventTarget::toWrapped(JSC::JSValue value) > { > TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindowShell) >+ TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindow) >+ TRY_TO_UNWRAP_WITH_INTERFACE(WorkerGlobalScope) > TRY_TO_UNWRAP_WITH_INTERFACE(EventTarget) >- // FIXME: Remove this once all event targets extend EventTarget >- DOM_EVENT_TARGET_INTERFACES_FOR_EACH(TRY_TO_UNWRAP_WITH_INTERFACE) >- return 0; >+ return nullptr; > } > > #undef TRY_TO_UNWRAP_WITH_INTERFACE > >+std::unique_ptr<JSEventTargetOrGlobalScope> JSEventTargetOrGlobalScope::create(JSC::JSValue thisValue) >+{ >+ if (auto* jsEventTarget = JSC::jsDynamicCast<JSEventTarget*>(thisValue)) >+ return std::make_unique<JSEventTargetOrGlobalScope>(jsEventTarget->wrapped(), *jsEventTarget); >+ if (auto* jsDOMWindow = toJSDOMWindow(thisValue)) >+ return std::make_unique<JSEventTargetOrGlobalScope>(jsDOMWindow->wrapped(), *jsDOMWindow); >+ if (auto* jsWorkerGlobalScope = toJSWorkerGlobalScope(thisValue)) >+ return std::make_unique<JSEventTargetOrGlobalScope>(jsWorkerGlobalScope->wrapped(), *jsWorkerGlobalScope); >+ return nullptr; >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/bindings/js/JSEventTargetCustom.h b/Source/WebCore/bindings/js/JSEventTargetCustom.h >new file mode 100644 >index 0000000000000000000000000000000000000000..c92263d1693ea3a12a70af641d78f79a7708e126 >--- /dev/null >+++ b/Source/WebCore/bindings/js/JSEventTargetCustom.h >@@ -0,0 +1,55 @@ >+/* >+ * Copyright (C) 2016 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef JSEventTargetCustom_h >+#define JSEventTargetCustom_h >+ >+#include "JSDOMBinding.h" >+ >+namespace WebCore { >+ >+// Wrapper type for JSEventTarget's castedThis because JSDOMWindow and JSWorkerGlobalScope do not inherit JSEventTarget. >+class JSEventTargetOrGlobalScope { >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ static std::unique_ptr<JSEventTargetOrGlobalScope> create(JSC::JSValue thisValue); >+ >+ EventTarget& wrapped() { return m_wrapped; } >+ >+ operator JSC::JSObject&() { return m_wrapper; } >+ >+ JSEventTargetOrGlobalScope(EventTarget& wrapped, JSC::JSObject& wrapper) >+ : m_wrapped(wrapped) >+ , m_wrapper(wrapper) >+ { } >+ >+private: >+ EventTarget& m_wrapped; >+ JSC::JSObject& m_wrapper; >+}; >+ >+} >+ >+#endif // JSEventTargetCustom_h >diff --git a/Source/WebCore/bindings/js/WorkerScriptController.cpp b/Source/WebCore/bindings/js/WorkerScriptController.cpp >index 09d178bd1f3e2336898559882d70036ff1384f7c..de2d00ecd3effd2ba2e6946b180b2d621d0603a4 100644 >--- a/Source/WebCore/bindings/js/WorkerScriptController.cpp >+++ b/Source/WebCore/bindings/js/WorkerScriptController.cpp >@@ -30,6 +30,7 @@ > > #include "JSDOMBinding.h" > #include "JSDedicatedWorkerGlobalScope.h" >+#include "JSEventTarget.h" > #include "ScriptSourceCode.h" > #include "WebCoreJSClientData.h" > #include "WorkerGlobalScope.h" >@@ -89,6 +90,7 @@ void WorkerScriptController::initScript() > ASSERT(structure->globalObject() == m_workerGlobalScopeWrapper); > ASSERT(m_workerGlobalScopeWrapper->structure()->globalObject() == m_workerGlobalScopeWrapper); > workerGlobalScopePrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get()); >+ workerGlobalScopePrototype->structure()->setPrototypeWithoutTransition(*m_vm, JSEventTarget::getPrototype(*m_vm, m_workerGlobalScopeWrapper.get())); > dedicatedContextPrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get()); > } > ASSERT(m_workerGlobalScopeWrapper->globalObject() == m_workerGlobalScopeWrapper); >diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >index e2c50a869475999c3f346f008ca412a327cb4a36..ccbb322f1884d42759582da92092f5d474f107d2 100644 >--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >@@ -558,6 +558,7 @@ sub ShouldGenerateToJSDeclaration > return 0 if ($interface->extendedAttributes->{"SuppressToJSObject"}); > return 0 if not NeedsImplementationClass($interface); > return 0 if $interface->name eq "AbstractView"; >+ return 0 if $interface->extendedAttributes->{"CustomProxyToJSObject"}; > return 1 if (!$hasParent or $interface->extendedAttributes->{"JSGenerateToJSObject"} or $interface->extendedAttributes->{"CustomToJSObject"}); > return 1 if $interface->parent && $interface->parent eq "EventTarget"; > return 0; >@@ -1730,17 +1731,13 @@ sub GetRuntimeEnableFunctionName > sub GetCastingHelperForThisObject > { > my $interface = shift; >+ my $interfaceName = $interface->name; > >- if ($interface->name eq "Node") { >- return "jsNodeCast"; >- } >- if ($interface->name eq "Element") { >- return "jsElementCast"; >- } >- if ($interface->name eq "Document") { >- return "jsDocumentCast"; >- } >- return "jsDynamicCast<JS" . $interface->name . "*>"; >+ return "jsNodeCast" if $interfaceName eq "Node"; >+ return "jsElementCast" if $interfaceName eq "Element"; >+ return "jsDocumentCast" if $interfaceName eq "Document"; >+ return "JSEventTargetOrGlobalScope::create" if $interfaceName eq "EventTarget"; >+ return "jsDynamicCast<JS" . $interfaceName . "*>"; > } > > sub GetIndexedGetterExpression >@@ -2944,6 +2941,14 @@ sub GenerateImplementation > $implIncludes{"ExceptionCode.h"} = 1; > } > >+ # EventTarget needs to do some extra checks if castedThis is a JSDOMWindow. >+ if ($interface->name eq "EventTarget") { >+ $implIncludes{"DOMWindow.h"} = 1; >+ push(@implContent, " if (auto* window = castedThis->wrapped().toDOMWindow()) {\n"); >+ push(@implContent, " if (!window->frame() || !BindingSecurity::shouldAllowAccessToDOMWindow(state, *window))\n"); >+ push(@implContent, " return JSValue::encode(jsUndefined());\n"); >+ push(@implContent, " }\n"); >+ } > # For compatibility with legacy content, the EventListener calls are generated without GenerateArgumentsCountCheck. > if ($function->signature->name eq "addEventListener") { > push(@implContent, GenerateEventListenerCall("add")); >@@ -3228,19 +3233,15 @@ sub GenerateFunctionCastedThis > push(@implContent, " $className* castedThis = to${className}(state->thisValue().toThis(state, NotStrictMode));\n"); > push(@implContent, " if (UNLIKELY(!castedThis))\n"); > push(@implContent, " return throwVMTypeError(state);\n"); >- } elsif ($interface->extendedAttributes->{"WorkerGlobalScope"}) { >- push(@implContent, " $className* castedThis = to${className}(state->thisValue().toThis(state, NotStrictMode));\n"); >- push(@implContent, " if (UNLIKELY(!castedThis))\n"); >- push(@implContent, " return throwVMTypeError(state);\n"); > } else { > push(@implContent, " JSValue thisValue = state->thisValue();\n"); >- push(@implContent, " $className* castedThis = " . GetCastingHelperForThisObject($interface) . "(thisValue);\n"); >+ push(@implContent, " auto castedThis = " . GetCastingHelperForThisObject($interface) . "(thisValue);\n"); > my $domFunctionName = $function->signature->name; > push(@implContent, " if (UNLIKELY(!castedThis))\n"); > push(@implContent, " return throwThisTypeError(*state, \"$interfaceName\", \"$domFunctionName\");\n"); > } > >- push(@implContent, " ASSERT_GC_OBJECT_INHERITS(castedThis, ${className}::info());\n"); >+ push(@implContent, " ASSERT_GC_OBJECT_INHERITS(castedThis, ${className}::info());\n") unless $interfaceName eq "EventTarget"; > } > > sub GenerateCallWith >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp >index 7af632b4934099fbd2c8d7b2d5249ce2c189b1a7..f93d551df659551345967273ac32d8d30e04c8e2 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp >@@ -200,7 +200,7 @@ JSValue JSTestActiveDOMObject::getConstructor(VM& vm, const JSGlobalObject* glob > EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionExcitingFunction(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestActiveDOMObject", "excitingFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info()); >@@ -219,7 +219,7 @@ EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionExcitingFunct > EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionPostMessage(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestActiveDOMObject", "postMessage"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info()); >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp >index 7ecca70b45e43fe7126d289ceb81d5ebf4d3b332..e38788b9e9aa8263eea1f63241d78907671e8550 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp >@@ -186,7 +186,7 @@ JSValue JSTestCustomNamedGetter::getConstructor(VM& vm, const JSGlobalObject* gl > EncodedJSValue JSC_HOST_CALL jsTestCustomNamedGetterPrototypeFunctionAnotherFunction(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestCustomNamedGetter* castedThis = jsDynamicCast<JSTestCustomNamedGetter*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestCustomNamedGetter*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestCustomNamedGetter", "anotherFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestCustomNamedGetter::info()); >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp >index 768cd319037c5c47c7a901799ada1c847e81e118..57af56086afc3d9ef247542dec8fc42d1757c8b3 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp >@@ -198,7 +198,7 @@ JSValue JSTestEventTarget::getConstructor(VM& vm, const JSGlobalObject* globalOb > EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionItem(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestEventTarget* castedThis = jsDynamicCast<JSTestEventTarget*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestEventTarget*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestEventTarget", "item"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info()); >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp >index f743db872a463d3c303e660d2b72099ae9f4bd5e..9b8a362617f6e816b73198d8e9b1ee2c1c3a4b18 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp >@@ -765,7 +765,7 @@ JSValue JSTestInterface::getConstructor(VM& vm, const JSGlobalObject* globalObje > EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod1(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestInterface", "implementsMethod1"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); >@@ -780,7 +780,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod1(E > EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod2(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestInterface", "implementsMethod2"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); >@@ -809,7 +809,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod2(E > EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod3(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestInterface", "implementsMethod3"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); >@@ -831,7 +831,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfaceConstructorFunctionImplementsMethod4 > EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod1(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestInterface", "supplementalMethod1"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); >@@ -846,7 +846,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod1 > EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod2(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestInterface", "supplementalMethod2"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); >@@ -875,7 +875,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod2 > EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod3(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestInterface", "supplementalMethod3"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp >index 60d05dc62f1e7400950635522edeb4601cff0f8b..85629e297e1314a9b8931c73876833275abccc24 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp >@@ -199,7 +199,7 @@ JSValue JSTestJSBuiltinConstructor::getConstructor(VM& vm, const JSGlobalObject* > EncodedJSValue JSC_HOST_CALL jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestJSBuiltinConstructor* castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestJSBuiltinConstructor", "testCustomFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestJSBuiltinConstructor::info()); >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp >index 2b6372604fbbc8463c7d1efe167cd0eafd5a9c20..9a4971a84aa34e8a65401edfe6630331527e0f2b 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp >@@ -151,7 +151,7 @@ JSValue JSTestMediaQueryListListener::getConstructor(VM& vm, const JSGlobalObjec > EncodedJSValue JSC_HOST_CALL jsTestMediaQueryListListenerPrototypeFunctionMethod(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestMediaQueryListListener* castedThis = jsDynamicCast<JSTestMediaQueryListListener*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestMediaQueryListListener*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestMediaQueryListListener", "method"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestMediaQueryListListener::info()); >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp >index 821fd41439d83a03502433abbe738d7630c9faed..254bc6582a9acba73980496ab50ba1f887c48432 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp >@@ -421,7 +421,7 @@ JSValue JSTestNondeterministic::getConstructor(VM& vm, const JSGlobalObject* glo > EncodedJSValue JSC_HOST_CALL jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunction(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestNondeterministic* castedThis = jsDynamicCast<JSTestNondeterministic*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestNondeterministic*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestNondeterministic", "nondeterministicZeroArgFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestNondeterministic::info()); >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp >index 6651da509a1ccf054758b218f83e266176f63bd6..259fd7ea54e0b20d483e3e0945bce97133835cf0 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp >@@ -3018,7 +3018,7 @@ JSValue JSTestObj::getConstructor(VM& vm, const JSGlobalObject* globalObject) > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "voidMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3030,7 +3030,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* sta > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "voidMethodWithArgs"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3053,7 +3053,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecSt > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethod(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "byteMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3065,7 +3065,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethod(ExecState* sta > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethodWithArgs(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "byteMethodWithArgs"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3088,7 +3088,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethodWithArgs(ExecSt > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethod(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "octetMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3100,7 +3100,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethod(ExecState* st > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethodWithArgs(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "octetMethodWithArgs"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3123,7 +3123,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethodWithArgs(ExecS > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethod(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "longMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3135,7 +3135,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethod(ExecState* sta > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethodWithArgs(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "longMethodWithArgs"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3158,7 +3158,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethodWithArgs(ExecSt > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "objMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3170,7 +3170,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* stat > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "objMethodWithArgs"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3193,7 +3193,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecSta > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithSequenceArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3210,7 +3210,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(Exe > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodReturningSequence"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3227,7 +3227,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(E > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithEnumArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3248,7 +3248,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(ExecSta > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithOptionalEnumArgAndDefaultValue"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3277,7 +3277,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalEnumArg > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodThatRequiresAllArgsAndThrows"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3300,7 +3300,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgs > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "serializedValue"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3317,7 +3317,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "optionsObject"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3337,7 +3337,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState* > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithException"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3351,7 +3351,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecS > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithExceptionWithMessage(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithExceptionWithMessage"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3365,7 +3365,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithExceptionWithMe > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "customMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3375,7 +3375,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(ExecState* s > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "customMethodWithArgs"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3385,7 +3385,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(Exec > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionPrivateMethod(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "privateMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3402,7 +3402,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionPrivateMethod(ExecState* > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "addEventListener"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3417,7 +3417,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecStat > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "removeEventListener"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3432,7 +3432,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(ExecS > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "withScriptStateVoid"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3444,7 +3444,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecS > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "withScriptStateObj"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3458,7 +3458,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecSt > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "withScriptStateVoidException"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3472,7 +3472,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidExcept > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "withScriptStateObjException"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3489,7 +3489,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjExcepti > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContext(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "withScriptExecutionContext"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3504,7 +3504,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptState"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3519,7 +3519,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateObjException"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3539,7 +3539,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateWithSpaces"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3556,7 +3556,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "withScriptArgumentsAndCallStack"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3569,7 +3569,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCal > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithOptionalArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3591,7 +3591,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(Exe > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithOptionalArgAndDefaultValue"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3613,7 +3613,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArgAndD > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithNonOptionalArgAndOptionalArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3640,7 +3640,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgA > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithNonOptionalArgAndTwoOptionalArgs"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3675,7 +3675,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgA > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithOptionalString"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3697,7 +3697,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString( > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithOptionalStringAndDefaultValue"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3719,7 +3719,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringA > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithOptionalStringIsUndefined"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3734,7 +3734,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringI > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithOptionalStringIsNullString"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3749,7 +3749,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringI > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithCallbackArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3766,7 +3766,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(Exe > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithNonCallbackArgAndCallbackArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3786,7 +3786,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgA > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithCallbackAndOptionalArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3804,7 +3804,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOpti > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithCallbackFunctionArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3821,7 +3821,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctio > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithNonCallbackArgAndCallbackFunctionArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3841,7 +3841,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgA > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithCallbackFunctionAndOptionalArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3883,7 +3883,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbac > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod1(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "conditionalMethod1"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3898,7 +3898,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod1(ExecSt > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod2(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "conditionalMethod2"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3913,7 +3913,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod2(ExecSt > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod3(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "conditionalMethod3"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3927,7 +3927,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod3(ExecSt > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3947,7 +3947,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1( > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3974,7 +3974,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2( > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod3(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -3991,7 +3991,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod3( > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod4(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4008,7 +4008,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod4( > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod5(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4025,7 +4025,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod5( > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod6(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4042,7 +4042,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod6( > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod7(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4059,7 +4059,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod7( > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod8(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4076,7 +4076,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod8( > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod9(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4093,7 +4093,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod9( > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod10(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4110,7 +4110,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod10 > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod11(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4127,7 +4127,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod11 > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod12(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4179,7 +4179,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecStat > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethodWithOptionalParameter"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4206,7 +4206,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethodWi > static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "overloadedMethodWithOptionalParameter"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4323,7 +4323,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod1(ExecS > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClamp(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "classMethodWithClamp"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4353,7 +4353,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClamp(Exec > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithUnsignedLongSequence"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4370,7 +4370,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongSeq > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStringArrayFunction(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "stringArrayFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4390,7 +4390,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStringArrayFunction(ExecS > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionDomStringListFunction(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "domStringListFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4410,7 +4410,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionDomStringListFunction(Exe > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithAndWithoutNullableSequence"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4430,7 +4430,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNulla > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "methodWithAndWithoutNullableSequence2"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4450,7 +4450,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNulla > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "getSVGDocument"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4467,7 +4467,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(ExecState* > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "convert1"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4484,7 +4484,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(ExecState* state > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "convert2"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4501,7 +4501,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(ExecState* state > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "convert4"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4518,7 +4518,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* state > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "convert5"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4535,7 +4535,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(ExecState* state > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "mutablePointFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4547,7 +4547,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(Exec > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionImmutablePointFunction(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "immutablePointFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4559,7 +4559,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionImmutablePointFunction(Ex > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "orange"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4571,7 +4571,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(ExecState* state) > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunction(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "strictFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4597,7 +4597,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunction(ExecState* > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithSequence(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "strictFunctionWithSequence"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4622,7 +4622,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithSequenc > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithArray(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "strictFunctionWithArray"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4647,7 +4647,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithArray(E > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicStringMethod(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "variadicStringMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4667,7 +4667,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicStringMethod(Exec > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicDoubleMethod(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "variadicDoubleMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4687,7 +4687,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicDoubleMethod(Exec > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "variadicNodeMethod"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4710,7 +4710,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(ExecSt > EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAny(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "any"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4736,7 +4736,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunction(ExecS > static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionPromise(ExecState* state, JSPromiseDeferred* promiseDeferred) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "testPromiseFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4754,7 +4754,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithFl > static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise(ExecState* state, JSPromiseDeferred* promiseDeferred) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "testPromiseFunctionWithFloatArgument"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4781,7 +4781,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithEx > static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise(ExecState* state, JSPromiseDeferred* promiseDeferred) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "testPromiseFunctionWithException"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >@@ -4801,7 +4801,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithOp > static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise(ExecState* state, JSPromiseDeferred* promiseDeferred) > { > JSValue thisValue = state->thisValue(); >- JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestObj", "testPromiseFunctionWithOptionalIntArgument"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp >index d327639c28dc68904f16a1095d63cb2f740313a8..44ab449b82e8cf2cd6b0d3d4e575b9a6cb6ec1f4 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp >@@ -195,7 +195,7 @@ JSValue JSTestOverrideBuiltins::getConstructor(VM& vm, const JSGlobalObject* glo > EncodedJSValue JSC_HOST_CALL jsTestOverrideBuiltinsPrototypeFunctionNamedItem(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestOverrideBuiltins* castedThis = jsDynamicCast<JSTestOverrideBuiltins*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestOverrideBuiltins*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestOverrideBuiltins", "namedItem"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestOverrideBuiltins::info()); >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp >index 4852e41ca5fdb3500e694e69e7a0718756d87b0c..a717c7057ca0059807e9f160c735df717bc6af42 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp >@@ -458,7 +458,7 @@ JSValue JSTestTypedefs::getConstructor(VM& vm, const JSGlobalObject* globalObjec > EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestTypedefs", "func"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); >@@ -480,7 +480,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(ExecState* stat > EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestTypedefs", "setShadow"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); >@@ -521,7 +521,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(ExecState* > EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestTypedefs", "methodWithSequenceArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); >@@ -538,7 +538,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceAr > EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableArrayArg(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestTypedefs", "nullableArrayArg"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); >@@ -555,7 +555,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableArrayArg(Exe > EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestTypedefs", "funcWithClamp"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); >@@ -592,7 +592,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(ExecSt > EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFunction(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestTypedefs", "immutablePointFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); >@@ -604,7 +604,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFuncti > EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestTypedefs", "stringArrayFunction"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); >@@ -624,7 +624,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction( > EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction2(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestTypedefs", "stringArrayFunction2"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); >@@ -644,7 +644,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction2 > EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestTypedefs", "callWithSequenceThatRequiresInclude"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); >@@ -661,7 +661,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThat > EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(ExecState* state) > { > JSValue thisValue = state->thisValue(); >- JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); >+ auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); > if (UNLIKELY(!castedThis)) > return throwThisTypeError(*state, "TestTypedefs", "methodWithException"); > ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); >diff --git a/Source/WebCore/dom/EventTarget.idl b/Source/WebCore/dom/EventTarget.idl >index a48b3db6c9505baa8fbf9398d868dbf5338f835c..a95528718c6ba6ec69f55b0c84ebaacd8de2f8cc 100644 >--- a/Source/WebCore/dom/EventTarget.idl >+++ b/Source/WebCore/dom/EventTarget.idl >@@ -25,6 +25,7 @@ > CustomToJSObject, > JSCustomToNativeObject, > EventTarget, >+ JSCustomHeader, > ] interface EventTarget { > [ObjCLegacyUnnamedParameters] void addEventListener(DOMString type, EventListener listener, optional boolean useCapture); > [ObjCLegacyUnnamedParameters] void removeEventListener(DOMString type, EventListener listener, optional boolean useCapture); >diff --git a/Source/WebCore/dom/ScriptExecutionContext.cpp b/Source/WebCore/dom/ScriptExecutionContext.cpp >index 43fafae156c256d6fc28ae271b6fb7d3c736d00d..0f182443da7703a2767e46e0df0f703e29d4dd05 100644 >--- a/Source/WebCore/dom/ScriptExecutionContext.cpp >+++ b/Source/WebCore/dom/ScriptExecutionContext.cpp >@@ -390,7 +390,8 @@ bool ScriptExecutionContext::dispatchErrorEvent(const String& errorMessage, int > return false; > > #if PLATFORM(IOS) >- if (target == target->toDOMWindow() && is<Document>(*this)) { >+ auto targetIsWindow = !!target->toDOMWindow(); >+ if (targetIsWindow && is<Document>(*this)) { > Settings* settings = downcast<Document>(*this).settings(); > if (settings && !settings->shouldDispatchJavaScriptWindowOnErrorEvents()) > return false; >diff --git a/Source/WebCore/page/DOMWindow.idl b/Source/WebCore/page/DOMWindow.idl >index 883c92378845f63c2a6be65973a48170bbfa8644..522a1f9187b4ff015c63c4af6679f0f0201e8650 100644 >--- a/Source/WebCore/page/DOMWindow.idl >+++ b/Source/WebCore/page/DOMWindow.idl >@@ -36,10 +36,9 @@ > JSCustomToNativeObject, > CustomPutFunction, > EventTarget, >- JSGenerateToNativeObject, > JSLegacyParent=JSDOMWindowBase, > InterfaceName=Window, >-] interface DOMWindow { >+] interface DOMWindow : EventTarget { > // DOM Level 0 > [Replaceable] readonly attribute Screen screen; > [Replaceable] readonly attribute History history; >@@ -186,11 +185,6 @@ > > [Replaceable] readonly attribute DOMWindowCSS CSS; > >- // EventTarget interface >- [Custom] void addEventListener(DOMString type, EventListener listener, optional boolean useCapture); >- [Custom] void removeEventListener(DOMString type, EventListener listener, optional boolean useCapture); >- [ImplementedAs=dispatchEventForBindings, RaisesException] boolean dispatchEvent(Event event); >- > void captureEvents(/*in long eventFlags*/); > void releaseEvents(/*in long eventFlags*/); > >diff --git a/Source/WebCore/workers/WorkerGlobalScope.idl b/Source/WebCore/workers/WorkerGlobalScope.idl >index 748eaf07ecc748a362d39f1985ea11a80df833d6..3a1110fcfd7a8c5004ab129c085dfb00d3adc6e7 100644 >--- a/Source/WebCore/workers/WorkerGlobalScope.idl >+++ b/Source/WebCore/workers/WorkerGlobalScope.idl >@@ -31,7 +31,7 @@ > JSCustomGetOwnPropertySlotAndDescriptor, > EventTarget, > JSLegacyParent=JSWorkerGlobalScopeBase, >-] interface WorkerGlobalScope { >+] interface WorkerGlobalScope : EventTarget { > > #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT > [Replaceable] readonly attribute WorkerGlobalScope self; >@@ -48,12 +48,6 @@ > [Custom] void importScripts(/*[Variadic] DOMString urls */); > [Replaceable] readonly attribute WorkerNavigator navigator; > >- // EventTarget interface >- >- void addEventListener(DOMString type, EventListener listener, optional boolean useCapture); >- void removeEventListener(DOMString type, EventListener listener, optional boolean useCapture); >- [ImplementedAs=dispatchEventForBindings, RaisesException] boolean dispatchEvent(Event event); >- > // Additional constructors > > attribute DOMURLConstructor webkitURL; // FIXME: deprecate this. >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 64357ab52dbb8218717aab997acc287768daa159..8379563d375ade9622da2d9623a53295fcf1098c 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,19 @@ >+2016-02-12 Chris Dumez <cdumez@apple.com> >+ >+ Window and WorkerGlobalScope should inherit EventTarget >+ https://bugs.webkit.org/show_bug.cgi?id=154170 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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.postMessage() which >+ should not be allowed, in addition to window.addEventListener() and >+ window.removeEventListener(). >+ > 2016-02-12 Jiewen Tan <jiewen_tan@apple.com> > > Unreviewed, build fix after r196520 >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 2e3c1d4a88a06321a0e08f8b57c404a5dd594b36..aee4b883d8f973c6796b4a9f94eadf09d08d77a7 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,14 @@ >+2016-02-12 Chris Dumez <cdumez@apple.com> >+ >+ Window and WorkerGlobalScope should inherit EventTarget >+ https://bugs.webkit.org/show_bug.cgi?id=154170 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Rebaseline now that a couple of checks are passing. >+ >+ * web-platform-tests/html/dom/interfaces-expected.txt: >+ > 2016-02-12 Jiewen Tan <jiewen_tan@apple.com> > > WebKit should expose the DOM 4 Event.isTrusted property >diff --git a/LayoutTests/fast/loader/window-clearing-expected.txt b/LayoutTests/fast/loader/window-clearing-expected.txt >index c76bb658fae75e846d5ba5c985015682040a7ef6..c8c6e71a01c6c8a607b79b9b16c25611631ac9d5 100644 >--- a/LayoutTests/fast/loader/window-clearing-expected.txt >+++ b/LayoutTests/fast/loader/window-clearing-expected.txt >@@ -7,3 +7,5 @@ PASS: element 0 in the window's prototype chain was cleared > PASS: element 1 in the window's prototype chain was cleared > > PASS: element 2 in the window's prototype chain was cleared >+ >+PASS: element 3 in the window's prototype chain was cleared >diff --git a/LayoutTests/http/tests/security/cross-frame-access-call-expected.txt b/LayoutTests/http/tests/security/cross-frame-access-call-expected.txt >index 2f4fdd56642ca17767be37cee8e359145d575eac..9f5af6b022a9c46badcc71866af236c487d59b6b 100644 >--- a/LayoutTests/http/tests/security/cross-frame-access-call-expected.txt >+++ b/LayoutTests/http/tests/security/cross-frame-access-call-expected.txt >@@ -26,6 +26,7 @@ CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" fro > 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. > 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. > 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. >+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. > CONSOLE MESSAGE: line 10: 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. > > >@@ -45,6 +46,7 @@ PASS: window.btoa.call(targetWindow, 'string') should be 'undefined' and is. > PASS: window.open.call(targetWindow, '') should be 'undefined' and is. > PASS: window.addEventListener.call(targetWindow, 'load', null, false); should be 'undefined' and is. > PASS: window.removeEventListener.call(targetWindow, 'load', null, false); should be 'undefined' and is. >+PASS: window.dispatchEvent.call(targetWindow, clickEvent); should be 'undefined' and is. > PASS: window.clearTimeout.call(targetWindow, 0); should be 'undefined' and is. > PASS: window.clearInterval.call(targetWindow, 0); should be 'undefined' and is. > PASS: window.print.call(targetWindow); should be 'undefined' and is. >diff --git a/LayoutTests/http/tests/security/cross-frame-access-call.html b/LayoutTests/http/tests/security/cross-frame-access-call.html >index 5dacbecc01516dcef0ee3291074651f3b2542eab..8937e6bad2c551446f8133e6e291b87c2158af5f 100644 >--- a/LayoutTests/http/tests/security/cross-frame-access-call.html >+++ b/LayoutTests/http/tests/security/cross-frame-access-call.html >@@ -42,6 +42,8 @@ window.onload = function() > // These always return undefined so we use the error console to detect failure > shouldBe("window.addEventListener.call(targetWindow, 'load', null, false);", "undefined"); > shouldBe("window.removeEventListener.call(targetWindow, 'load', null, false);", "undefined"); >+ clickEvent = new Event("click"); >+ shouldBe("window.dispatchEvent.call(targetWindow, clickEvent);", "undefined"); > shouldBe("window.clearTimeout.call(targetWindow, 0);", "undefined"); > shouldBe("window.clearInterval.call(targetWindow, 0);", "undefined"); > shouldBe("window.print.call(targetWindow);", "undefined"); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt >index 46618ef620362730612207754ef27323ab6f7088..67d07885e43a7ed0f306ca26b42586772fa7129c 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt >@@ -3799,14 +3799,10 @@ FAIL DragEvent interface object name assert_own_property: self does not have own > FAIL DragEvent interface: existence and properties of interface prototype object assert_own_property: self does not have own property "DragEvent" expected property "DragEvent" missing > 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 > FAIL DragEvent interface: attribute dataTransfer assert_own_property: self does not have own property "DragEvent" expected property "DragEvent" missing >-FAIL Window interface: existence and properties of interface object assert_equals: prototype of Window is not EventTarget expected function "function EventTarget() { >- [native code] >-}" but got function "function () { >- [native code] >-}" >+PASS Window interface: existence and properties of interface object > PASS Window interface object length > PASS Window interface object name >-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]" >+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]" > 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 > PASS Window interface: attribute self > PASS Window interface: attribute name
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 154170
:
271245
|
271246
|
271251
|
271267
|
271317