Replace WTF::move with WTFMove
[WebKit-https.git] / Source / JavaScriptCore / inspector / scripts / tests / expected / type-declaration-object-type.json-result
index fae834b..86051c6 100644 (file)
 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
 
 #include "InspectorProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
 #include <JavaScriptCore/InspectorBackendDispatcher.h>
 
 namespace Inspector {
 
-class AlternateInspectorBackendDispatcher {
+class AlternateBackendDispatcher {
 public:
-    void setBackendDispatcher(RefPtr<InspectorBackendDispatcher>&& dispatcher) { m_backendDispatcher = WTF::move(dispatcher); }
-    InspectorBackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+    void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+    BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
 private:
-    RefPtr<InspectorBackendDispatcher> m_backendDispatcher;
+    RefPtr<BackendDispatcher> m_backendDispatcher;
 };
 
 
@@ -123,8 +124,6 @@ private:
 #ifndef InspectorBackendDispatchers_h
 #define InspectorBackendDispatchers_h
 
-#if ENABLE(INSPECTOR)
-
 #include "InspectorProtocolObjects.h"
 #include <inspector/InspectorBackendDispatcher.h>
 #include <wtf/text/WTFString.h>
@@ -137,8 +136,6 @@ typedef String ErrorString;
 
 } // namespace Inspector
 
-#endif // ENABLE(INSPECTOR)
-
 #endif // !defined(InspectorBackendDispatchers_h)
 ### End File: InspectorBackendDispatchers.h
 
@@ -176,10 +173,9 @@ typedef String ErrorString;
 #include "config.h"
 #include "InspectorBackendDispatchers.h"
 
-#if ENABLE(INSPECTOR)
-
-#include <inspector/InspectorFrontendChannel.h>
+#include <inspector/InspectorFrontendRouter.h>
 #include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/CString.h>
 
 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
@@ -192,8 +188,6 @@ namespace Inspector {
 
 } // namespace Inspector
 
-#endif // ENABLE(INSPECTOR)
-
 ### End File: InspectorBackendDispatchers.cpp
 
 ### Begin File: InspectorFrontendDispatchers.h
@@ -230,21 +224,16 @@ namespace Inspector {
 #ifndef InspectorFrontendDispatchers_h
 #define InspectorFrontendDispatchers_h
 
-#if ENABLE(INSPECTOR)
-
 #include "InspectorProtocolObjects.h"
-#include <inspector/InspectorFrontendChannel.h>
 #include <inspector/InspectorValues.h>
 #include <wtf/text/WTFString.h>
 
 namespace Inspector {
 
-
+class FrontendRouter;
 
 } // namespace Inspector
 
-#endif // ENABLE(INSPECTOR)
-
 #endif // !defined(InspectorFrontendDispatchers_h)
 ### End File: InspectorFrontendDispatchers.h
 
@@ -282,16 +271,13 @@ namespace Inspector {
 #include "config.h"
 #include "InspectorFrontendDispatchers.h"
 
-#if ENABLE(INSPECTOR)
-
+#include "InspectorFrontendRouter.h"
 #include <wtf/text/CString.h>
 
 namespace Inspector {
 
 } // namespace Inspector
 
-#endif // ENABLE(INSPECTOR)
-
 ### End File: InspectorFrontendDispatchers.cpp
 
 ### Begin File: InspectorProtocolObjects.h
@@ -328,8 +314,6 @@ namespace Inspector {
 #ifndef InspectorProtocolObjects_h
 #define InspectorProtocolObjects_h
 
-#if ENABLE(INSPECTOR)
-
 #include <inspector/InspectorProtocolTypes.h>
 #include <wtf/Assertions.h>
 
@@ -354,7 +338,11 @@ class ParameterBundle;
 // End of forward declarations.
 
 
-
+// Typedefs.
+namespace Database {
+typedef Inspector::Protocol::Array<Inspector::Protocol::Database::Error> ErrorList;
+} // Database
+// End of typedefs.
 
 String getEnumConstantValue(int code);
 
@@ -377,15 +365,15 @@ public:
     template<int STATE>
     class Builder {
     private:
-        RefPtr<Inspector::InspectorObject> m_result;
+        RefPtr<InspectorObject> m_result;
 
         template<int STEP> Builder<STATE | STEP>& castState()
         {
             return *reinterpret_cast<Builder<STATE | STEP>*>(this);
         }
 
-        Builder(Ref</*Error*/Inspector::InspectorObject>&& object)
-            : m_result(WTF::move(object))
+        Builder(Ref</*Error*/InspectorObject>&& object)
+            : m_result(WTFMove(object))
         {
             COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
         }
@@ -409,10 +397,10 @@ public:
         Ref<Error> release()
         {
             COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
-            COMPILE_ASSERT(sizeof(Error) == sizeof(Inspector::InspectorObject), cannot_cast);
+            COMPILE_ASSERT(sizeof(Error) == sizeof(InspectorObject), cannot_cast);
 
-            Ref<Inspector::InspectorObject> result = m_result.releaseNonNull();
-            return WTF::move(*reinterpret_cast<Ref<Error>*>(&result));
+            Ref<InspectorObject> result = m_result.releaseNonNull();
+            return WTFMove(*reinterpret_cast<Ref<Error>*>(&result));
         }
     };
 
@@ -425,7 +413,7 @@ public:
      */
     static Builder<NoFieldsSet> create()
     {
-        return Builder<NoFieldsSet>(Inspector::InspectorObject::create());
+        return Builder<NoFieldsSet>(InspectorObject::create());
     }
 };
 
@@ -439,15 +427,15 @@ public:
     template<int STATE>
     class Builder {
     private:
-        RefPtr<Inspector::InspectorObject> m_result;
+        RefPtr<InspectorObject> m_result;
 
         template<int STEP> Builder<STATE | STEP>& castState()
         {
             return *reinterpret_cast<Builder<STATE | STEP>*>(this);
         }
 
-        Builder(Ref</*OptionalParameterBundle*/Inspector::InspectorObject>&& object)
-            : m_result(WTF::move(object))
+        Builder(Ref</*OptionalParameterBundle*/InspectorObject>&& object)
+            : m_result(WTFMove(object))
         {
             COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
         }
@@ -457,10 +445,10 @@ public:
         Ref<OptionalParameterBundle> release()
         {
             COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
-            COMPILE_ASSERT(sizeof(OptionalParameterBundle) == sizeof(Inspector::InspectorObject), cannot_cast);
+            COMPILE_ASSERT(sizeof(OptionalParameterBundle) == sizeof(InspectorObject), cannot_cast);
 
-            Ref<Inspector::InspectorObject> result = m_result.releaseNonNull();
-            return WTF::move(*reinterpret_cast<Ref<OptionalParameterBundle>*>(&result));
+            Ref<InspectorObject> result = m_result.releaseNonNull();
+            return WTFMove(*reinterpret_cast<Ref<OptionalParameterBundle>*>(&result));
         }
     };
 
@@ -471,12 +459,12 @@ public:
      */
     static Builder<NoFieldsSet> create()
     {
-        return Builder<NoFieldsSet>(Inspector::InspectorObject::create());
+        return Builder<NoFieldsSet>(InspectorObject::create());
     }
 
     void setColumnNames(RefPtr<Inspector::Protocol::Array<String>> value)
     {
-        InspectorObjectBase::setArray(ASCIILiteral("columnNames"), WTF::move(value));
+        InspectorObjectBase::setArray(ASCIILiteral("columnNames"), WTFMove(value));
     }
 
     void setNotes(const String& value)
@@ -491,17 +479,22 @@ public:
 
     void setValues(RefPtr<Inspector::InspectorObject> value)
     {
-        InspectorObjectBase::setObject(ASCIILiteral("values"), WTF::move(value));
+        InspectorObjectBase::setObject(ASCIILiteral("values"), WTFMove(value));
     }
 
     void setPayload(RefPtr<Inspector::InspectorValue> value)
     {
-        InspectorObjectBase::setValue(ASCIILiteral("payload"), WTF::move(value));
+        InspectorObjectBase::setValue(ASCIILiteral("payload"), WTFMove(value));
     }
 
     void setError(RefPtr<Inspector::Protocol::Database::Error> value)
     {
-        InspectorObjectBase::setObject(ASCIILiteral("error"), WTF::move(value));
+        InspectorObjectBase::setObject(ASCIILiteral("error"), WTFMove(value));
+    }
+
+    void setErrorList(RefPtr<Inspector::Protocol::Database::ErrorList> value)
+    {
+        InspectorObjectBase::setArray(ASCIILiteral("errorList"), WTFMove(value));
     }
 };
 
@@ -515,21 +508,22 @@ public:
         ValuesSet = 1 << 3,
         PayloadSet = 1 << 4,
         ErrorSet = 1 << 5,
-        AllFieldsSet = (ColumnNamesSet | NotesSet | TimestampSet | ValuesSet | PayloadSet | ErrorSet)
+        ErrorListSet = 1 << 6,
+        AllFieldsSet = (ColumnNamesSet | NotesSet | TimestampSet | ValuesSet | PayloadSet | ErrorSet | ErrorListSet)
     };
 
     template<int STATE>
     class Builder {
     private:
-        RefPtr<Inspector::InspectorObject> m_result;
+        RefPtr<InspectorObject> m_result;
 
         template<int STEP> Builder<STATE | STEP>& castState()
         {
             return *reinterpret_cast<Builder<STATE | STEP>*>(this);
         }
 
-        Builder(Ref</*ParameterBundle*/Inspector::InspectorObject>&& object)
-            : m_result(WTF::move(object))
+        Builder(Ref</*ParameterBundle*/InspectorObject>&& object)
+            : m_result(WTFMove(object))
         {
             COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
         }
@@ -578,13 +572,20 @@ public:
             return castState<ErrorSet>();
         }
 
+        Builder<STATE | ErrorListSet>& setErrorList(RefPtr<Inspector::Protocol::Database::ErrorList> value)
+        {
+            COMPILE_ASSERT(!(STATE & ErrorListSet), property_errorList_already_set);
+            m_result->setArray(ASCIILiteral("errorList"), value);
+            return castState<ErrorListSet>();
+        }
+
         Ref<ParameterBundle> release()
         {
             COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
-            COMPILE_ASSERT(sizeof(ParameterBundle) == sizeof(Inspector::InspectorObject), cannot_cast);
+            COMPILE_ASSERT(sizeof(ParameterBundle) == sizeof(InspectorObject), cannot_cast);
 
-            Ref<Inspector::InspectorObject> result = m_result.releaseNonNull();
-            return WTF::move(*reinterpret_cast<Ref<ParameterBundle>*>(&result));
+            Ref<InspectorObject> result = m_result.releaseNonNull();
+            return WTFMove(*reinterpret_cast<Ref<ParameterBundle>*>(&result));
         }
     };
 
