| 220 | } |
| 221 | |
| 222 | void SetCastedObjects(const CallbackInfo& info) { |
| 223 | Env env = info.Env(); |
| 224 | HandleScope scope(env); |
| 225 | |
| 226 | Array ex = Array::New(env); |
| 227 | ex.Set((uint32_t)0, String::New(env, "hello")); |
| 228 | ex.Set(1, String::New(env, "world")); |
| 229 | ex.Set(2, String::New(env, "!")); |
| 230 | |
| 231 | casted_weak = Weak(ex.As<Object>()); |
| 232 | casted_weak.SuppressDestruct(); |
| 233 | |
| 234 | casted_persistent = Persistent(ex.As<Object>()); |
| 235 | casted_persistent.SuppressDestruct(); |
| 236 | |
| 237 | casted_reference = Reference<Object>::New(ex.As<Object>(), 2); |
| 238 | casted_reference.SuppressDestruct(); |
| 239 | } |
| 240 | |
| 241 | // info[0] is a flag to determine if the weak, persistent, or |
| 242 | // multiple reference ObjectReference is being requested. |
nothing calls this directly
no test coverage detected