Title: [204679] trunk
Revision
204679
Author
wei...@apple.com
Date
2016-08-20 07:44:52 -0700 (Sat, 20 Aug 2016)

Log Message

Location.ancestorOrigins should return a FrozenArray<USVString>
https://bugs.webkit.org/show_bug.cgi?id=161018

Reviewed by Ryosuke Niwa and Chris Dumez.

Source/_javascript_Core:

* runtime/ObjectConstructor.h:
(JSC::objectConstructorFreeze):
Export objectConstructorFreeze so it can be used to freeze DOM FrozenArrays.

Source/WebCore:

Updated tests: fast/dom/Window/Location/ancestor-origins.html
               fast/dom/indexed-getters-returning-string.html

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::transaction):
(WebCore::IDBDatabase::deleteObjectStore):
* Modules/indexeddb/IDBDatabase.h:
Remove unused ScriptExecutionContext parameter.

* Modules/indexeddb/IDBDatabase.idl:
There is no need for a custom implementation anymore.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
Remove JSDOMStringListCustom.cpp, which is no longer needed.

* bindings/js/JSDOMBinding.cpp:
(WebCore::jsArray): Deleted.
Remove overload of jsArray that took a DOMStringList.

* bindings/js/JSDOMBinding.h:
(WebCore::jsFrozenArray):
Add jsFrozenArray which returns an JSArray which has had the moral 
equivalent of Object.freeze() called on it. This follows 
http://heycam.github.io/webidl/#es-frozen-array.

* bindings/js/JSDOMStringListCustom.cpp:
Removed.

* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::transaction): Deleted.
Remove no longer necessary custom implementation of transaction.

* bindings/scripts/CodeGenerator.pm:
(IsRefPtrType):
(IsSVGAnimatedType):
(IsSequenceType):
(GetSequenceType):
(IsFrozenArrayType):
(GetFrozenArrayInnerType):
* bindings/scripts/CodeGeneratorJS.pm:
(AreTypesDistinguishableForOverloadResolution):
(GenerateOverloadedFunctionOrConstructor):
(GetNativeType):
(GetNativeVectorInnerType):
(GetNativeTypeForCallbacks):
(JSValueToNative):
(NativeToJSValue):
* bindings/scripts/IDLParser.pm:
(parseNonAnyType):
Add support for FrozenArray, closely matching the sequence code.

* bindings/scripts/test/JS/JSTestCallback.cpp:
* bindings/scripts/test/JS/JSTestCallback.h:
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunction.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
Updated bindings test results.

* dom/DOMStringList.idl:
Remove JSCustomToNativeObject, which is no longer needed.

* inspector/InspectorIndexedDBAgent.cpp:
Update calls to IDBDatabase::transaction.

* page/Location.cpp:
(WebCore::Location::ancestorOrigins):
* page/Location.h:
Change ancestorOrigins to return a Vector<String> rather than
a DOMStringList.

* page/Location.idl:
Change ancestorOrigins to return a FrozenArray<USVString>, matching
the HTML5 spec.

LayoutTests:

Update existing tests to account for the change in type of Location.ancestorOrigins.

* fast/dom/Window/Location/ancestor-origins-expected.txt:
* fast/dom/Window/Location/ancestor-origins.html:
* fast/dom/indexed-getters-returning-string-expected.txt:
* fast/dom/indexed-getters-returning-string.html:

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (204678 => 204679)


--- trunk/LayoutTests/ChangeLog	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/LayoutTests/ChangeLog	2016-08-20 14:44:52 UTC (rev 204679)
@@ -1,3 +1,17 @@
+2016-08-19  Sam Weinig  <s...@webkit.org>
+
+        Location.ancestorOrigins should return a FrozenArray<USVString>
+        https://bugs.webkit.org/show_bug.cgi?id=161018
+
+        Reviewed by Ryosuke Niwa and Chris Dumez.
+
+        Update existing tests to account for the change in type of Location.ancestorOrigins.
+
+        * fast/dom/Window/Location/ancestor-origins-expected.txt:
+        * fast/dom/Window/Location/ancestor-origins.html:
+        * fast/dom/indexed-getters-returning-string-expected.txt:
+        * fast/dom/indexed-getters-returning-string.html:
+
 2016-08-19  Dean Jackson  <d...@apple.com>
 
         Implement preferLowPowerToHighPerformance for WebGL

Modified: trunk/LayoutTests/fast/dom/Window/Location/ancestor-origins-expected.txt (204678 => 204679)


--- trunk/LayoutTests/fast/dom/Window/Location/ancestor-origins-expected.txt	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/LayoutTests/fast/dom/Window/Location/ancestor-origins-expected.txt	2016-08-20 14:44:52 UTC (rev 204679)
@@ -1,7 +1,16 @@
-ancestorOrigins.length = 0 
+Test the Location object's ancestorOrigins property.
 
---------
-Frame: '<!--framePath //<!--frame0-->-->'
---------
-ancestorOrigins.length = 1
-ancestorOrigins[0] = file://
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS window.location.ancestorOrigins is an instance of Array
+PASS window.location.ancestorOrigins.length is 0
+PASS Object.isFrozen(window.location.ancestorOrigins) is true
+PASS window.location.ancestorOrigins === window.location.ancestorOrigins is true
+PASS subframeOrigins is an instance of Array
+PASS subframeOrigins.length is 1
+PASS subframeOrigins[0] is 'file://'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Modified: trunk/LayoutTests/fast/dom/Window/Location/ancestor-origins.html (204678 => 204679)


--- trunk/LayoutTests/fast/dom/Window/Location/ancestor-origins.html	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/LayoutTests/fast/dom/Window/Location/ancestor-origins.html	2016-08-20 14:44:52 UTC (rev 204679)
@@ -1,16 +1,36 @@
+<head>
+    <script src=""
+    <script src=""
+</head>
+
 <script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.dumpChildFramesAsText();
+
+self.jsTestIsAsync = true;
+
+description("Test the Location object's ancestorOrigins property.")
+
+shouldBeType("window.location.ancestorOrigins", "Array");
+shouldBe("window.location.ancestorOrigins.length", "0");
+shouldBeTrue("Object.isFrozen(window.location.ancestorOrigins)");
+shouldBeTrue("window.location.ancestorOrigins === window.location.ancestorOrigins");
+
+var subframeOrigins;
+
+window._onmessage_ = function(event)
+{
+    subframeOrigins = event.data;
+
+    shouldBeType("subframeOrigins", "Array");
+    shouldBe("subframeOrigins.length", "1");
+    shouldBe("subframeOrigins[0]", "'file://'");
+
+    finishJSTest();
 }
 