@@ -597,11 +598,12 @@ public:
      *     .setValues(...)
      *     .setPayload(...)
      *     .setError(...)
+     *     .setErrorList(...)
      *     .release();
      */
     static Builder<NoFieldsSet> create()
     {
-        return Builder<NoFieldsSet>(Inspector::InspectorObject::create());
+        return Builder<NoFieldsSet>(InspectorObject::create());
     }
 };
 
@@ -621,15 +623,15 @@ public:
     template<int STATE>
     class Builder {
     private:
-        RefPtr<Inspector::InspectorObject> m_result;
+        RefPtr<InspectorObject> m_result;
 
         template<int STEP> Builder<STATE | STEP>& castState()
         {
             return *reinterpret_cast<Builder<STATE | STEP>*>(this);
         }
 
-        Builder(Ref</*ObjectWithPropertyNameConflicts*/Inspector::InspectorObject>&& object)
-            : m_result(WTF::move(object))
+        Builder(Ref</*ObjectWithPropertyNameConflicts*/InspectorObject>&& object)
+            : m_result(WTFMove(object))
         {
             COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
         }
@@ -674,10 +676,10 @@ public:
         Ref<ObjectWithPropertyNameConflicts> release()
         {
             COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
-            COMPILE_ASSERT(sizeof(ObjectWithPropertyNameConflicts) == sizeof(Inspector::InspectorObject), cannot_cast);
+            COMPILE_ASSERT(sizeof(ObjectWithPropertyNameConflicts) == sizeof(InspectorObject), cannot_cast);
 
-            Ref<Inspector::InspectorObject> result = m_result.releaseNonNull();
-            return WTF::move(*reinterpret_cast<Ref<ObjectWithPropertyNameConflicts>*>(&result));
+            Ref<InspectorObject> result = m_result.releaseNonNull();
+            return WTFMove(*reinterpret_cast<Ref<ObjectWithPropertyNameConflicts>*>(&result));
         }
     };
 
