File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -225,9 +225,19 @@ impl Value {
225
225
Value :: String ( value) => {
226
226
Avm2Value :: String ( AvmString :: new_utf8 ( activation. context . gc_context , value) )
227
227
}
228
- Value :: Object ( _values) => {
229
- tracing:: warn!( "into_avm2 needs to be implemented for Value::Object" ) ;
230
- Avm2Value :: Undefined
228
+ Value :: Object ( values) => {
229
+ let obj = activation
230
+ . avm2 ( )
231
+ . classes ( )
232
+ . object
233
+ . construct ( activation, & [ ] )
234
+ . unwrap ( ) ;
235
+ for ( key, value) in values. into_iter ( ) {
236
+ let key = AvmString :: new_utf8 ( activation. context . gc_context , key) ;
237
+ let value = value. into_avm2 ( activation) ;
238
+ obj. set_public_property ( key, value, activation) . unwrap ( ) ;
239
+ }
240
+ Avm2Value :: Object ( obj)
231
241
}
232
242
Value :: List ( values) => {
233
243
let storage = values
You can’t perform that action at this time.
0 commit comments