| 175 | } |
| 176 | |
| 177 | void ObjectInstance::check_js_object_finalized() { |
| 178 | if (!m_uses_toggle_ref) |
| 179 | return; |
| 180 | if (G_UNLIKELY(m_wrapper_finalized)) { |
| 181 | g_critical( |
| 182 | "Object %p (a %s) resurfaced after the JS wrapper was finalized. " |
| 183 | "This is some library doing dubious memory management inside " |
| 184 | "dispose()", |
| 185 | m_ptr.get(), type_name()); |
| 186 | m_wrapper_finalized = false; |
| 187 | g_assert(!m_wrapper); // should associate again with a new wrapper |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | ObjectPrototype* ObjectPrototype::for_gtype(GType gtype) { |
| 192 | return static_cast<ObjectPrototype*>( |