-var origins = location.ancestorOrigins;
-document.write('ancestorOrigins.length = ' + origins.length);
 </script>
 <iframe srcdoc="
   <script>
-  var origins = location.ancestorOrigins;
-  document.write('ancestorOrigins.length = ' + origins.length + '<br>');
-  document.write('ancestorOrigins[0] = ' + origins[0]);
+    top.postMessage(location.ancestorOrigins, '*')
   </script>
 "></iframe>
+<script src=""

Modified: trunk/LayoutTests/fast/dom/indexed-getters-returning-string-expected.txt (204678 => 204679)


--- trunk/LayoutTests/fast/dom/indexed-getters-returning-string-expected.txt	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/LayoutTests/fast/dom/indexed-getters-returning-string-expected.txt	2016-08-20 14:44:52 UTC (rev 204679)
@@ -7,9 +7,6 @@
 DOMTokenList.item()
 PASS document.body.classList.item(666) is null
 PASS document.body.classList[666] is undefined.
-DOMStringList.item()
-PASS location.ancestorOrigins.item(666) is null
-PASS location.ancestorOrigins[666] is undefined.
 Storage.getItem()
 PASS localStorage.getItem(666) is null
 PASS localStorage[666] is undefined.

Modified: trunk/LayoutTests/fast/dom/indexed-getters-returning-string.html (204678 => 204679)


--- trunk/LayoutTests/fast/dom/indexed-getters-returning-string.html	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/LayoutTests/fast/dom/indexed-getters-returning-string.html	2016-08-20 14:44:52 UTC (rev 204679)
@@ -11,9 +11,6 @@
 debug("DOMTokenList.item()");
 shouldBeNull("document.body.classList.item(666)");
 shouldBeUndefined("document.body.classList[666]");
-debug("DOMStringList.item()");
-shouldBeNull("location.ancestorOrigins.item(666)");
-shouldBeUndefined("location.ancestorOrigins[666]");
 debug("Storage.getItem()");
 shouldBeNull("localStorage.getItem(666)");
 shouldBeUndefined("localStorage[666]");

Modified: trunk/Source/_javascript_Core/ChangeLog (204678 => 204679)


--- trunk/Source/_javascript_Core/ChangeLog	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-08-20 14:44:52 UTC (rev 204679)
@@ -1,3 +1,14 @@
+2016-08-19  Sam Weinig  <s...@webkit.org>
+
+        Location.ancestorOrigins should return a FrozenArray<USVString>
+        https://bugs.webkit.org/show_bug.cgi?id=161018
+
+        Reviewed by Ryosuke Niwa and Chris Dumez.
+
+        * runtime/ObjectConstructor.h:
+        (JSC::objectConstructorFreeze):
+        Export objectConstructorFreeze so it can be used to freeze DOM FrozenArrays.
+
 2016-08-19  Benjamin Poulain  <bpoul...@apple.com>
 
         [JSC] ArithSqrt should work with any argument type

Modified: trunk/Source/_javascript_Core/runtime/ObjectConstructor.h (204678 => 204679)


--- trunk/Source/_javascript_Core/runtime/ObjectConstructor.h	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/_javascript_Core/runtime/ObjectConstructor.h	2016-08-20 14:44:52 UTC (rev 204679)
@@ -123,7 +123,7 @@
 }
 
 
-JSObject* objectConstructorFreeze(ExecState*, JSObject*);
+JS_EXPORT_PRIVATE JSObject* objectConstructorFreeze(ExecState*, JSObject*);
 JSValue objectConstructorGetPrototypeOf(ExecState*, JSObject*);
 JSValue objectConstructorGetOwnPropertyDescriptor(ExecState*, JSObject*, const Identifier&);
 JSValue objectConstructorGetOwnPropertyDescriptors(ExecState*, JSObject*);

Modified: trunk/Source/WebCore/CMakeLists.txt (204678 => 204679)


--- trunk/Source/WebCore/CMakeLists.txt	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/CMakeLists.txt	2016-08-20 14:44:52 UTC (rev 204679)
@@ -1150,7 +1150,6 @@
     bindings/js/JSDOMPluginArrayCustom.cpp
     bindings/js/JSDOMPluginCustom.cpp
     bindings/js/JSDOMPromise.cpp
-    bindings/js/JSDOMStringListCustom.cpp
     bindings/js/JSDOMStringMapCustom.cpp
     bindings/js/JSDOMWindowBase.cpp
     bindings/js/JSDOMWindowCustom.cpp

Modified: trunk/Source/WebCore/ChangeLog (204678 => 204679)


