3838#include < wtf/JSONValues.h>
3939#include < wtf/text/WTFString.h>
4040
41- using Inspector::Protocol::Array;
42-
4341namespace Inspector {
4442
4543InjectedScript::InjectedScript ()
@@ -141,7 +139,7 @@ void InjectedScript::getPreview(ErrorString& errorString, const String& objectId
141139 *result = BindingTraits<Inspector::Protocol::Runtime::ObjectPreview>::runtimeCast (WTFMove (resultValue));
142140}
143141
144- void InjectedScript::getProperties (ErrorString& errorString, const String& objectId, bool ownProperties, bool generatePreview, RefPtr<Array <Inspector::Protocol::Runtime::PropertyDescriptor>>* properties)
142+ void InjectedScript::getProperties (ErrorString& errorString, const String& objectId, bool ownProperties, bool generatePreview, RefPtr<JSON ::ArrayOf <Inspector::Protocol::Runtime::PropertyDescriptor>>* properties)
145143{
146144 Deprecated::ScriptFunctionCall function (injectedScriptObject (), ASCIILiteral (" getProperties" ), inspectorEnvironment ()->functionCallHandler ());
147145 function.appendArgument (objectId);
@@ -155,10 +153,10 @@ void InjectedScript::getProperties(ErrorString& errorString, const String& objec
155153 return ;
156154 }
157155
158- *properties = BindingTraits<Array <Inspector::Protocol::Runtime::PropertyDescriptor>>::runtimeCast (WTFMove (result));
156+ *properties = BindingTraits<JSON ::ArrayOf <Inspector::Protocol::Runtime::PropertyDescriptor>>::runtimeCast (WTFMove (result));
159157}
160158
161- void InjectedScript::getDisplayableProperties (ErrorString& errorString, const String& objectId, bool generatePreview, RefPtr<Array <Inspector::Protocol::Runtime::PropertyDescriptor>>* properties)
159+ void InjectedScript::getDisplayableProperties (ErrorString& errorString, const String& objectId, bool generatePreview, RefPtr<JSON ::ArrayOf <Inspector::Protocol::Runtime::PropertyDescriptor>>* properties)
162160{
163161 Deprecated::ScriptFunctionCall function (injectedScriptObject (), ASCIILiteral (" getDisplayableProperties" ), inspectorEnvironment ()->functionCallHandler ());
164162 function.appendArgument (objectId);
@@ -171,10 +169,10 @@ void InjectedScript::getDisplayableProperties(ErrorString& errorString, const St
171169 return ;
172170 }
173171
174- *properties = BindingTraits<Array <Inspector::Protocol::Runtime::PropertyDescriptor>>::runtimeCast (WTFMove (result));
172+ *properties = BindingTraits<JSON ::ArrayOf <Inspector::Protocol::Runtime::PropertyDescriptor>>::runtimeCast (WTFMove (result));
175173}
176174
177- void InjectedScript::getInternalProperties (ErrorString& errorString, const String& objectId, bool generatePreview, RefPtr<Array <Inspector::Protocol::Runtime::InternalPropertyDescriptor>>* properties)
175+ void InjectedScript::getInternalProperties (ErrorString& errorString, const String& objectId, bool generatePreview, RefPtr<JSON ::ArrayOf <Inspector::Protocol::Runtime::InternalPropertyDescriptor>>* properties)
178176{
179177 Deprecated::ScriptFunctionCall function (injectedScriptObject (), ASCIILiteral (" getInternalProperties" ), inspectorEnvironment ()->functionCallHandler ());
180178 function.appendArgument (objectId);
@@ -187,11 +185,11 @@ void InjectedScript::getInternalProperties(ErrorString& errorString, const Strin
187185 return ;
188186 }
189187
190- auto array = BindingTraits<Array <Inspector::Protocol::Runtime::InternalPropertyDescriptor>>::runtimeCast (WTFMove (result));
188+ auto array = BindingTraits<JSON ::ArrayOf <Inspector::Protocol::Runtime::InternalPropertyDescriptor>>::runtimeCast (WTFMove (result));
191189 *properties = array->length () > 0 ? array : nullptr ;
192190}
193191
194- void InjectedScript::getCollectionEntries (ErrorString& errorString, const String& objectId, const String& objectGroup, int startIndex, int numberToFetch, RefPtr<Protocol::Array <Protocol::Runtime::CollectionEntry>>* entries)
192+ void InjectedScript::getCollectionEntries (ErrorString& errorString, const String& objectId, const String& objectGroup, int startIndex, int numberToFetch, RefPtr<JSON ::ArrayOf <Protocol::Runtime::CollectionEntry>>* entries)
195193{
196194 Deprecated::ScriptFunctionCall function (injectedScriptObject (), ASCIILiteral (" getCollectionEntries" ), inspectorEnvironment ()->functionCallHandler ());
197195 function.appendArgument (objectId);
@@ -206,7 +204,7 @@ void InjectedScript::getCollectionEntries(ErrorString& errorString, const String
206204 return ;
207205 }
208206
209- *entries = BindingTraits<Array <Protocol::Runtime::CollectionEntry>>::runtimeCast (WTFMove (result));
207+ *entries = BindingTraits<JSON ::ArrayOf <Protocol::Runtime::CollectionEntry>>::runtimeCast (WTFMove (result));
210208}
211209
212210void InjectedScript::saveResult (ErrorString& errorString, const String& callArgumentJSON, Inspector::Protocol::OptOutput<int >* savedResultIndex)
@@ -226,7 +224,7 @@ void InjectedScript::saveResult(ErrorString& errorString, const String& callArgu
226224 *savedResultIndex = savedResultIndexInt;
227225}
228226
229- Ref<Array <Inspector::Protocol::Debugger::CallFrame>> InjectedScript::wrapCallFrames (JSC ::JSValue callFrames) const
227+ Ref<JSON ::ArrayOf <Inspector::Protocol::Debugger::CallFrame>> InjectedScript::wrapCallFrames (JSC ::JSValue callFrames) const
230228{
231229 ASSERT (!hasNoValue ());
232230 Deprecated::ScriptFunctionCall function (injectedScriptObject (), ASCIILiteral (" wrapCallFrames" ), inspectorEnvironment ()->functionCallHandler ());
@@ -235,13 +233,13 @@ Ref<Array<Inspector::Protocol::Debugger::CallFrame>> InjectedScript::wrapCallFra
235233 bool hadException = false ;
236234 auto callFramesValue = callFunctionWithEvalEnabled (function, hadException);
237235 if (!callFramesValue)
238- return Array <Inspector::Protocol::Debugger::CallFrame>::create ();
236+ return JSON ::ArrayOf <Inspector::Protocol::Debugger::CallFrame>::create ();
239237 ASSERT (!hadException);
240238 RefPtr<JSON ::Value> result = toInspectorValue (*scriptState (), callFramesValue);
241239 if (result->type () == JSON ::Value::Type::Array)
242- return BindingTraits<Array <Inspector::Protocol::Debugger::CallFrame>>::runtimeCast (WTFMove (result)).releaseNonNull ();
240+ return BindingTraits<JSON ::ArrayOf <Inspector::Protocol::Debugger::CallFrame>>::runtimeCast (WTFMove (result)).releaseNonNull ();
243241
244- return Array <Inspector::Protocol::Debugger::CallFrame>::create ();
242+ return JSON ::ArrayOf <Inspector::Protocol::Debugger::CallFrame>::create ();
245243}
246244
247245RefPtr<Inspector::Protocol::Runtime::RemoteObject> InjectedScript::wrapObject (JSC ::JSValue value, const String& groupName, bool generatePreview) const
0 commit comments