Title: [219441] branches/safari-604.1.31-branch
Revision
219441
Author
jmarc...@apple.com
Date
2017-07-12 19:39:28 -0700 (Wed, 12 Jul 2017)

Log Message

Cherry-pick r219421. rdar://problem/33265549

Modified Paths

Added Paths

Removed Paths

Diff

Modified: branches/safari-604.1.31-branch/LayoutTests/ChangeLog (219440 => 219441)


--- branches/safari-604.1.31-branch/LayoutTests/ChangeLog	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/LayoutTests/ChangeLog	2017-07-13 02:39:28 UTC (rev 219441)
@@ -1,3 +1,22 @@
+2017-07-12  Jason Marcell  <jmarc...@apple.com>
+
+        Cherry-pick r219421. rdar://problem/33265549
+
+    2017-07-12  Commit Queue  <commit-qu...@webkit.org>
+
+            Unreviewed, rolling out r219361.
+            https://bugs.webkit.org/show_bug.cgi?id=174434
+
+            Huge PLUM memory regression on iOS (Requested by kling on
+            #webkit).
+
+            Reverted changeset:
+
+            "[WebIDL] Convert MutationCallback to be a normal generate
+            callback"
+            https://bugs.webkit.org/show_bug.cgi?id=174140
+            http://trac.webkit.org/changeset/219361
+
 2017-07-11  Carlos Alberto Lopez Perez  <clo...@igalia.com>
 
         REGRESSION(r219332): [GTK] 9 new failures on fast/forms spinbutton related tests.

Modified: branches/safari-604.1.31-branch/LayoutTests/fast/dom/MutationObserver/mutation-observer-constructor-expected.txt (219440 => 219441)


--- branches/safari-604.1.31-branch/LayoutTests/fast/dom/MutationObserver/mutation-observer-constructor-expected.txt	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/LayoutTests/fast/dom/MutationObserver/mutation-observer-constructor-expected.txt	2017-07-13 02:39:28 UTC (rev 219441)
@@ -8,10 +8,10 @@
 PASS typeof WebKitMutationObserver.prototype.disconnect is "function"
 PASS typeof observer.observe is "function"
 PASS typeof observer.disconnect is "function"
-PASS new MutationObserver({ handleEvent: function() {} }) threw exception TypeError: Argument 1 ('callback') to the MutationObserver constructor must be a function.
-PASS new MutationObserver({}) threw exception TypeError: Argument 1 ('callback') to the MutationObserver constructor must be a function.
-PASS new MutationObserver(42) threw exception TypeError: Argument 1 ('callback') to the MutationObserver constructor must be a function.
-PASS new MutationObserver("foo") threw exception TypeError: Argument 1 ('callback') to the MutationObserver constructor must be a function.
+PASS new MutationObserver({ handleEvent: function() {} }) threw exception TypeError: Argument 1 ('callback') to the MutationObserver constructor must be an instance of MutationCallback.
+PASS new MutationObserver({}) threw exception TypeError: Argument 1 ('callback') to the MutationObserver constructor must be an instance of MutationCallback.
+PASS new MutationObserver(42) threw exception TypeError: Argument 1 ('callback') to the MutationObserver constructor must be an instance of MutationCallback.
+PASS new MutationObserver("foo") threw exception TypeError: Argument 1 ('callback') to the MutationObserver constructor must be an instance of MutationCallback.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: branches/safari-604.1.31-branch/Source/WebCore/CMakeLists.txt (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/CMakeLists.txt	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/CMakeLists.txt	2017-07-13 02:39:28 UTC (rev 219441)
@@ -464,7 +464,6 @@
     dom/MessagePort.idl
     dom/MouseEvent.idl
     dom/MouseEventInit.idl
-    dom/MutationCallback.idl
     dom/MutationEvent.idl
     dom/MutationObserver.idl
     dom/MutationRecord.idl
@@ -1210,6 +1209,7 @@
     bindings/js/JSMessageChannelCustom.cpp
     bindings/js/JSMessageEventCustom.cpp
     bindings/js/JSMessagePortCustom.cpp
+    bindings/js/JSMutationCallback.cpp
     bindings/js/JSMutationObserverCustom.cpp
     bindings/js/JSNodeCustom.cpp
     bindings/js/JSNodeIteratorCustom.cpp

Modified: branches/safari-604.1.31-branch/Source/WebCore/ChangeLog (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/ChangeLog	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/ChangeLog	2017-07-13 02:39:28 UTC (rev 219441)
@@ -1,5 +1,24 @@
 2017-07-12  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r219421. rdar://problem/33265549
+
+    2017-07-12  Commit Queue  <commit-qu...@webkit.org>
+
+            Unreviewed, rolling out r219361.
+            https://bugs.webkit.org/show_bug.cgi?id=174434
+
+            Huge PLUM memory regression on iOS (Requested by kling on
+            #webkit).
+
+            Reverted changeset:
+
+            "[WebIDL] Convert MutationCallback to be a normal generate
+            callback"
+            https://bugs.webkit.org/show_bug.cgi?id=174140
+            http://trac.webkit.org/changeset/219361
+
+2017-07-12  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r219427. rdar://problem/33275032
 
     2017-07-12  Commit Queue  <commit-qu...@webkit.org>

Modified: branches/safari-604.1.31-branch/Source/WebCore/DerivedSources.make (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/DerivedSources.make	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/DerivedSources.make	2017-07-13 02:39:28 UTC (rev 219441)
@@ -399,7 +399,6 @@
     $(WebCore)/dom/MessagePort.idl \
     $(WebCore)/dom/MouseEvent.idl \
     $(WebCore)/dom/MouseEventInit.idl \
-    $(WebCore)/dom/MutationCallback.idl \
     $(WebCore)/dom/MutationEvent.idl \
     $(WebCore)/dom/MutationObserver.idl \
     $(WebCore)/dom/MutationRecord.idl \

Modified: branches/safari-604.1.31-branch/Source/WebCore/Modules/mediastream/MediaDevicesRequest.cpp (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/Modules/mediastream/MediaDevicesRequest.cpp	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/Modules/mediastream/MediaDevicesRequest.cpp	2017-07-13 02:39:28 UTC (rev 219441)
@@ -79,7 +79,7 @@
     ContextDestructionObserver::contextDestroyed();
 }
 
-void MediaDevicesRequest::filterDeviceList(Vector<Ref<MediaDeviceInfo>>& devices)
+void MediaDevicesRequest::filterDeviceList(Vector<RefPtr<MediaDeviceInfo>>& devices)
 {
 #if !PLATFORM(COCOA)
     UNUSED_PARAM(devices);
@@ -95,7 +95,7 @@
 
     int cameraCount = 0;
     int microphoneCount = 0;
-    devices.removeAllMatching([&](const Ref<MediaDeviceInfo>& device) -> bool {
+    devices.removeAllMatching([&](const RefPtr<MediaDeviceInfo>& device) -> bool {
         if (device->kind() == MediaDeviceInfo::Kind::Videoinput && ++cameraCount > defaultCameraCount)
             return true;
         if (device->kind() == MediaDeviceInfo::Kind::Audioinput && ++microphoneCount > defaultMicrophoneCount)
@@ -120,7 +120,7 @@
         Document& document = downcast<Document>(*scriptExecutionContext());
         document.setDeviceIDHashSalt(deviceIdentifierHashSalt);
 
-        Vector<Ref<MediaDeviceInfo>> devices;
+        Vector<RefPtr<MediaDeviceInfo>> devices;
         for (auto& deviceInfo : captureDevices) {
             auto label = emptyString();
             if (originHasPersistentAccess || document.hasHadActiveMediaStreamTrack())

Modified: branches/safari-604.1.31-branch/Source/WebCore/Modules/mediastream/MediaDevicesRequest.h (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/Modules/mediastream/MediaDevicesRequest.h	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/Modules/mediastream/MediaDevicesRequest.h	2017-07-13 02:39:28 UTC (rev 219441)
@@ -51,7 +51,7 @@
 
     void contextDestroyed() final;
 
-    void filterDeviceList(Vector<Ref<MediaDeviceInfo>>&);
+    void filterDeviceList(Vector<RefPtr<MediaDeviceInfo>>&);
 
     MediaDevices::EnumerateDevicesPromise m_promise;
     RefPtr<MediaDevicesRequest> m_protector;

Modified: branches/safari-604.1.31-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-07-13 02:39:28 UTC (rev 219441)
@@ -3256,8 +3256,6 @@
 		7C93F34E1AA6BF0700A98BAB /* ContentExtensionCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C93F34C1AA6BF0700A98BAB /* ContentExtensionCompiler.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7C9DBFED1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9DBFEB1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp */; };
 		7C9DBFEE1A9C49B1000D6B25 /* JSHTMLAttachmentElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9DBFEC1A9C49B1000D6B25 /* JSHTMLAttachmentElement.h */; };
-		7CACB6051F1535AD0007101C /* JSMutationCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CACB6031F1535AC0007101C /* JSMutationCallback.cpp */; };
-		7CACB6061F1535AD0007101C /* JSMutationCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CACB6041F1535AC0007101C /* JSMutationCallback.h */; };
 		7CB5CA3F1E525C7100FAEF13 /* MediaQueryExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CB5CA3D1E525C6C00FAEF13 /* MediaQueryExpression.cpp */; };
 		7CB5CA401E525C7300FAEF13 /* MediaQueryExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CB5CA3E1E525C6C00FAEF13 /* MediaQueryExpression.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7CBA5BA71F0B4BDE0034D745 /* JSDOMConvertWebGL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CBA5BA61F0B4BDE0034D745 /* JSDOMConvertWebGL.cpp */; };
@@ -6058,6 +6056,8 @@
 		C6F0902C14327D4F00685849 /* JSMutationObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F0902414327D4F00685849 /* JSMutationObserver.cpp */; };
 		C6F0902D14327D4F00685849 /* JSMutationObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F0902514327D4F00685849 /* JSMutationObserver.h */; };
 		C6F0917F143A2BB900685849 /* JSMutationObserverCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */; };
+		C6F420A216B7164E0052A9F2 /* JSMutationCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F420A016B7164E0052A9F2 /* JSMutationCallback.cpp */; };
+		C6F420A316B7164E0052A9F2 /* JSMutationCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F420A116B7164E0052A9F2 /* JSMutationCallback.h */; };
 		C9026B651B1CF5FE001D99A7 /* JSMediaRemoteControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9026B631B1CF5AB001D99A7 /* JSMediaRemoteControls.cpp */; };
 		C9027F411B1D0AD200BFBFEF /* MediaSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9027F3F1B1D0AD200BFBFEF /* MediaSession.cpp */; };
 		C9027F421B1D0AD200BFBFEF /* MediaSession.h in Headers */ = {isa = PBXBuildFile; fileRef = C9027F401B1D0AD200BFBFEF /* MediaSession.h */; };
