- JSValue *prototype;
- JSValue *constructor;
- if (m_prototype)
- prototype = [JSValue valueWithJSValueRef:toRef(m_prototype.get()) inContext:m_context];
- else
- prototype = objectWithCustomBrand(m_context, [NSString stringWithFormat:@"%sPrototype", className]);
-
- if (m_constructor)
- constructor = [JSValue valueWithJSValueRef:toRef(m_constructor.get()) inContext:m_context];
- else
- constructor = allocateConstructorForCustomClass(m_context, className, m_class);
+ if (!jsPrototype)
+ jsPrototype = objectWithCustomBrand(m_context, [NSString stringWithFormat:@"%sPrototype", className]);