File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ namespace CefSharp
108108 if (type->IsValueType && !type->IsPrimitive && !type->IsEnum )
109109 {
110110 cli::array<System::Reflection::FieldInfo^>^ fields = type->GetFields ();
111- CefRefPtr<CefV8Value> cefArray = CefV8Value::CreateArray (fields-> Length );
111+ CefRefPtr<CefV8Value> cefObj = CefV8Value::CreateObject ( NULL );
112112
113113 for (int i = 0 ; i < fields->Length ; i++)
114114 {
@@ -122,15 +122,15 @@ namespace CefSharp
122122 {
123123 CefRefPtr<CefV8Value> cefVal = convertToCef (fieldVal, fieldVal->GetType ());
124124
125- cefArray ->SetValue (strFieldName, cefVal, V8_PROPERTY_ATTRIBUTE_NONE);
125+ cefObj ->SetValue (strFieldName, cefVal, V8_PROPERTY_ATTRIBUTE_NONE);
126126 }
127127 else
128128 {
129- cefArray ->SetValue (strFieldName, CefV8Value::CreateNull (), V8_PROPERTY_ATTRIBUTE_NONE);
129+ cefObj ->SetValue (strFieldName, CefV8Value::CreateNull (), V8_PROPERTY_ATTRIBUTE_NONE);
130130 }
131131 }
132132
133- return cefArray ;
133+ return cefObj ;
134134 }
135135 // TODO: What exception type?
136136 throw gcnew Exception (String::Format (" Cannot convert '{0}' object from CLR to CEF." , type->FullName ));
You can’t perform that action at this time.
0 commit comments