@@ -693,7 +695,7 @@ public:
      */
     static Builder<NoFieldsSet> create()
     {
-        return Builder<NoFieldsSet>(Inspector::InspectorObject::create());
+        return Builder<NoFieldsSet>(InspectorObject::create());
     }
 };
 
@@ -716,15 +718,15 @@ public:
     template<int STATE>
     class Builder {
     private:
-        RefPtr<Inspector::InspectorObject> m_result;
+        RefPtr<InspectorObject> m_result;
 
         template<int STEP> Builder<STATE | STEP>& castState()
         {
             return *reinterpret_cast<Builder<STATE | STEP>*>(this);
         }
 
-        Builder(Ref</*ParameterBundle*/Inspector::InspectorObject>&& object)
-            : m_result(WTF::move(object))
+        Builder(Ref</*ParameterBundle*/InspectorObject>&& object)
+            : m_result(WTFMove(object))
         {
             COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
         }
@@ -776,10 +778,10 @@ public:
         Ref<ParameterBundle> release()
         {
             COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
-            COMPILE_ASSERT(sizeof(ParameterBundle) == sizeof(Inspector::InspectorObject), cannot_cast);
+            COMPILE_ASSERT(sizeof(ParameterBundle) == sizeof(InspectorObject), cannot_cast);
 
-            Ref<Inspector::InspectorObject> result = m_result.releaseNonNull();
-            return WTF::move(*reinterpret_cast<Ref<ParameterBundle>*>(&result));
+            Ref<InspectorObject> result = m_result.releaseNonNull();
+            return WTFMove(*reinterpret_cast<Ref<ParameterBundle>*>(&result));
         }
     };
 