@@ -11329,9 +11329,6 @@
 		7C9DBFEA1A9C489F000D6B25 /* HTMLAttachmentElement.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = HTMLAttachmentElement.idl; sourceTree = "<group>"; };
 		7C9DBFEB1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAttachmentElement.cpp; sourceTree = "<group>"; };
 		7C9DBFEC1A9C49B1000D6B25 /* JSHTMLAttachmentElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLAttachmentElement.h; sourceTree = "<group>"; };
-		7CACB6031F1535AC0007101C /* JSMutationCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationCallback.cpp; sourceTree = "<group>"; };
-		7CACB6041F1535AC0007101C /* JSMutationCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMutationCallback.h; sourceTree = "<group>"; };
-		7CACB6071F1535DF0007101C /* MutationCallback.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = MutationCallback.idl; sourceTree = "<group>"; };
 		7CB5CA3D1E525C6C00FAEF13 /* MediaQueryExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaQueryExpression.cpp; sourceTree = "<group>"; };
 		7CB5CA3E1E525C6C00FAEF13 /* MediaQueryExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaQueryExpression.h; sourceTree = "<group>"; };
 		7CBA5BA61F0B4BDE0034D745 /* JSDOMConvertWebGL.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMConvertWebGL.cpp; sourceTree = "<group>"; };
@@ -14572,6 +14569,8 @@
 		C6F0902414327D4F00685849 /* JSMutationObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationObserver.cpp; sourceTree = "<group>"; };
 		C6F0902514327D4F00685849 /* JSMutationObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMutationObserver.h; sourceTree = "<group>"; };
 		C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationObserverCustom.cpp; sourceTree = "<group>"; };
+		C6F420A016B7164E0052A9F2 /* JSMutationCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationCallback.cpp; sourceTree = "<group>"; };
+		C6F420A116B7164E0052A9F2 /* JSMutationCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMutationCallback.h; sourceTree = "<group>"; };
 		C9026B631B1CF5AB001D99A7 /* JSMediaRemoteControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaRemoteControls.cpp; sourceTree = "<group>"; };
 		C9026B641B1CF5AB001D99A7 /* JSMediaRemoteControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaRemoteControls.h; sourceTree = "<group>"; };
 		C9027F3E1B1D0AB900BFBFEF /* MediaSession.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = MediaSession.idl; sourceTree = "<group>"; };
@@ -22062,8 +22061,6 @@
 				BC64649611D82349006455B0 /* JSDOMStringMap.h */,
 				65DF31E509D1CC60000BE325 /* JSElement.cpp */,
 				65DF31E609D1CC60000BE325 /* JSElement.h */,
-				7CACB6031F1535AC0007101C /* JSMutationCallback.cpp */,
-				7CACB6041F1535AC0007101C /* JSMutationCallback.h */,
 				C6F0902414327D4F00685849 /* JSMutationObserver.cpp */,
 				C6F0902514327D4F00685849 /* JSMutationObserver.h */,
 				C6F08FC71431000D00685849 /* JSMutationRecord.cpp */,
@@ -23947,6 +23944,8 @@
 				93B70D4E09EB0C7C009D8468 /* JSEventListener.h */,
 				935F45400F7C3B5F00D7C1FB /* JSLazyEventListener.cpp */,
 				935F45410F7C3B5F00D7C1FB /* JSLazyEventListener.h */,
+				C6F420A016B7164E0052A9F2 /* JSMutationCallback.cpp */,
+				C6F420A116B7164E0052A9F2 /* JSMutationCallback.h */,
 				BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */,
 				BCA378BB0D15F64200B793D6 /* ScheduledAction.h */,
 			);
@@ -25802,7 +25801,6 @@
 				85031B310A44EFC700F992E0 /* MouseRelatedEvent.cpp */,
 				85031B320A44EFC700F992E0 /* MouseRelatedEvent.h */,
 				C6F0900114327B6100685849 /* MutationCallback.h */,