--- trunk/Source/WebCore/ChangeLog	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/ChangeLog	2016-08-20 14:44:52 UTC (rev 204679)
@@ -1,3 +1,87 @@
+2016-08-19  Sam Weinig  <s...@webkit.org>
+
+        Location.ancestorOrigins should return a FrozenArray<USVString>
+        https://bugs.webkit.org/show_bug.cgi?id=161018
+
+        Reviewed by Ryosuke Niwa and Chris Dumez.
+
+        Updated tests: fast/dom/Window/Location/ancestor-origins.html
+                       fast/dom/indexed-getters-returning-string.html
+
+        * Modules/indexeddb/IDBDatabase.cpp:
+        (WebCore::IDBDatabase::createObjectStore):
+        (WebCore::IDBDatabase::transaction):
+        (WebCore::IDBDatabase::deleteObjectStore):
+        * Modules/indexeddb/IDBDatabase.h:
+        Remove unused ScriptExecutionContext parameter.
+
+        * Modules/indexeddb/IDBDatabase.idl:
+        There is no need for a custom implementation anymore.
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        Remove JSDOMStringListCustom.cpp, which is no longer needed.
+
+        * bindings/js/JSDOMBinding.cpp:
+        (WebCore::jsArray): Deleted.
+        Remove overload of jsArray that took a DOMStringList.
+
+        * bindings/js/JSDOMBinding.h:
+        (WebCore::jsFrozenArray):
+        Add jsFrozenArray which returns an JSArray which has had the moral 
+        equivalent of Object.freeze() called on it. This follows 
+        http://heycam.github.io/webidl/#es-frozen-array.
+
+        * bindings/js/JSDOMStringListCustom.cpp:
+        Removed.
+
+        * bindings/js/JSIDBDatabaseCustom.cpp:
+        (WebCore::JSIDBDatabase::transaction): Deleted.
+        Remove no longer necessary custom implementation of transaction.
+
+        * bindings/scripts/CodeGenerator.pm:
+        (IsRefPtrType):
+        (IsSVGAnimatedType):
+        (IsSequenceType):
+        (GetSequenceType):
+        (IsFrozenArrayType):
+        (GetFrozenArrayInnerType):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (AreTypesDistinguishableForOverloadResolution):
+        (GenerateOverloadedFunctionOrConstructor):
+        (GetNativeType):
+        (GetNativeVectorInnerType):
+        (GetNativeTypeForCallbacks):
+        (JSValueToNative):
+        (NativeToJSValue):
+        * bindings/scripts/IDLParser.pm:
+        (parseNonAnyType):
+        Add support for FrozenArray, closely matching the sequence code.
+
+        * bindings/scripts/test/JS/JSTestCallback.cpp:
+        * bindings/scripts/test/JS/JSTestCallback.h:
+        * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
+        * bindings/scripts/test/JS/JSTestCallbackFunction.h:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+        Updated bindings test results.
+
+        * dom/DOMStringList.idl:
+        Remove JSCustomToNativeObject, which is no longer needed.
+
+        * inspector/InspectorIndexedDBAgent.cpp:
+        Update calls to IDBDatabase::transaction.
+
+        * page/Location.cpp:
+        (WebCore::Location::ancestorOrigins):
+        * page/Location.h:
+        Change ancestorOrigins to return a Vector<String> rather than
+        a DOMStringList.
+
+        * page/Location.idl:
+        Change ancestorOrigins to return a FrozenArray<USVString>, matching
+        the HTML5 spec.
+
 2016-08-19  Chris Dumez  <cdu...@apple.com>
 
         Mark CanvasPath operations' parameters as mandatory when they should be

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (204678 => 204679)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp	2016-08-20 14:44:52 UTC (rev 204679)
@@ -158,7 +158,7 @@
     return adoptRef(&objectStore.leakRef());
 }
 
-RefPtr<WebCore::IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext*, const Vector<String>& objectStores, const String& modeString, ExceptionCodeWithMessage& ec)
+RefPtr<WebCore::IDBTransaction> IDBDatabase::transaction(const Vector<String>& objectStores, const String& modeString, ExceptionCodeWithMessage& ec)
 {
     LOG(IndexedDB, "IDBDatabase::transaction");
 
@@ -211,13 +211,13 @@
     return adoptRef(&transaction.leakRef());
 }
 
-RefPtr<WebCore::IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* context, const String& objectStore, const String& mode, ExceptionCodeWithMessage& ec)
+RefPtr<WebCore::IDBTransaction> IDBDatabase::transaction(const String& objectStore, const String& mode, ExceptionCodeWithMessage& ec)
 {
     ASSERT(currentThread() == originThreadID());
 
     Vector<String> objectStores(1);
     objectStores[0] = objectStore;
-    return transaction(context, objectStores, mode, ec);
+    return transaction(objectStores, mode, ec);
 }
 
 void IDBDatabase::deleteObjectStore(const String& objectStoreName, ExceptionCodeWithMessage& ec)

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h (204678 => 204679)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h	2016-08-20 14:44:52 UTC (rev 204679)
@@ -57,8 +57,8 @@
 
     RefPtr<IDBObjectStore> createObjectStore(const String& name, const Dictionary&, ExceptionCodeWithMessage&);
     RefPtr<IDBObjectStore> createObjectStore(const String& name, const IDBKeyPath&, bool autoIncrement, ExceptionCodeWithMessage&);
-    RefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const Vector<String>&, const String& mode, ExceptionCodeWithMessage&);
-    RefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const String&, const String& mode, ExceptionCodeWithMessage&);
+    RefPtr<IDBTransaction> transaction(const Vector<String>&, const String& mode, ExceptionCodeWithMessage&);
+    RefPtr<IDBTransaction> transaction(const String&, const String& mode, ExceptionCodeWithMessage&);
     void deleteObjectStore(const String& name, ExceptionCodeWithMessage&);
     void close();
 

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl (204678 => 204679)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl	2016-08-20 14:44:52 UTC (rev 204679)
@@ -36,8 +36,11 @@
 
     [Custom, RaisesExceptionWithMessage] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options);
     [RaisesExceptionWithMessage] void deleteObjectStore(DOMString name);
-    [Custom, RaisesExceptionWithMessage] IDBTransaction transaction(DOMString storeName, optional DOMString mode);
-    [Custom, RaisesExceptionWithMessage] IDBTransaction transaction(sequence<DOMString> storeNames, optional DOMString mode);
+    [RaisesExceptionWithMessage] IDBTransaction transaction(DOMString storeName, optional DOMString mode = "readonly");
+    [RaisesExceptionWithMessage] IDBTransaction transaction(sequence<DOMString> storeNames, optional DOMString mode = "readonly");
+    // FIXME: This is not part of the spec, but is needed for compatibility.
+    // See https://github.com/w3c/IndexedDB/issues/85
+    [RaisesExceptionWithMessage] IDBTransaction transaction(DOMStringList storeNames, optional DOMString mode = "readonly");
     void close();
 
     attribute EventHandler onabort;
@@ -44,4 +47,3 @@
     attribute EventHandler onerror;
     attribute EventHandler onversionchange;
 };
-

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (204678 => 204679)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-08-20 14:44:52 UTC (rev 204679)
@@ -3915,7 +3915,6 @@
 		99CC0B6B18BEA1FF006CEBCC /* WebReplayInputs.h in Headers */ = {isa = PBXBuildFile; fileRef = 99CC0B6918BEA1FF006CEBCC /* WebReplayInputs.h */; };
 		99E45A1718A063BE0026D88F /* EventLoopInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 99E45A1618A063BE0026D88F /* EventLoopInput.h */; };
 		9A1142041832D135000BB8AD /* ValueToString.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A1142031832D134000BB8AD /* ValueToString.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		9A1B6F97158869C80011A8C4 /* JSDOMStringListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A1B6F96158869C80011A8C4 /* JSDOMStringListCustom.cpp */; };
 		9A528E8317D7F52F00AA9518 /* FloatingObjects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A528E8117D7F52F00AA9518 /* FloatingObjects.cpp */; };
 		9A528E8417D7F52F00AA9518 /* FloatingObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A528E8217D7F52F00AA9518 /* FloatingObjects.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		9AB1F38018E2489A00534743 /* CSSToLengthConversionData.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AB1F37E18E2489A00534743 /* CSSToLengthConversionData.h */; };