@@ -796,7 +798,7 @@ public:
      */
     static Builder<NoFieldsSet> create()
     {
-        return Builder<NoFieldsSet>(Inspector::InspectorObject::create());
+        return Builder<NoFieldsSet>(InspectorObject::create());
     }
 };
 
@@ -808,8 +810,6 @@ public:
 
 } // namespace Inspector
 
-#endif // ENABLE(INSPECTOR)
-
 #endif // !defined(InspectorProtocolObjects_h)
 ### End File: InspectorProtocolObjects.h
 
@@ -847,8 +847,6 @@ public:
 #include "config.h"
 #include "InspectorProtocolObjects.h"
 
-#if ENABLE(INSPECTOR)
-
 #include <wtf/text/CString.h>
 
 namespace Inspector {
@@ -868,8 +866,6 @@ String getEnumConstantValue(int code) {
 
 } // namespace Inspector
 
-#endif // ENABLE(INSPECTOR)
-
 ### End File: InspectorProtocolObjects.cpp
 
 ### Begin File: RWIProtocolBackendDispatchers.h
@@ -906,8 +902,7 @@ String getEnumConstantValue(int code) {
 #include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
 #include <wtf/RetainPtr.h>
 
-@protocol RWIProtocolDatabaseDomainHandler;
-@protocol RWIProtocolTestDomainHandler;
+
 
 namespace Inspector {
 
@@ -1019,7 +1014,7 @@ using namespace Inspector;
 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocol.h"
+#import <WebInspector/RWIProtocol.h>
 
 __attribute__((visibility ("default")))
 @interface RWIProtocolConfiguration : NSObject
@@ -1064,7 +1059,6 @@ __attribute__((visibility ("default")))
 
 #include "RWIProtocolInternal.h"
 #include "RWIProtocolEnumConversionHelpers.h"
-#include <JavaScriptCore/InspectorFrontendChannel.h>
 #include <JavaScriptCore/InspectorValues.h>
 
 namespace Inspector {
@@ -1113,7 +1107,7 @@ namespace Inspector {
 namespace Inspector {
 
 template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
 
 
 
@@ -1158,7 +1152,6 @@ ObjCEnumType fromProtocolString(String value);
 #import "RWIProtocolInternal.h"
 
 #import "RWIProtocolEnumConversionHelpers.h"
-#import <JavaScriptCore/InspectorFrontendChannel.h>
 #import <JavaScriptCore/InspectorValues.h>
 
 using namespace Inspector;
@@ -1231,17 +1224,19 @@ __attribute__((visibility ("default")))
 /* optional */ @property (nonatomic, retain) RWIProtocolJSONObject *values;
 /* optional */ @property (nonatomic, retain) RWIProtocolJSONObject *payload;
 /* optional */ @property (nonatomic, retain) RWIProtocolDatabaseError *error;
+/* optional */ @property (nonatomic, copy) NSArray/*<RWIProtocolDatabaseError>*/ *errorList;
 @end
 
 __attribute__((visibility ("default")))
 @interface RWIProtocolDatabaseParameterBundle : RWIProtocolJSONObject
-- (instancetype)initWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(RWIProtocolDatabaseError *)error;
+- (instancetype)initWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(RWIProtocolDatabaseError *)error errorList:(NSArray/*<RWIProtocolDatabaseError>*/ *)errorList;
 /* required */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames;
 /* required */ @property (nonatomic, copy) NSString *notes;
 /* required */ @property (nonatomic, assign) double timestamp;
 /* required */ @property (nonatomic, retain) RWIProtocolJSONObject *values;
 /* required */ @property (nonatomic, retain) RWIProtocolJSONObject *payload;
 /* required */ @property (nonatomic, retain) RWIProtocolDatabaseError *error;
+/* required */ @property (nonatomic, copy) NSArray/*<RWIProtocolDatabaseError>*/ *errorList;
 @end
 
 __attribute__((visibility ("default")))
@@ -1417,11 +1412,22 @@ using namespace Inspector;
     return (RWIProtocolDatabaseError *)[super objectForKey:@"error"];
 }
 
+- (void)setErrorList:(NSArray/*<RWIProtocolDatabaseError>*/ *)errorList
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [RWIProtocolDatabaseError class]);
+    [super setInspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];
+}
+
+- (NSArray/*<RWIProtocolDatabaseError>*/ *)errorList
+{
+    return objcArray<RWIProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);
+}
+
 @end
 
 @implementation RWIProtocolDatabaseParameterBundle
 
-- (instancetype)initWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(RWIProtocolDatabaseError *)error;
+- (instancetype)initWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(RWIProtocolDatabaseError *)error errorList:(NSArray/*<RWIProtocolDatabaseError>*/ *)errorList;
 {
     self = [super init];
     if (!self)
@@ -1432,6 +1438,8 @@ using namespace Inspector;
     THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(values, @"values");
     THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload, @"payload");
     THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(error, @"error");
+    THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(errorList, @"errorList");
+    THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [RWIProtocolDatabaseError class]);
 
     self.columnNames = columnNames;
     self.notes = notes;
@@ -1439,6 +1447,7 @@ using namespace Inspector;
     self.values = values;
     self.payload = payload;
     self.error = error;
+    self.errorList = errorList;
 
     return self;
 }
@@ -1503,6 +1512,17 @@ using namespace Inspector;
     return (RWIProtocolDatabaseError *)[super objectForKey:@"error"];
 }
 
+- (void)setErrorList:(NSArray/*<RWIProtocolDatabaseError>*/ *)errorList
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [RWIProtocolDatabaseError class]);
+    [super setInspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];
+}
+
+- (NSArray/*<RWIProtocolDatabaseError>*/ *)errorList
+{
+    return objcArray<RWIProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);
+}
+
 @end
 
 @implementation RWIProtocolDatabaseObjectWithPropertyNameConflicts