-				7CACB6071F1535DF0007101C /* MutationCallback.idl */,
 				85031B330A44EFC700F992E0 /* MutationEvent.cpp */,
 				85031B340A44EFC700F992E0 /* MutationEvent.h */,
 				93EEC1F309C2877700C515D1 /* MutationEvent.idl */,
@@ -27085,7 +27083,6 @@
 				CD19A2681A13E700008D650E /* DiagnosticLoggingClient.h in Headers */,
 				46FCB6181A70820E00C5A21E /* DiagnosticLoggingKeys.h in Headers */,
 				8372DB311A6780A800C697C5 /* DiagnosticLoggingResultType.h in Headers */,
-				7CACB6061F1535AD0007101C /* JSMutationCallback.h in Headers */,
 				CECADFC7153778FF00E37068 /* DictationAlternative.h in Headers */,
 				CECADFC9153778FF00E37068 /* DictationCommand.h in Headers */,
 				D0BD4F5D1408850F006839B6 /* DictationCommandIOS.h in Headers */,
@@ -28125,6 +28122,7 @@
 				2D6F3E951C1F85550061DBD4 /* JSMockPageOverlay.h in Headers */,
 				A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */,
 				830A36BD1DAC5FAD006D7D09 /* JSMouseEventInit.h in Headers */,
+				C6F420A316B7164E0052A9F2 /* JSMutationCallback.h in Headers */,
 				65DF31FC09D1CC60000BE325 /* JSMutationEvent.h in Headers */,
 				C6F0902D14327D4F00685849 /* JSMutationObserver.h in Headers */,
 				C6F08FCA1431000D00685849 /* JSMutationRecord.h in Headers */,