@@ -11491,7 +11490,6 @@
 		99CC0B6918BEA1FF006CEBCC /* WebReplayInputs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebReplayInputs.h; sourceTree = "<group>"; };
 		99E45A1618A063BE0026D88F /* EventLoopInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventLoopInput.h; sourceTree = "<group>"; };
 		9A1142031832D134000BB8AD /* ValueToString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValueToString.h; sourceTree = "<group>"; };
-		9A1B6F96158869C80011A8C4 /* JSDOMStringListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMStringListCustom.cpp; sourceTree = "<group>"; };
 		9A528E8117D7F52F00AA9518 /* FloatingObjects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FloatingObjects.cpp; sourceTree = "<group>"; };
 		9A528E8217D7F52F00AA9518 /* FloatingObjects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FloatingObjects.h; sourceTree = "<group>"; };
 		9AB1F37E18E2489A00534743 /* CSSToLengthConversionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSToLengthConversionData.h; sourceTree = "<group>"; };
@@ -22166,7 +22164,6 @@
 				A9C6E6460D7465CA006442E9 /* JSDOMMimeTypeArrayCustom.cpp */,
 				A9C6E64A0D7465E7006442E9 /* JSDOMPluginArrayCustom.cpp */,
 				A9C6E64B0D7465E7006442E9 /* JSDOMPluginCustom.cpp */,
-				9A1B6F96158869C80011A8C4 /* JSDOMStringListCustom.cpp */,
 				BC64649B11D8238C006455B0 /* JSDOMStringMapCustom.cpp */,
 				BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */,
 				652FBBBB0DE27CB60001D386 /* JSDOMWindowCustom.h */,
@@ -29955,7 +29952,6 @@
 				E172AF8F1811BC3700FBADB9 /* JSDOMPromise.cpp in Sources */,
 				BC5A86B50C3367E800EEA649 /* JSDOMSelection.cpp in Sources */,
 				C5137CF211A58378004ADB99 /* JSDOMStringList.cpp in Sources */,
-				9A1B6F97158869C80011A8C4 /* JSDOMStringListCustom.cpp in Sources */,
 				BC64649711D82349006455B0 /* JSDOMStringMap.cpp in Sources */,
 				BC64649C11D8238C006455B0 /* JSDOMStringMapCustom.cpp in Sources */,
 				7694563C1214D97C0007CBAE /* JSDOMTokenList.cpp in Sources */,

Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (204678 => 204679)


--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp	2016-08-20 14:44:52 UTC (rev 204679)
@@ -58,7 +58,6 @@
 #include "JSDOMPluginArrayCustom.cpp"
 #include "JSDOMPluginCustom.cpp"
 #include "JSDOMPromise.cpp"
-#include "JSDOMStringListCustom.cpp"
 #include "JSDOMStringMapCustom.cpp"
 #include "JSDOMWindowBase.cpp"
 #include "JSDOMWindowCustom.cpp"

Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (204678 => 204679)


--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp	2016-08-20 14:44:52 UTC (rev 204679)
@@ -24,7 +24,6 @@
 
 #include "CachedScript.h"
 #include "DOMConstructorWithDocument.h"
-#include "DOMStringList.h"
 #include "ExceptionCode.h"
 #include "ExceptionCodeDescription.h"
 #include "ExceptionHeaders.h"
@@ -186,16 +185,6 @@
     return static_cast<DateInstance*>(value.toObject(exec))->internalNumber();
 }
 
