| 89 | } |
| 90 | |
| 91 | inline JSC::JSValue toJSForGC(JSC::ExecState* exec, JSValueRef v) |
| 92 | { |
| 93 | ASSERT_UNUSED(exec, exec); |
| 94 | #if USE(JSVALUE32_64) |
| 95 | JSC::JSCell* jsCell = reinterpret_cast<JSC::JSCell*>(const_cast<OpaqueJSValue*>(v)); |
| 96 | if (!jsCell) |
| 97 | return JSC::JSValue(); |
| 98 | JSC::JSValue result = jsCell; |
| 99 | #else |
| 100 | JSC::JSValue result = JSC::JSValue::decode(reinterpret_cast<JSC::EncodedJSValue>(const_cast<OpaqueJSValue*>(v))); |
| 101 | #endif |
| 102 | if (result && result.isCell()) |
| 103 | RELEASE_ASSERT(result.asCell()->methodTable(exec->vm())); |
| 104 | return result; |
| 105 | } |
| 106 | |
| 107 | // Used in JSObjectGetPrivate as that may be called during finalization |
| 108 | inline JSC::JSObject* uncheckedToJS(JSObjectRef o) |