@@ -30372,7 +30370,8 @@
 		1C09D0501E31C32900725F18 /* libPAL.a */ = {
 			isa = PBXReferenceProxy;
 			fileType = archive.ar;
-			path = libPAL.a;
+			name = libPAL.a;
+			path = lib.a;
 			remoteRef = 1C09D04F1E31C32900725F18 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
@@ -32108,7 +32107,6 @@
 				07277E5217D018CC0015534D /* JSMediaStreamTrack.cpp in Sources */,
 				415CDAF71E6CE0DE004F11EE /* JSMediaStreamTrackCustom.cpp in Sources */,
 				07277E5417D018CC0015534D /* JSMediaStreamTrackEvent.cpp in Sources */,
-				7CACB6051F1535AD0007101C /* JSMutationCallback.cpp in Sources */,
 				932CC0D41DFFD667004C0F9F /* JSMediaTrackConstraints.cpp in Sources */,
 				0787C4691BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.cpp in Sources */,
 				E107400D0E77BDC00033AF24 /* JSMessageChannel.cpp in Sources */,
@@ -32119,6 +32117,7 @@
 				E1ADED470E76B8DD004A1A5E /* JSMessagePortCustom.cpp in Sources */,
 				A86629D209DA2B48009633A5 /* JSMouseEvent.cpp in Sources */,
 				830A36BC1DAC5FAD006D7D09 /* JSMouseEventInit.cpp in Sources */,
+				C6F420A216B7164E0052A9F2 /* JSMutationCallback.cpp in Sources */,
 				65DF31FB09D1CC60000BE325 /* JSMutationEvent.cpp in Sources */,
 				C6F0902C14327D4F00685849 /* JSMutationObserver.cpp in Sources */,
 				C6F0917F143A2BB900685849 /* JSMutationObserverCustom.cpp in Sources */,

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/IDLTypes.h (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/IDLTypes.h	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/IDLTypes.h	2017-07-13 02:39:28 UTC (rev 219441)
@@ -62,9 +62,6 @@
     using ParameterType = T;
     using NullableParameterType = std::optional<ImplementationType>;
 
-    using InnerParameterType = T;
-    using NullableInnerParameterType = std::optional<ImplementationType>;
-
     using NullableType = std::optional<ImplementationType>;
     static NullableType nullValue() { return std::nullopt; }
     static bool isNullValue(const NullableType& value) { return !value; }
@@ -156,9 +153,6 @@
     using ParameterType = T&;
     using NullableParameterType = T*;
 
-    using InnerParameterType = Ref<T>;
-    using NullableInnerParameterType = RefPtr<T>;
-
     using NullableType = RefPtr<T>;
     static inline std::nullptr_t nullValue() { return nullptr; }
     template<typename U> static inline bool isNullValue(U&& value) { return !value; }
@@ -182,9 +176,6 @@
     using ParameterType = typename T::NullableParameterType;
     using NullableParameterType = typename T::NullableParameterType;
 
-    using InnerParameterType = typename T::NullableInnerParameterType;
-    using NullableInnerParameterType = typename T::NullableInnerParameterType;
-
     using NullableType = typename T::NullableType;
     static inline auto nullValue() -> decltype(T::nullValue()) { return T::nullValue(); }
     template<typename U> static inline bool isNullValue(U&& value) { return T::isNullValue(std::forward<U>(value)); }
@@ -194,8 +185,8 @@
 template<typename T> struct IDLSequence : IDLType<Vector<typename T::ImplementationType>> {
     using InnerType = T;
 
-    using ParameterType = const Vector<typename T::InnerParameterType>&;
-    using NullableParameterType = const std::optional<Vector<typename T::InnerParameterType>>&;
+    using ParameterType = const Vector<typename T::ImplementationType>&;
+    using NullableParameterType = const std::optional<Vector<typename T::ImplementationType>>&;
 };
 
 template<typename T> struct IDLFrozenArray : IDLType<Vector<typename T::ImplementationType>> {

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSCallbackData.cpp (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSCallbackData.cpp	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSCallbackData.cpp	2017-07-13 02:39:28 UTC (rev 219441)
@@ -39,7 +39,7 @@
     
 namespace WebCore {
 
-JSValue JSCallbackData::invokeCallback(JSDOMGlobalObject& globalObject, JSObject* callback, JSValue thisValue, MarkedArgumentBuffer& args, CallbackType method, PropertyName functionName, NakedPtr<JSC::Exception>& returnedException)
+JSValue JSCallbackData::invokeCallback(JSDOMGlobalObject& globalObject, JSObject* callback, MarkedArgumentBuffer& args, CallbackType method, PropertyName functionName, NakedPtr<JSC::Exception>& returnedException)
 {
     ASSERT(callback);
 
@@ -79,8 +79,8 @@
 
     returnedException = nullptr;
     JSValue result = context->isDocument()
-        ? JSMainThreadExecState::profiledCall(exec, JSC::ProfilingReason::Other, function, callType, callData, thisValue, args, returnedException)
-        : JSC::profiledCall(exec, JSC::ProfilingReason::Other, function, callType, callData, thisValue, args, returnedException);
+        ? JSMainThreadExecState::profiledCall(exec, JSC::ProfilingReason::Other, function, callType, callData, callback, args, returnedException)
+        : JSC::profiledCall(exec, JSC::ProfilingReason::Other, function, callType, callData, callback, args, returnedException);
 
     InspectorInstrumentation::didCallFunction(cookie, context);
 

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSCallbackData.h (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSCallbackData.h	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSCallbackData.h	2017-07-13 02:39:28 UTC (rev 219441)
@@ -64,7 +64,7 @@
 #endif
     }
     
-    static JSC::JSValue invokeCallback(JSDOMGlobalObject&, JSC::JSObject* callback, JSC::JSValue thisValue, JSC::MarkedArgumentBuffer&, CallbackType, JSC::PropertyName functionName, NakedPtr<JSC::Exception>& returnedException);
+    static JSC::JSValue invokeCallback(JSDOMGlobalObject&, JSC::JSObject* callback, JSC::MarkedArgumentBuffer&, CallbackType, JSC::PropertyName functionName, NakedPtr<JSC::Exception>& returnedException);
 
 private:
     JSC::Weak<JSDOMGlobalObject> m_globalObject;
@@ -83,13 +83,13 @@
 
     JSC::JSObject* callback() { return m_callback.get(); }
 
-    JSC::JSValue invokeCallback(JSC::JSValue thisValue, JSC::MarkedArgumentBuffer& args, CallbackType callbackType, JSC::PropertyName functionName, NakedPtr<JSC::Exception>& returnedException)
+    JSC::JSValue invokeCallback(JSC::MarkedArgumentBuffer& args, CallbackType callbackType, JSC::PropertyName functionName, NakedPtr<JSC::Exception>& returnedException)
     {
         auto* globalObject = this->globalObject();
         if (!globalObject)
             return { };
 
-        return JSCallbackData::invokeCallback(*globalObject, callback(), thisValue, args, callbackType, functionName, returnedException);
+        return JSCallbackData::invokeCallback(*globalObject, callback(), args, callbackType, functionName, returnedException);
     }
 
 private:
@@ -106,13 +106,13 @@
 
     JSC::JSObject* callback() { return m_callback.get(); }
 
-    JSC::JSValue invokeCallback(JSC::JSValue thisValue, JSC::MarkedArgumentBuffer& args, CallbackType callbackType, JSC::PropertyName functionName, NakedPtr<JSC::Exception>& returnedException)
+    JSC::JSValue invokeCallback(JSC::MarkedArgumentBuffer& args, CallbackType callbackType, JSC::PropertyName functionName, NakedPtr<JSC::Exception>& returnedException)
     {
         auto* globalObject = this->globalObject();
         if (!globalObject)
             return { };
 
-        return JSCallbackData::invokeCallback(*globalObject, callback(), thisValue, args, callbackType, functionName, returnedException);
+        return JSCallbackData::invokeCallback(*globalObject, callback(), args, callbackType, functionName, returnedException);
     }
 
 private:

Added: branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSMutationCallback.cpp (0 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSMutationCallback.cpp	                        (rev 0)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSMutationCallback.cpp	2017-07-13 02:39:28 UTC (rev 219441)
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2013 Google 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.
+ */
+
+
+#include "config.h"
+#include "JSMutationCallback.h"
+
+#include "JSDOMConvertInterface.h"
+#include "JSDOMConvertSequences.h"
+#include "JSDOMGlobalObject.h"
+#include "JSMainThreadExecState.h"
+#include "JSMainThreadExecStateInstrumentation.h"
+#include "JSMutationObserver.h"
+#include "JSMutationRecord.h"
+#include "ScriptExecutionContext.h"
+#include <heap/WeakInlines.h>
+#include <runtime/JSLock.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSMutationCallback::JSMutationCallback(JSObject* callback, JSDOMGlobalObject* globalObject)
+    : ActiveDOMCallback(globalObject->scriptExecutionContext())
+    , m_callback(callback)
+    , m_isolatedWorld(globalObject->world())
+{
+}
+
+JSMutationCallback::~JSMutationCallback()
+{
+}
+
+void JSMutationCallback::call(const Vector<Ref<MutationRecord>>& mutations, MutationObserver* observer)
+{
+    if (!canInvokeCallback())
+        return;
+
+    Ref<JSMutationCallback> protectedThis(*this);
+
+    JSLockHolder lock(m_isolatedWorld->vm());
+
+    if (!m_callback)
+        return;
+
+    JSValue callback = m_callback.get();
+    CallData callData;
+    CallType callType = getCallData(callback, callData);
+    if (callType == CallType::None) {
+        ASSERT_NOT_REACHED();
+        return;
+    }
+
+    ScriptExecutionContext* context = scriptExecutionContext();
+    if (!context)
+        return;
+    ASSERT(context->isDocument());
+
+    JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(context, m_isolatedWorld);
+    ExecState* exec = globalObject->globalExec();
+
+    JSValue jsObserver = toJS(exec, globalObject, observer);
+
+    MarkedArgumentBuffer args;
+    args.append(toJS<IDLSequence<IDLInterface<MutationRecord>>>(*exec, *globalObject, mutations));
+    args.append(jsObserver);
+
+    InspectorInstrumentationCookie cookie = JSMainThreadExecState::instrumentFunctionCall(context, callType, callData);
+
+    NakedPtr<JSC::Exception> exception;
+    JSMainThreadExecState::profiledCall(exec, JSC::ProfilingReason::Other, callback, callType, callData, jsObserver, args, exception);
+
+    InspectorInstrumentation::didCallFunction(cookie, context);
+
+    if (exception)
+        reportException(exec, exception);
+}
+
+} // namespace WebCore

Copied: branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSMutationCallback.h (from rev 219439, branches/safari-604.1.31-branch/Source/WebCore/dom/MutationCallback.idl) (0 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSMutationCallback.h	                        (rev 0)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSMutationCallback.h	2017-07-13 02:39:28 UTC (rev 219441)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013 Google 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.
+ */
+
+#pragma once
+
+#include "ActiveDOMCallback.h"
+#include "DOMWrapperWorld.h"
+#include "MutationCallback.h"
+#include <heap/Weak.h>
+#include <runtime/JSObject.h>
+
+namespace WebCore {
+
+class JSDOMGlobalObject;
+
+class JSMutationCallback final : public MutationCallback, public ActiveDOMCallback {
+public:
+    static Ref<JSMutationCallback> create(JSC::JSObject* callback, JSDOMGlobalObject* globalObject)
+    {
+        return adoptRef(*new JSMutationCallback(callback, globalObject));
+    }
+
+    virtual ~JSMutationCallback();
+
+    void call(const Vector<Ref<MutationRecord>>&, MutationObserver*) override;
+    bool canInvokeCallback() const override { return ActiveDOMCallback::canInvokeCallback(); }
+
+private:
+    JSMutationCallback(JSC::JSObject* callback, JSDOMGlobalObject*);
+
+    mutable JSC::Weak<JSC::JSObject> m_callback;
+    Ref<DOMWrapperWorld> m_isolatedWorld;
+};
+
+} // namespace WebCore

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp	2017-07-13 02:39:28 UTC (rev 219441)
@@ -32,12 +32,39 @@
 #include "config.h"
 #include "JSMutationObserver.h"
 
+#include "ExceptionCode.h"
+#include "JSDOMConstructorBase.h"
+#include "JSMutationCallback.h"
 #include "JSNodeCustom.h"
+#include "MutationObserver.h"
+#include <runtime/Error.h>
+#include <runtime/PrivateName.h>
 
 using namespace JSC;
 
 namespace WebCore {
 
+EncodedJSValue JSC_HOST_CALL constructJSMutationObserver(ExecState& exec)
+{
+    VM& vm = exec.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    if (exec.argumentCount() < 1)
+        return throwVMError(&exec, scope, createNotEnoughArgumentsError(&exec));
+
+    JSObject* object = exec.uncheckedArgument(0).getObject();
+    CallData callData;
+    if (!object || object->methodTable()->getCallData(object, callData) == CallType::None)
+        return throwArgumentTypeError(exec, scope, 0, "callback", "MutationObserver", nullptr, "MutationCallback");
+
+    auto* jsConstructor = jsCast<JSDOMConstructorBase*>(exec.jsCallee());
+    auto callback = JSMutationCallback::create(object, jsConstructor->globalObject());
+    JSObject* jsObserver = asObject(toJSNewlyCreated(&exec, jsConstructor->globalObject(), MutationObserver::create(WTFMove(callback))));
+    PrivateName propertyName;
+    jsObserver->putDirect(vm, propertyName, object);
+    return JSValue::encode(jsObserver);
+}
+
 bool JSMutationObserverOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
 {
     for (auto* node : jsCast<JSMutationObserver*>(handle.slot()->asCell())->wrapped().observedNodes()) {

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/CodeGenerator.pm (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/CodeGenerator.pm	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/CodeGenerator.pm	2017-07-13 02:39:28 UTC (rev 219441)
@@ -120,7 +120,6 @@
 my $cachedInterfaces = {};
 my $cachedExternalDictionaries = {};
 my $cachedExternalEnumerations = {};
-my $cachedTypes = {};
 
 sub assert
 {
@@ -370,20 +369,6 @@
     die("Could NOT find interface definition for $interfaceName in $filename");
 }
 
-sub ParseType
-{
-    my ($object, $typeString) = @_;
-
-    return $cachedTypes->{$typeString} if exists($cachedTypes->{$typeString});
-
-    my $parser = IDLParser->new(1);
-    my $type = $parser->ParseType($typeString, $idlAttributes);
-
-    $cachedTypes->{$typeString} = $type;
-
-    return $type;
-}
-
 # Helpers for all CodeGenerator***.pm modules
 
 sub IsNumericType

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2017-07-13 02:39:28 UTC (rev 219441)
@@ -599,10 +599,10 @@
 
     push(@$outputArray, "    auto getterFunctor = [] (auto& thisObject, auto propertyName) -> ${returnType} {\n");
 
-    my @arguments = GenerateCallWithUsingReferences($namedGetterOperation->extendedAttributes->{CallWith}, $outputArray, "std::nullopt", "thisObject", "        ");
-    push(@arguments, "propertyNameToAtomicString(propertyName)");
+    my @args = GenerateCallWithUsingReferences($namedGetterOperation->extendedAttributes->{CallWith}, $outputArray, "std::nullopt", "thisObject", "        ");
+    push(@args, "propertyNameToAtomicString(propertyName)");
 
-    push(@$outputArray, "        auto result = thisObject.wrapped().${namedGetterFunctionName}(" . join(", ", @arguments) . ");\n");
+    push(@$outputArray, "        auto result = thisObject.wrapped().${namedGetterFunctionName}(" . join(", ", @args) . ");\n");
     
     if ($namedGetterOperation->extendedAttributes->{MayThrowException}) {
         push(@$outputArray, "        if (result.hasException())\n");
@@ -5808,7 +5808,6 @@
     push(@$contentRef, "    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);\n") if @{$constants};
 
     push(@$contentRef, "    virtual bool operator==(const ${name}&) const override;\n\n") if $interfaceOrCallback->extendedAttributes->{CallbackNeedsOperatorEqual};
-    push(@$contentRef, "    virtual bool canInvoke() const override { return ActiveDOMCallback::canInvokeCallback(); }\n\n") if $interfaceOrCallback->extendedAttributes->{CallbackNeedsCanInvoke};
 
     # Operations
     my $numOperations = @{$operations};
@@ -5816,14 +5815,6 @@
         push(@$contentRef, "\n    // Functions\n");
         foreach my $operation (@{$operations}) {
             my @arguments = ();
-
-            my $callbackThisObject = $operation->extendedAttributes->{CallbackThisObject};
-            if ($callbackThisObject) {
-                my $thisObjectType = $codeGenerator->ParseType($callbackThisObject);
-                my $IDLType = GetIDLType($interfaceOrCallback, $thisObjectType);
-                push(@arguments, "typename ${IDLType}::ParameterType thisObject");
-            }
-
             foreach my $argument (@{$operation->arguments}) {
                 my $IDLType = GetIDLType($interfaceOrCallback, $argument->type);
                 push(@arguments, "typename ${IDLType}::ParameterType " . $argument->name);
@@ -5955,31 +5946,15 @@
             # FIXME: Change the default name (used for callback functions) to something other than handleEvent. It makes little sense.
             my $functionName = $operation->name || "handleEvent";
 
-            my @arguments = ();
-
-            my $thisValue = "jsUndefined()";
-
-            my $callbackThisObject = $operation->extendedAttributes->{CallbackThisObject};
-            if ($callbackThisObject) {
-                my $thisObjectType = $codeGenerator->ParseType($callbackThisObject);
-
-                AddToIncludesForIDLType($thisObjectType, $includesRef, 1);
-                my $IDLType = GetIDLType($interfaceOrCallback, $thisObjectType);
-                push(@arguments, "typename ${IDLType}::ParameterType thisObject");
-
-                my $thisObjectArgument = IDLArgument->new();
-                $thisObjectArgument->type($thisObjectType);
-
-                $thisValue = NativeToJSValueUsingReferences($thisObjectArgument, $interfaceOrCallback, "thisObject", "globalObject");
-            }
-
+            my @args = ();
             foreach my $argument (@{$operation->arguments}) {
                 AddToIncludesForIDLType($argument->type, $includesRef, 1);
+
                 my $IDLType = GetIDLType($interfaceOrCallback, $argument->type);
-                push(@arguments, "typename ${IDLType}::ParameterType " . $argument->name);
+                push(@args, "typename ${IDLType}::ParameterType " . $argument->name);
             }
             
-            push(@$contentRef, "${nativeReturnType} ${className}::${functionName}(" . join(", ", @arguments) . ")\n");
+            push(@$contentRef, "${nativeReturnType} ${className}::${functionName}(" . join(", ", @args) . ")\n");
             push(@$contentRef, "{\n");
 
             # FIXME: This is needed for NodeFilter, which works even for disconnected iframes. We should investigate
@@ -5995,8 +5970,6 @@
             push(@$contentRef, "    JSLockHolder lock(vm);\n");
 
             push(@$contentRef, "    auto& state = *globalObject.globalExec();\n");
-
-            push(@$contentRef, "    JSValue thisValue = ${thisValue};\n");
             push(@$contentRef, "    MarkedArgumentBuffer args;\n");
 
             foreach my $argument (@{$operation->arguments}) {
@@ -6007,10 +5980,10 @@
 
             my $callbackInvocation;
             if (ref($interfaceOrCallback) eq "IDLCallbackFunction") {
-                $callbackInvocation = "m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Function, Identifier(), returnedException)";
+                $callbackInvocation = "m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException)";
             } else {
                 my $callbackType = $numOperations > 1 ? "Object" : "FunctionOrObject";
-                $callbackInvocation = "m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::${callbackType}, Identifier::fromString(&vm, \"${functionName}\"), returnedException)";
+                $callbackInvocation = "m_data->invokeCallback(args, JSCallbackData::CallbackType::${callbackType}, Identifier::fromString(&vm, \"${functionName}\"), returnedException)";
             }
 
             if ($operation->type->name eq "void") {
@@ -6045,11 +6018,12 @@
         }
     }
 
+    # toJS() implementation.
     push(@$contentRef, "JSC::JSValue toJS(${name}& impl)\n");
     push(@$contentRef, "{\n");
     push(@$contentRef, "    if (!static_cast<${className}&>(impl).callbackData())\n");
     push(@$contentRef, "        return jsNull();\n\n");
-    push(@$contentRef, "    return static_cast<${className}&>(impl).callbackData()->callback();\n");
+    push(@$contentRef, "    return static_cast<${className}&>(impl).callbackData()->callback();\n\n");
     push(@$contentRef, "}\n\n");
 }
 

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/IDLAttributes.json (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/IDLAttributes.json	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/IDLAttributes.json	2017-07-13 02:39:28 UTC (rev 219441)
@@ -31,15 +31,9 @@
         "CachedAttribute": {
             "contextsAllowed": ["attribute"]
         },
-        "CallbackNeedsCanInvoke": {
-            "contextsAllowed": ["callback-function"]
-        },
         "CallbackNeedsOperatorEqual": {
             "contextsAllowed": ["callback-function"]
         },
-        "CallbackThisObject": {
-            "contextsAllowed": ["callback-function", "operation"]
-        },
         "CallWith": {
             "contextsAllowed": ["attribute", "operation"],
             "values": ["Document", "ScriptExecutionContext", "ScriptState", "GlobalObject", "ActiveWindow", "FirstWindow", "ResponsibleDocument", "World"]

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/IDLParser.pm (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/IDLParser.pm	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/IDLParser.pm	2017-07-13 02:39:28 UTC (rev 219441)
@@ -346,30 +346,6 @@
     return $document;
 }
 
-sub ParseType
-{
-    my ($self, $type, $idlAttributes) = @_;
-
-    $self->{Line} = $type;
-    $self->{DocumentContent} = $type;
-    $self->{ExtendedAttributeMap} = $idlAttributes;
-
-    addBuiltinTypedefs();
-
-    my $result;
-
-    $self->getToken();
-    eval {
-        $result = $self->parseType();
-
-        my $next = $self->nextToken();
-        $self->assertTokenType($next, EmptyToken);
-    };
-    assert $@ . " parsing type ${type}" if $@;
-
-    return $result;
-}
-
 sub nextToken
 {
     my $self = shift;

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp	2017-07-13 02:39:28 UTC (rev 219441)
@@ -64,12 +64,11 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
     args.append(toJS<IDLLong>(argument));
 
     NakedPtr<JSC::Exception> returnedException;
-    auto jsResult = m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
+    auto jsResult = m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
     if (returnedException) {
         reportException(&state, returnedException);
         return CallbackResultType::ExceptionThrown;
@@ -87,6 +86,7 @@
         return jsNull();
 
     return static_cast<JSTestCallbackFunction&>(impl).callbackData()->callback();
+
 }
 
 } // namespace WebCore

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp	2017-07-13 02:39:28 UTC (rev 219441)
@@ -67,12 +67,11 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
     args.append(toJS<IDLSequence<IDLLong>>(state, globalObject, argument));
 
     NakedPtr<JSC::Exception> returnedException;
-    auto jsResult = m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
+    auto jsResult = m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
     if (returnedException) {
         auto throwScope = DECLARE_THROW_SCOPE(vm);
         throwException(&state, throwScope, returnedException);
@@ -91,6 +90,7 @@
         return jsNull();
 
     return static_cast<JSTestCallbackFunctionRethrow&>(impl).callbackData()->callback();
+
 }
 
 } // namespace WebCore

Deleted: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp	2017-07-13 02:39:28 UTC (rev 219441)
@@ -1,92 +0,0 @@
-/*
-    This file is part of the WebKit open source project.
-    This file has been generated by generate-bindings.pl. DO NOT MODIFY!
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#include "config.h"
-#include "JSTestCallbackFunctionWithThisObject.h"
-
-#include "JSDOMConvertInterface.h"
-#include "JSDOMConvertSequences.h"
-#include "JSDOMExceptionHandling.h"
-#include "JSDOMGlobalObject.h"
-#include "JSTestNode.h"
-#include "ScriptExecutionContext.h"
-#include <runtime/JSArray.h>
-#include <runtime/JSLock.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-JSTestCallbackFunctionWithThisObject::JSTestCallbackFunctionWithThisObject(JSObject* callback, JSDOMGlobalObject* globalObject)
-    : TestCallbackFunctionWithThisObject()
-    , ActiveDOMCallback(globalObject->scriptExecutionContext())
-    , m_data(new JSCallbackDataStrong(callback, globalObject, this))
-{
-}
-
-JSTestCallbackFunctionWithThisObject::~JSTestCallbackFunctionWithThisObject()
-{
-    ScriptExecutionContext* context = scriptExecutionContext();
-    // When the context is destroyed, all tasks with a reference to a callback
-    // should be deleted. So if the context is 0, we are on the context thread.
-    if (!context || context->isContextThread())
-        delete m_data;
-    else
-        context->postTask(DeleteCallbackDataTask(m_data));
-#ifndef NDEBUG
-    m_data = nullptr;
-#endif
-}
-
-CallbackResult<typename IDLVoid::ImplementationType> JSTestCallbackFunctionWithThisObject::handleEvent(typename IDLInterface<TestNode>::ParameterType thisObject, typename IDLSequence<IDLInterface<TestNode>>::ParameterType parameter)
-{
-    if (!canInvokeCallback())
-        return CallbackResultType::UnableToExecute;
-
-    Ref<JSTestCallbackFunctionWithThisObject> protectedThis(*this);
-
-    auto& globalObject = *m_data->globalObject();
-    auto& vm = globalObject.vm();
-
-    JSLockHolder lock(vm);
-    auto& state = *globalObject.globalExec();
-    JSValue thisValue = toJS<IDLInterface<TestNode>>(state, globalObject, thisObject);
-    MarkedArgumentBuffer args;
-    args.append(toJS<IDLSequence<IDLInterface<TestNode>>>(state, globalObject, parameter));
-
-    NakedPtr<JSC::Exception> returnedException;
-    m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
-    if (returnedException) {
-        reportException(&state, returnedException);
-        return CallbackResultType::ExceptionThrown;
-     }
-
-    return { };
-}
-
-JSC::JSValue toJS(TestCallbackFunctionWithThisObject& impl)
-{
-    if (!static_cast<JSTestCallbackFunctionWithThisObject&>(impl).callbackData())
-        return jsNull();
-
-    return static_cast<JSTestCallbackFunctionWithThisObject&>(impl).callbackData()->callback();
-}
-
-} // namespace WebCore

Deleted: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h	2017-07-13 02:39:28 UTC (rev 219441)
@@ -1,55 +0,0 @@
-/*
-    This file is part of the WebKit open source project.
-    This file has been generated by generate-bindings.pl. DO NOT MODIFY!
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#pragma once
-
-#include "ActiveDOMCallback.h"
-#include "IDLTypes.h"
-#include "JSCallbackData.h"
-#include "TestCallbackFunctionWithThisObject.h"
-#include <wtf/Forward.h>
-
-namespace WebCore {
-
-class JSTestCallbackFunctionWithThisObject final : public TestCallbackFunctionWithThisObject, public ActiveDOMCallback {
-public:
-    static Ref<JSTestCallbackFunctionWithThisObject> create(JSC::JSObject* callback, JSDOMGlobalObject* globalObject)
-    {
-        return adoptRef(*new JSTestCallbackFunctionWithThisObject(callback, globalObject));
-    }
-
-    virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
-
-    virtual ~JSTestCallbackFunctionWithThisObject();
-    JSCallbackDataStrong* callbackData() { return m_data; }
-
-    // Functions
-    virtual CallbackResult<typename IDLVoid::ImplementationType> handleEvent(typename IDLInterface<TestNode>::ParameterType thisObject, typename IDLSequence<IDLInterface<TestNode>>::ParameterType parameter) override;
-
-private:
-    JSTestCallbackFunctionWithThisObject(JSC::JSObject*, JSDOMGlobalObject*);
-
-    JSCallbackDataStrong* m_data;
-};
-
-JSC::JSValue toJS(TestCallbackFunctionWithThisObject&);
-inline JSC::JSValue toJS(TestCallbackFunctionWithThisObject* impl) { return impl ? toJS(*impl) : JSC::jsNull(); }
-
-} // namespace WebCore

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp	2017-07-13 02:39:28 UTC (rev 219441)
@@ -67,13 +67,12 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
     args.append(toJS<IDLSequence<IDLNullable<IDLLong>>>(state, globalObject, sequenceArg));
     args.append(toJS<IDLLong>(longArg));
 
     NakedPtr<JSC::Exception> returnedException;
-    m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
     if (returnedException) {
         reportException(&state, returnedException);
         return CallbackResultType::ExceptionThrown;
@@ -88,6 +87,7 @@
         return jsNull();
 
     return static_cast<JSTestCallbackFunctionWithTypedefs&>(impl).callbackData()->callback();
+
 }
 
 } // namespace WebCore

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp	2017-07-13 02:39:28 UTC (rev 219441)
@@ -35,7 +35,6 @@
 #include "JSDOMGlobalObject.h"
 #include "JSDOMStringList.h"
 #include "JSTestNode.h"
-#include "JSTestObj.h"
 #include "ScriptExecutionContext.h"
 #include "SerializedScriptValue.h"
 #include <runtime/FunctionPrototype.h>
@@ -169,11 +168,10 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
 
     NakedPtr<JSC::Exception> returnedException;
-    m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithNoParam"), returnedException);
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithNoParam"), returnedException);
     if (returnedException) {
         reportException(&state, returnedException);
         return CallbackResultType::ExceptionThrown;
@@ -194,12 +192,11 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
     args.append(toJS<IDLFloat32Array>(state, globalObject, arrayParam));
 
     NakedPtr<JSC::Exception> returnedException;
-    m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithArrayParam"), returnedException);
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithArrayParam"), returnedException);
     if (returnedException) {
         reportException(&state, returnedException);
         return CallbackResultType::ExceptionThrown;
@@ -220,13 +217,12 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
     args.append(toJS<IDLSerializedScriptValue<SerializedScriptValue>>(state, globalObject, srzParam));
     args.append(toJS<IDLDOMString>(state, strParam));
 
     NakedPtr<JSC::Exception> returnedException;
-    m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithSerializedScriptValueParam"), returnedException);
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithSerializedScriptValueParam"), returnedException);
     if (returnedException) {
         reportException(&state, returnedException);
         return CallbackResultType::ExceptionThrown;
@@ -247,12 +243,11 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
     args.append(toJS<IDLInterface<DOMStringList>>(state, globalObject, listParam));
 
     NakedPtr<JSC::Exception> returnedException;
-    m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithStringList"), returnedException);
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithStringList"), returnedException);
     if (returnedException) {
         reportException(&state, returnedException);
         return CallbackResultType::ExceptionThrown;
@@ -273,12 +268,11 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
     args.append(toJS<IDLBoolean>(boolParam));
 
     NakedPtr<JSC::Exception> returnedException;
-    m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithBoolean"), returnedException);
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithBoolean"), returnedException);
     if (returnedException) {
         reportException(&state, returnedException);
         return CallbackResultType::ExceptionThrown;
@@ -299,13 +293,12 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
     args.append(toJS<IDLLong>(longParam));
     args.append(toJS<IDLInterface<TestNode>>(state, globalObject, testNodeParam));
 
     NakedPtr<JSC::Exception> returnedException;
-    m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackRequiresThisToPass"), returnedException);
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackRequiresThisToPass"), returnedException);
     if (returnedException) {
         reportException(&state, returnedException);
         return CallbackResultType::ExceptionThrown;
@@ -326,11 +319,10 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
 
     NakedPtr<JSC::Exception> returnedException;
-    auto jsResult = m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithAReturnValue"), returnedException);
+    auto jsResult = m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithAReturnValue"), returnedException);
     if (returnedException) {
         reportException(&state, returnedException);
         return CallbackResultType::ExceptionThrown;
@@ -354,12 +346,11 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
     args.append(toJS<IDLEnumeration<TestCallbackInterface::Enum>>(state, enumParam));
 
     NakedPtr<JSC::Exception> returnedException;
-    auto jsResult = m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackThatRethrowsExceptions"), returnedException);
+    auto jsResult = m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackThatRethrowsExceptions"), returnedException);
     if (returnedException) {
         auto throwScope = DECLARE_THROW_SCOPE(vm);
         throwException(&state, throwScope, returnedException);
@@ -381,12 +372,11 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
     args.append(toJS<IDLDictionary<TestCallbackInterface::Dictionary>>(state, globalObject, dictionaryParam));
 
     NakedPtr<JSC::Exception> returnedException;
-    auto jsResult = m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackThatSkipsInvokeCheck"), returnedException);
+    auto jsResult = m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackThatSkipsInvokeCheck"), returnedException);
     if (returnedException) {
         reportException(&state, returnedException);
         return CallbackResultType::ExceptionThrown;
@@ -398,35 +388,6 @@
     return WTFMove(returnValue);
 }
 
-CallbackResult<typename IDLDOMString::ImplementationType> JSTestCallbackInterface::callbackWithThisObject(typename IDLInterface<TestNode>::ParameterType thisObject, typename IDLInterface<TestObj>::ParameterType testObjParam)
-{
-    if (!canInvokeCallback())
-        return CallbackResultType::UnableToExecute;
-
-    Ref<JSTestCallbackInterface> protectedThis(*this);
-
-    auto& globalObject = *m_data->globalObject();
-    auto& vm = globalObject.vm();
-
-    JSLockHolder lock(vm);
-    auto& state = *globalObject.globalExec();
-    JSValue thisValue = toJS<IDLInterface<TestNode>>(state, globalObject, thisObject);
-    MarkedArgumentBuffer args;
-    args.append(toJS<IDLInterface<TestObj>>(state, globalObject, testObjParam));
-
-    NakedPtr<JSC::Exception> returnedException;
-    auto jsResult = m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Object, Identifier::fromString(&vm, "callbackWithThisObject"), returnedException);
-    if (returnedException) {
-        reportException(&state, returnedException);
-        return CallbackResultType::ExceptionThrown;
-     }
-
-    auto throwScope = DECLARE_THROW_SCOPE(vm);
-    auto returnValue = convert<IDLDOMString>(state, jsResult);
-    RETURN_IF_EXCEPTION(throwScope, CallbackResultType::ExceptionThrown);
-    return WTFMove(returnValue);
-}
-
 JSC::JSValue toJS(TestCallbackInterface& impl)
 {
     if (!static_cast<JSTestCallbackInterface&>(impl).callbackData())
@@ -433,6 +394,7 @@
         return jsNull();
 
     return static_cast<JSTestCallbackInterface&>(impl).callbackData()->callback();
+
 }
 
 } // namespace WebCore

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h	2017-07-13 02:39:28 UTC (rev 219441)
@@ -56,7 +56,6 @@
     virtual CallbackResult<typename IDLDOMString::ImplementationType> callbackWithAReturnValue() override;
     virtual CallbackResult<typename IDLDOMString::ImplementationType> callbackThatRethrowsExceptions(typename IDLEnumeration<TestCallbackInterface::Enum>::ParameterType enumParam) override;
     virtual CallbackResult<typename IDLDOMString::ImplementationType> callbackThatSkipsInvokeCheck(typename IDLDictionary<TestCallbackInterface::Dictionary>::ParameterType dictionaryParam) override;
-    virtual CallbackResult<typename IDLDOMString::ImplementationType> callbackWithThisObject(typename IDLInterface<TestNode>::ParameterType thisObject, typename IDLInterface<TestObj>::ParameterType testObjParam) override;
 
 private:
     JSTestCallbackInterface(JSC::JSObject*, JSDOMGlobalObject*);

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp	2017-07-13 02:39:28 UTC (rev 219441)
@@ -74,7 +74,6 @@
 
     JSLockHolder lock(vm);
     auto& state = *globalObject.globalExec();
-    JSValue thisValue = jsUndefined();
     MarkedArgumentBuffer args;
     args.append(toJS<IDLFloat32Array>(state, globalObject, arrayParam));
     args.append(toJS<IDLSerializedScriptValue<SerializedScriptValue>>(state, globalObject, srzParam));
@@ -84,7 +83,7 @@
     args.append(toJS<IDLInterface<TestNode>>(state, globalObject, testNodeParam));
 
     NakedPtr<JSC::Exception> returnedException;
-    m_data->invokeCallback(thisValue, args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
     if (returnedException) {
         reportException(&state, returnedException);
         return CallbackResultType::ExceptionThrown;
@@ -99,6 +98,7 @@
         return jsNull();
 
     return static_cast<JSTestVoidCallbackFunction&>(impl).callbackData()->callback();
+
 }
 
 } // namespace WebCore

Deleted: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/TestCallbackFunctionWithThisObject.idl (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/TestCallbackFunctionWithThisObject.idl	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/TestCallbackFunctionWithThisObject.idl	2017-07-13 02:39:28 UTC (rev 219441)
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2015 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.
- * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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.
- */
-
-[
-    CallbackThisObject=TestNode
-] callback TestCallbackFunctionWithThisObject = void (sequence<TestNode> parameter);

Modified: branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/TestCallbackInterface.idl (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/TestCallbackInterface.idl	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/bindings/scripts/test/TestCallbackInterface.idl	2017-07-13 02:39:28 UTC (rev 219441)
@@ -52,5 +52,4 @@
     DOMString callbackWithAReturnValue();
     [RethrowException] DOMString callbackThatRethrowsExceptions(TestCallbackInterfaceEnum enumParam);
     [SkipCallbackInvokeCheck] DOMString callbackThatSkipsInvokeCheck(TestCallbackInterfaceDictionary dictionaryParam);
-    [CallbackThisObject=TestNode] DOMString callbackWithThisObject(TestObj testObjParam);
 };

Modified: branches/safari-604.1.31-branch/Source/WebCore/css/FontFaceSet.h (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/css/FontFaceSet.h	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/css/FontFaceSet.h	2017-07-13 02:39:28 UTC (rev 219441)
@@ -84,7 +84,7 @@
         PendingPromise(LoadPromise&&);
 
     public:
-        Vector<Ref<FontFace>> faces;
+        Vector<RefPtr<FontFace>> faces;
         LoadPromise promise;
         bool hasReachedTerminalState { false };
     };

Modified: branches/safari-604.1.31-branch/Source/WebCore/dom/MutationCallback.h (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/dom/MutationCallback.h	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/dom/MutationCallback.h	2017-07-13 02:39:28 UTC (rev 219441)
@@ -30,7 +30,6 @@
 
 #pragma once
 
-#include "CallbackResult.h"
 #include <wtf/Ref.h>
 #include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
@@ -44,8 +43,8 @@
 public:
     virtual ~MutationCallback() { }
 
-    virtual CallbackResult<void> handleEvent(MutationObserver&, const Vector<Ref<MutationRecord>>&, MutationObserver&) = 0;
-    virtual bool canInvoke() const = 0;
+    virtual void call(const Vector<Ref<MutationRecord>>&, MutationObserver*) = 0;
+    virtual bool canInvokeCallback() const = 0;
 };
 
 } // namespace WebCore

Deleted: branches/safari-604.1.31-branch/Source/WebCore/dom/MutationCallback.idl (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/dom/MutationCallback.idl	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/dom/MutationCallback.idl	2017-07-13 02:39:28 UTC (rev 219441)
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-
-[
-    CallbackNeedsCanInvoke,
-    CallbackThisObject=MutationObserver
-] callback MutationCallback = void (sequence<MutationRecord> mutations, MutationObserver observer);

Modified: branches/safari-604.1.31-branch/Source/WebCore/dom/MutationObserver.cpp (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/dom/MutationObserver.cpp	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/dom/MutationObserver.cpp	2017-07-13 02:39:28 UTC (rev 219441)
@@ -209,7 +209,7 @@
 
 bool MutationObserver::canDeliver()
 {
-    return m_callback->canInvoke();
+    return m_callback->canInvokeCallback();
 }
 
 void MutationObserver::deliver()
@@ -232,7 +232,7 @@
     Vector<Ref<MutationRecord>> records;
     records.swap(m_records);
 
-    m_callback->handleEvent(*this, records, *this);
+    m_callback->call(records, this);
 }
 
 void MutationObserver::notifyMutationObservers()

Modified: branches/safari-604.1.31-branch/Source/WebCore/dom/MutationObserver.idl (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/dom/MutationObserver.idl	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/dom/MutationObserver.idl	2017-07-13 02:39:28 UTC (rev 219441)
@@ -29,7 +29,7 @@
  */
 
 [
-    Constructor(MutationCallback callback),
+    CustomConstructor(MutationCallback callback),
     CustomIsReachable,
     ImplementationLacksVTable,
     LegacyWindowAlias=WebKitMutationObserver,

Modified: branches/safari-604.1.31-branch/Source/WebCore/page/IntersectionObserverCallback.h (219440 => 219441)


--- branches/safari-604.1.31-branch/Source/WebCore/page/IntersectionObserverCallback.h	2017-07-13 02:39:12 UTC (rev 219440)
+++ branches/safari-604.1.31-branch/Source/WebCore/page/IntersectionObserverCallback.h	2017-07-13 02:39:28 UTC (rev 219441)
@@ -39,7 +39,7 @@
 class IntersectionObserverCallback : public RefCounted<IntersectionObserverCallback> {
 public:
     virtual ~IntersectionObserverCallback() { }
-    virtual CallbackResult<void> handleEvent(const Vector<Ref<IntersectionObserverEntry>>&, IntersectionObserver&) = 0;
+    virtual CallbackResult<void> handleEvent(const Vector<RefPtr<IntersectionObserverEntry>>&, IntersectionObserver&) = 0;
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to