-JSC::JSValue jsArray(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMStringList* stringList)
-{
-    JSC::MarkedArgumentBuffer list;
-    if (stringList) {
-        for (unsigned i = 0; i < stringList->length(); ++i)
-            list.append(jsStringWithCache(exec, stringList->item(i)));
-    }
-    return JSC::constructArray(exec, 0, globalObject, list);
-}
-
 void reportException(ExecState* exec, JSValue exceptionValue, CachedScript* cachedScript)
 {
     RELEASE_ASSERT(exec->vm().currentThreadIsHoldingAPILock());

Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (204678 => 204679)


--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h	2016-08-20 14:44:52 UTC (rev 204679)
@@ -41,6 +41,7 @@
 #include <runtime/JSCellInlines.h>
 #include <runtime/JSTypedArrays.h>
 #include <runtime/Lookup.h>
+#include <runtime/ObjectConstructor.h>
 #include <runtime/StructureInlines.h>
 #include <runtime/TypedArrayInlines.h>
 #include <runtime/TypedArrays.h>
@@ -60,7 +61,6 @@
 namespace WebCore {
 
 class CachedScript;
-class DOMStringList;
 class DOMWindow;
 class Frame;
 class URL;
@@ -269,7 +269,7 @@
 
 template<typename T, size_t inlineCapacity> JSC::JSValue jsArray(JSC::ExecState*, JSDOMGlobalObject*, const Vector<T, inlineCapacity>&);
 template<typename T, size_t inlineCapacity> JSC::JSValue jsArray(JSC::ExecState*, JSDOMGlobalObject*, const Vector<T, inlineCapacity>*);
-WEBCORE_EXPORT JSC::JSValue jsArray(JSC::ExecState*, JSDOMGlobalObject*, DOMStringList*);
+template<typename T, size_t inlineCapacity> JSC::JSValue jsFrozenArray(JSC::ExecState*, JSDOMGlobalObject*, const Vector<T, inlineCapacity>&);
 
 JSC::JSValue jsPair(JSC::ExecState&, JSDOMGlobalObject*, JSC::JSValue, JSC::JSValue);
 template<typename FirstType, typename SecondType> JSC::JSValue jsPair(JSC::ExecState&, JSDOMGlobalObject*, const FirstType&, const SecondType&);
@@ -631,6 +631,20 @@
     return jsArray(exec, globalObject, *vector);
 }
 
+template<typename T, size_t inlineCapacity> JSC::JSValue jsFrozenArray(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Vector<T, inlineCapacity>& vector)
+{
+    JSC::MarkedArgumentBuffer list;
+    for (auto& element : vector) {
+        list.append(JSValueTraits<T>::arrayJSValue(exec, globalObject, element));
+        if (UNLIKELY(exec->hadException()))
+            return JSC::jsUndefined();
+    }
+    auto* array = JSC::constructArray(exec, nullptr, globalObject, list);
+    if (UNLIKELY(exec->hadException()))
+        return JSC::jsUndefined();
+    return JSC::objectConstructorFreeze(exec, array);
+}
+
 inline JSC::JSValue jsPair(JSC::ExecState& state, JSDOMGlobalObject* globalObject, JSC::JSValue value1, JSC::JSValue value2)
 {
     JSC::MarkedArgumentBuffer args;
@@ -668,7 +682,7 @@
     static inline bool nativeValue(JSC::ExecState& exec, JSC::JSValue jsValue, String& indexedValue)
     {
         indexedValue = jsValue.toWTFString(&exec);
-        return true;
+        return !exec.hadException();
     }
 };
 

Deleted: trunk/Source/WebCore/bindings/js/JSDOMStringListCustom.cpp (204678 => 204679)


--- trunk/Source/WebCore/bindings/js/JSDOMStringListCustom.cpp	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/js/JSDOMStringListCustom.cpp	2016-08-20 14:44:52 UTC (rev 204679)
@@ -1,45 +0,0 @@
-/*
- *  Copyright (C) 2012 Research In Motion Inc. All rights reserved.
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser 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
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include "config.h"
-#include "JSDOMStringList.h"
-
-#include "DOMWrapperWorld.h"
-#include <runtime/JSCJSValueInlines.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-RefPtr<DOMStringList> JSDOMStringList::toWrapped(ExecState& state, JSValue value)
-{
-    if (value.inherits(JSDOMStringList::info()))
-        return &jsCast<JSDOMStringList*>(asObject(value))->wrapped();
-
-    if (!isJSArray(value))
-        return nullptr;
-
-    JSArray* array = asArray(value);
-    RefPtr<DOMStringList> stringList = DOMStringList::create();
-    for (unsigned i = 0; i < array->length(); ++i)
-        stringList->append(array->getIndex(&state, i).toString(&state)->value(&state));
-
-    return stringList;
-}
-
-} // namespace WebCore

Modified: trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp (204678 => 204679)


--- trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp	2016-08-20 14:44:52 UTC (rev 204679)
@@ -82,45 +82,6 @@
     return result;
 }
 
-JSValue JSIDBDatabase::transaction(ExecState& exec)
-{
-    size_t argsCount = std::min<size_t>(2, exec.argumentCount());
-    if (argsCount < 1)
-        return exec.vm().throwException(&exec, createNotEnoughArgumentsError(&exec));
-
-    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec.lexicalGlobalObject())->scriptExecutionContext();
-    if (!scriptContext)
-        return jsUndefined();
-
-    Vector<String> scope;
-    JSValue scopeArg(exec.argument(0));
-    auto domStringList = JSDOMStringList::toWrapped(exec, scopeArg);
-    if (exec.hadException())
-        return jsUndefined();
-
-    if (domStringList)
-        scope = *domStringList;
-    else {
-        scope.append(scopeArg.toString(&exec)->value(&exec));
-        if (exec.hadException())
-            return jsUndefined();
-    }
-
-    String mode;
-    if (argsCount == 2) {
-        JSValue modeArg(exec.argument(1));
-        mode = modeArg.toString(&exec)->value(&exec);
-
-        if (exec.hadException())
-            return jsUndefined();
-    }
-
-    ExceptionCodeWithMessage ec;
-    JSValue result = toJS(&exec, globalObject(), wrapped().transaction(scriptContext, scope, mode, ec));
-    setDOMException(&exec, ec);
-    return result;
 }
 
-}
-
 #endif

Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (204678 => 204679)


--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm	2016-08-20 14:44:52 UTC (rev 204679)
@@ -471,7 +471,7 @@
     return 0 if $object->IsPrimitiveType($type);
     return 0 if $object->IsDictionaryType($type);
     return 0 if $object->IsEnumType($type);
-    return 0 if $object->GetSequenceType($type);
+    return 0 if $object->IsSequenceOrFrozenArrayType($type);
     return 0 if $type eq "DOMString" or $type eq "USVString";
     return 0 if $type eq "any";
 
@@ -517,15 +517,58 @@
     return $type =~ /^SVGAnimated/;
 }
 
-sub GetSequenceType
+sub IsSequenceType
 {
     my $object = shift;
     my $type = shift;
 
+    return $type =~ /^sequence</;
+}
+
+sub GetSequenceInnerType
+{
+    my $object = shift;
+    my $type = shift;
+
     return $1 if $type =~ /^sequence<([\w\d_\s]+)>.*/;
     return "";
 }
 
+sub IsFrozenArrayType
+{
+    my $object = shift;
+    my $type = shift;
+
+    return $type =~ /^FrozenArray</;
+}
+
+sub GetFrozenArrayInnerType
+{
+    my $object = shift;
+    my $type = shift;
+
+    return $1 if $type =~ /^FrozenArray<([\w\d_\s]+)>.*/;
+    return "";
+}
+
+sub IsSequenceOrFrozenArrayType
+{
+    my $object = shift;
+    my $type = shift;
+
+    return $object->IsSequenceType($type) || $object->IsFrozenArrayType($type);
+}
+
+sub GetSequenceOrFrozenArrayInnerType
+{
+    my $object = shift;
+    my $type = shift;
+
+    return $object->GetSequenceInnerType($type) if $object->IsSequenceType($type);
+    return $object->GetFrozenArrayInnerType($type) if $object->IsFrozenArrayType($type);
+    return "";
+}
+
 # These match WK_lcfirst and WK_ucfirst defined in builtins_generator.py.
 # Uppercase the first letter while respecting WebKit style guidelines.
 # E.g., xmlEncoding becomes XMLEncoding, but xmlllang becomes Xmllang.

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (204678 => 204679)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2016-08-20 14:44:52 UTC (rev 204679)
@@ -244,7 +244,7 @@
 
     return 1 if $attribute->isStatic;
     return 1 if $codeGenerator->IsTypedArrayType($propType);
