| 129 | } |
| 130 | |
| 131 | inline JSValueRef toRef(JSC::ExecState* exec, JSC::JSValue v) |
| 132 | { |
| 133 | ASSERT(exec->vm().currentThreadIsHoldingAPILock()); |
| 134 | #if USE(JSVALUE32_64) |
| 135 | if (!v) |
| 136 | return 0; |
| 137 | if (!v.isCell()) |
| 138 | return reinterpret_cast<JSValueRef>(JSC::jsAPIValueWrapper(exec, v).asCell()); |
| 139 | return reinterpret_cast<JSValueRef>(v.asCell()); |
| 140 | #else |
| 141 | UNUSED_PARAM(exec); |
| 142 | return reinterpret_cast<JSValueRef>(JSC::JSValue::encode(v)); |
| 143 | #endif |
| 144 | } |
| 145 | |
| 146 | inline JSObjectRef toRef(JSC::JSObject* o) |
| 147 | { |
no test coverage detected