-    return 1 if $codeGenerator->GetSequenceType($propType);
+    return 1 if $codeGenerator->IsSequenceOrFrozenArrayType($propType);
 
     if ($codeGenerator->IsEnumType($propType)) {
         return 1;
@@ -320,7 +320,7 @@
         return 1 if $param->extendedAttributes->{"Clamp"};
         return 1 if $param->type eq "MediaQueryListListener";
         return 1 if $param->type eq "EventListener";
-        return 1 if $codeGenerator->GetSequenceType($param->type);
+        return 1 if $codeGenerator->IsSequenceOrFrozenArrayType($param->type);
     }
 
     # This is for DataTransferItemList.idl add(File) method
@@ -361,7 +361,7 @@
         return 1;
     }
 
-    if ($codeGenerator->GetSequenceType($functionReturnType)) {
+    if ($codeGenerator->IsSequenceOrFrozenArrayType($functionReturnType)) {
         return 1;
     }
 
@@ -1103,7 +1103,7 @@
     my @callImplParams;
     foreach my $param (@{$function->parameters}) {
         my $paramIDLType = $param->type;
-        my $sequenceType = $codeGenerator->GetSequenceType($paramIDLType);
+        my $sequenceType = $codeGenerator->GetSequenceInnerType($paramIDLType);
         $paramIDLType = $sequenceType if $sequenceType ne "";
         my $paramType = GetGlibTypeName($paramIDLType);
         my $const = $paramType eq "gchar*" ? "const " : "";
@@ -1175,7 +1175,7 @@
             last;
         }
         my $paramIDLType = $param->type;
-        my $sequenceType = $codeGenerator->GetSequenceType($paramIDLType);
+        my $sequenceType = $codeGenerator->GetSequenceInnerType($paramIDLType);
         $paramIDLType = $sequenceType if $sequenceType ne "";
         my $paramType = GetGlibTypeName($paramIDLType);
         # $paramType can have a trailing * in some cases

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (204678 => 204679)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-08-20 14:44:52 UTC (rev 204679)
@@ -202,11 +202,11 @@
     # When we're finished with the one-file-per-class reorganization, we won't need these special cases.
     if ($isCallback && $codeGenerator->IsWrapperType($type)) {
         $includesRef->{"JS${type}.h"} = 1;
-    } elsif ($codeGenerator->GetSequenceType($type)) {
-        my $sequenceType = $codeGenerator->GetSequenceType($type);
-        if ($codeGenerator->IsRefPtrType($sequenceType)) {
-            $includesRef->{"JS${sequenceType}.h"} = 1;
-            $includesRef->{"${sequenceType}.h"} = 1;
+    } elsif ($codeGenerator->IsSequenceOrFrozenArrayType($type)) {
+        my $innerType = $codeGenerator->GetSequenceOrFrozenArrayInnerType($type);
+        if ($codeGenerator->IsRefPtrType($innerType)) {
+            $includesRef->{"JS${innerType}.h"} = 1;
+            $includesRef->{"${innerType}.h"} = 1;
         }
         $includesRef->{"<runtime/JSArray.h>"} = 1;
     } else {
@@ -1765,7 +1765,7 @@
     return 0 if &$isDictionary($typeA) && &$isDictionary($typeB);
     return 0 if $codeGenerator->IsCallbackInterface($typeA) && $codeGenerator->IsCallbackInterface($typeB);
     return 0 if &$isCallbackFunctionOrDictionary($typeA) && &$isCallbackFunctionOrDictionary($typeB);
-    return 0 if $codeGenerator->GetSequenceType($typeA) && $codeGenerator->GetSequenceType($typeB);
+    return 0 if $codeGenerator->IsSequenceOrFrozenArrayType($typeA) && $codeGenerator->IsSequenceOrFrozenArrayType($typeB);
     # FIXME: return 0 if typeA and typeB are both exception types.
     return 1;
 }
@@ -1854,9 +1854,9 @@
         my ($type, $optionality, $isNullable) = @_;
         return $type eq "object" || $codeGenerator->IsFunctionOnlyCallbackInterface($type);
     };
-    my $isSequenceParameter = sub {
+    my $isSequenceOrFrozenArrayParameter = sub {
         my ($type, $optionality, $isNullable) = @_;
-        return $codeGenerator->GetSequenceType($type);
+        return $codeGenerator->IsSequenceOrFrozenArrayType($type);
     };
     my $isDictionaryOrObjectOrCallbackInterfaceParameter = sub {
         my ($type, $optionality, $isNullable) = @_;
@@ -1930,7 +1930,7 @@
             &$generateOverloadCallIfNecessary($overload, "distinguishingArg.isFunction()");
 
             # FIXME: Avoid invoking GetMethod(object, Symbol.iterator) again in toNativeArray and toRefPtrNativeArray.
-            $overload = GetOverloadThatMatches($S, $d, \&$isSequenceParameter);
+            $overload = GetOverloadThatMatches($S, $d, \&$isSequenceOrFrozenArrayParameter);
             &$generateOverloadCallIfNecessary($overload, "hasIteratorMethod(*state, distinguishingArg)");
 
             $overload = GetOverloadThatMatches($S, $d, \&$isDictionaryOrObjectOrCallbackInterfaceParameter);
@@ -4497,7 +4497,6 @@
 my %nativeType = (
     "DOMString" => "String",
     "USVString" => "String",
-    "DOMStringList" => "RefPtr<DOMStringList>",
     "DOMTimeStamp" => "DOMTimeStamp",
     "Date" => "double",
     "Dictionary" => "Dictionary",
@@ -4534,8 +4533,7 @@
 
     return "RefPtr<${type}>" if $codeGenerator->IsTypedArrayType($type) and $type ne "ArrayBuffer";
 
-    my $sequenceType = $codeGenerator->GetSequenceType($type);
-    return "Vector<" . GetNativeVectorInnerType($sequenceType) . ">" if $sequenceType;
+    return "Vector<" . GetNativeVectorInnerType($codeGenerator->GetSequenceOrFrozenArrayInnerType($type)) . ">" if $codeGenerator->IsSequenceOrFrozenArrayType($type);
 
     return "${type}*";
 }
@@ -4551,10 +4549,10 @@
 
 sub GetNativeVectorInnerType
 {
-    my $sequenceType = shift;
+    my $innerType = shift;
 
-    return $nativeType{$sequenceType} if exists $nativeType{$sequenceType};
-    return "RefPtr<${sequenceType}>";
+    return $nativeType{$innerType} if exists $nativeType{$innerType};
+    return "RefPtr<$innerType>";
 }
 
 sub GetNativeTypeForCallbacks
@@ -4562,7 +4560,6 @@
     my ($interface, $type) = @_;
 
     return "RefPtr<SerializedScriptValue>&&" if $type eq "SerializedScriptValue";
-    return "RefPtr<DOMStringList>&&" if $type eq "DOMStringList";
     return "const String&" if $codeGenerator->IsStringType($type);
     return GetNativeType($interface, $type);
 }
@@ -4666,13 +4663,13 @@
         return ("Dictionary(state, $value)", 0);
     }
 
-    my $sequenceType = $codeGenerator->GetSequenceType($type);
-    if ($sequenceType) {
-        if ($codeGenerator->IsRefPtrType($sequenceType)) {
-            AddToImplIncludes("JS${sequenceType}.h");
-            return ("toRefPtrNativeArray<${sequenceType}, JS${sequenceType}>(*state, $value)", 1);
+    if ($codeGenerator->IsSequenceOrFrozenArrayType($type)) {
+        my $innerType = $codeGenerator->GetSequenceOrFrozenArrayInnerType($type);
+        if ($codeGenerator->IsRefPtrType($innerType)) {
+            AddToImplIncludes("JS${innerType}.h");
+            return ("toRefPtrNativeArray<${innerType}, JS${innerType}>(*state, $value)", 1);
         }
-        return ("toNativeArray<" . GetNativeVectorInnerType($sequenceType) . ">(*state, $value)", 1);
+        return ("toNativeArray<" . GetNativeVectorInnerType($innerType) . ">(*state, $value)", 1);
     }
 
     return ($value, 0) if $type eq "any";
@@ -4742,14 +4739,15 @@
         AddToImplIncludes("<runtime/JSString.h>", $conditional);
         return "jsStringWithCache(state, $value)";
     }
-    
-    my $sequenceType = $codeGenerator->GetSequenceType($type);
-    if ($sequenceType) {
-        if ($codeGenerator->IsRefPtrType($sequenceType)) {
-            AddToImplIncludes("JS${sequenceType}.h", $conditional);
+
+    if ($codeGenerator->IsSequenceOrFrozenArrayType($type)) {
+        my $innerType = $codeGenerator->GetSequenceOrFrozenArrayInnerType($type);
+        if ($codeGenerator->IsRefPtrType($innerType)) {
+            AddToImplIncludes("JS${innerType}.h", $conditional);
         }
-        AddToImplIncludes("<runtime/JSArray.h>", $conditional);
-        return "jsArray(state, $globalObject, $value)";
+        
+        return "jsArray(state, $globalObject, $value)" if $codeGenerator->IsSequenceType($type);
+        return "jsFrozenArray(state, $globalObject, $value)" if $codeGenerator->IsFrozenArrayType($type);
     }
 
     if ($type eq "any") {

Modified: trunk/Source/WebCore/bindings/scripts/IDLParser.pm (204678 => 204679)


--- trunk/Source/WebCore/bindings/scripts/IDLParser.pm	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/scripts/IDLParser.pm	2016-08-20 14:44:52 UTC (rev 204679)
@@ -2019,6 +2019,21 @@
 
         return $type;
     }
+    if ($next->value() eq "FrozenArray") {
+        $self->assertTokenValue($self->getToken(), "FrozenArray", __LINE__);
+        $self->assertTokenValue($self->getToken(), "<", __LINE__);
+
+        my $subtype = $self->parseType();
+        my $subtypeName = $subtype->name;
+
+        $self->assertTokenValue($self->getToken(), ">", __LINE__);
+
+        # FIXME: This should just be "FrozenArray" when we start using domTypes in the CodeGenerators
+        $type->name("FrozenArray<${subtypeName}>");
+        push(@{$type->subtypes}, $subtype);
+
+        return $type;
+    }
     if ($next->type() == IdentifierToken) {
         my $identifier = $self->getToken();
 

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp (204678 => 204679)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp	2016-08-20 14:44:52 UTC (rev 204679)
@@ -156,7 +156,7 @@
     return !returnedException;
 }
 
-bool JSTestCallback::callbackWithStringList(RefPtr<DOMStringList>&& listParam)
+bool JSTestCallback::callbackWithStringList(DOMStringList* listParam)
 {
     if (!canInvokeCallback())
         return true;

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h (204678 => 204679)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h	2016-08-20 14:44:52 UTC (rev 204679)
@@ -48,7 +48,7 @@
     virtual bool callbackWithSerializedScriptValueParam(RefPtr<SerializedScriptValue>&& srzParam, const String& strArg);
     virtual int32_t callbackWithNonBoolReturnType(const String& strArg);
     virtual int32_t customCallback(Class5* class5Param, Class6* class6Param);
-    virtual bool callbackWithStringList(RefPtr<DOMStringList>&& listParam);
+    virtual bool callbackWithStringList(DOMStringList* listParam);
     virtual bool callbackWithBoolean(bool boolParam);
     virtual bool callbackRequiresThisToPass(int32_t longParam, TestNode* testNodeParam);
 

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp (204678 => 204679)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp	2016-08-20 14:44:52 UTC (rev 204679)
@@ -123,7 +123,7 @@
     return !returnedException;
 }
 
-bool JSTestCallbackFunction::callbackWithStringList(RefPtr<DOMStringList>&& listParam)
+bool JSTestCallbackFunction::callbackWithStringList(DOMStringList* listParam)
 {
     if (!canInvokeCallback())
         return true;

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h (204678 => 204679)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h	2016-08-20 14:44:52 UTC (rev 204679)
@@ -47,7 +47,7 @@
     virtual bool callbackWithSerializedScriptValueParam(RefPtr<SerializedScriptValue>&& srzParam, const String& strArg);
     virtual int32_t callbackWithNonBoolReturnType(const String& strArg);
     virtual int32_t customCallback(Class5* class5Param, Class6* class6Param);
-    virtual bool callbackWithStringList(RefPtr<DOMStringList>&& listParam);
+    virtual bool callbackWithStringList(DOMStringList* listParam);
     virtual bool callbackWithBoolean(bool boolParam);
     virtual bool callbackRequiresThisToPass(int32_t longParam, TestNode* testNodeParam);
 

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (204678 => 204679)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2016-08-20 14:44:52 UTC (rev 204679)
@@ -5569,11 +5569,9 @@
     auto& impl = castedThis->wrapped();
     if (UNLIKELY(state->argumentCount() < 1))
         return throwVMError(state, createNotEnoughArgumentsError(state));
-    RefPtr<DOMStringList> listArg = nullptr;
+    DOMStringList* listArg = nullptr;
     if (!state->argument(0).isUndefinedOrNull()) {
-        listArg = JSDOMStringList::toWrapped(*state, state->uncheckedArgument(0));
-        if (UNLIKELY(state->hadException()))
-            return JSValue::encode(jsUndefined());
+        listArg = JSDOMStringList::toWrapped(state->uncheckedArgument(0));
         if (UNLIKELY(!listArg))
             return throwArgumentTypeError(*state, 0, "listArg", "TestObject", "overloadedMethod", "DOMStringList");
     }
@@ -5950,9 +5948,7 @@
     if (UNLIKELY(state->argumentCount() < 1))
         return throwVMError(state, createNotEnoughArgumentsError(state));
     ExceptionCode ec = 0;
-    auto values = JSDOMStringList::toWrapped(*state, state->argument(0));
-    if (UNLIKELY(state->hadException()))
-        return JSValue::encode(jsUndefined());
+    auto values = JSDOMStringList::toWrapped(state->argument(0));
     if (UNLIKELY(!values))
         return throwArgumentTypeError(*state, 0, "values", "TestObject", "domStringListFunction", "DOMStringList");
     JSValue result = toJS(state, castedThis->globalObject(), impl.domStringListFunction(*values, ec));

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp (204678 => 204679)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp	2016-08-20 14:44:52 UTC (rev 204679)
@@ -29,7 +29,6 @@
 #include "JSMessagePort.h"
 #include "SerializedScriptValue.h"
 #include <runtime/FunctionPrototype.h>
-#include <runtime/JSArray.h>
 #include <wtf/GetPtr.h>
 
 using namespace JSC;

Modified: trunk/Source/WebCore/dom/DOMStringList.idl (204678 => 204679)


--- trunk/Source/WebCore/dom/DOMStringList.idl	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/dom/DOMStringList.idl	2016-08-20 14:44:52 UTC (rev 204679)
@@ -24,8 +24,7 @@
  */
 
 [
-    JSCustomToNativeObject,
-    ImplementationLacksVTable,
+    ImplementationLacksVTable
 ] interface DOMStringList {
     readonly attribute unsigned long length;
     getter DOMString? item(unsigned long index);

Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (204678 => 204679)


--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp	2016-08-20 14:44:52 UTC (rev 204679)
@@ -201,10 +201,10 @@
     return keyPath;
 }
 
-static RefPtr<IDBTransaction> transactionForDatabase(ScriptExecutionContext* scriptExecutionContext, IDBDatabase* idbDatabase, const String& objectStoreName, const String& mode = IDBTransaction::modeReadOnly())
+static RefPtr<IDBTransaction> transactionForDatabase(IDBDatabase* idbDatabase, const String& objectStoreName, const String& mode = IDBTransaction::modeReadOnly())
 {
     ExceptionCodeWithMessage ec;
-    RefPtr<IDBTransaction> idbTransaction = idbDatabase->transaction(scriptExecutionContext, objectStoreName, mode, ec);
+    RefPtr<IDBTransaction> idbTransaction = idbDatabase->transaction(objectStoreName, mode, ec);
     if (ec.code)
         return nullptr;
     return idbTransaction;
@@ -472,7 +472,7 @@
         if (!requestCallback().isActive())
             return;
 
-        RefPtr<IDBTransaction> idbTransaction = transactionForDatabase(context(), &database, m_objectStoreName);
+        RefPtr<IDBTransaction> idbTransaction = transactionForDatabase(&database, m_objectStoreName);
         if (!idbTransaction) {
             m_requestCallback->sendFailure("Could not get transaction");
             return;
@@ -706,7 +706,7 @@
         if (!requestCallback().isActive())
             return;
 
-        RefPtr<IDBTransaction> idbTransaction = transactionForDatabase(context(), &database, m_objectStoreName);
+        RefPtr<IDBTransaction> idbTransaction = transactionForDatabase(&database, m_objectStoreName);
         if (!idbTransaction) {
             m_requestCallback->sendFailure("Could not get transaction");
             return;

Modified: trunk/Source/WebCore/page/Location.cpp (204678 => 204679)


--- trunk/Source/WebCore/page/Location.cpp	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/page/Location.cpp	2016-08-20 14:44:52 UTC (rev 204679)
@@ -132,13 +132,13 @@
     return SecurityOrigin::create(url())->toString();
 }
 
-Ref<DOMStringList> Location::ancestorOrigins() const
+Vector<String> Location::ancestorOrigins() const
 {
-    auto origins = DOMStringList::create();
+    Vector<String> origins;
     if (!m_frame)
         return origins;
     for (Frame* frame = m_frame->tree().parent(); frame; frame = frame->tree().parent())
-        origins->append(frame->document()->securityOrigin()->toString());
+        origins.append(frame->document()->securityOrigin()->toString());
     return origins;
 }
 

Modified: trunk/Source/WebCore/page/Location.h (204678 => 204679)


--- trunk/Source/WebCore/page/Location.h	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/page/Location.h	2016-08-20 14:44:52 UTC (rev 204679)
@@ -72,7 +72,7 @@
 
     String toString() const { return href(); }
 
-    Ref<DOMStringList> ancestorOrigins() const;
+    Vector<String> ancestorOrigins() const;
 
 private:
     explicit Location(Frame*);

Modified: trunk/Source/WebCore/page/Location.idl (204678 => 204679)


--- trunk/Source/WebCore/page/Location.idl	2016-08-20 09:38:41 UTC (rev 204678)
+++ trunk/Source/WebCore/page/Location.idl	2016-08-20 14:44:52 UTC (rev 204679)
@@ -54,7 +54,8 @@
 
     readonly attribute USVString origin;
 
-    readonly attribute DOMStringList ancestorOrigins;
+    // FIXME: Add support for SameObject
+    [Unforgeable, CachedAttribute] readonly attribute FrozenArray<USVString> ancestorOrigins;
 
 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
     [NotEnumerable, Custom, ImplementedAs=toStringFunction] DOMString toString();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to