X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/ba379fdc102753d6be2c4d937058fe40257329fe..1981f5dfe8d77d97469d20652f712a09400c48ed:/runtime/NumberObject.cpp diff --git a/runtime/NumberObject.cpp b/runtime/NumberObject.cpp index 0e8df17..1fea254 100644 --- a/runtime/NumberObject.cpp +++ b/runtime/NumberObject.cpp @@ -28,23 +28,25 @@ namespace JSC { ASSERT_CLASS_FITS_IN_CELL(NumberObject); +ASSERT_HAS_TRIVIAL_DESTRUCTOR(NumberObject); -const ClassInfo NumberObject::info = { "Number", 0, 0, 0 }; +const ClassInfo NumberObject::s_info = { "Number", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(NumberObject) }; -NumberObject::NumberObject(PassRefPtr structure) - : JSWrapperObject(structure) +NumberObject::NumberObject(JSGlobalData& globalData, Structure* structure) + : JSWrapperObject(globalData, structure) { } -JSValue NumberObject::getJSNumber() +void NumberObject::finishCreation(JSGlobalData& globalData) { - return internalValue(); + Base::finishCreation(globalData); + ASSERT(inherits(&s_info)); } -NumberObject* constructNumber(ExecState* exec, JSValue number) +NumberObject* constructNumber(ExecState* exec, JSGlobalObject* globalObject, JSValue number) { - NumberObject* object = new (exec) NumberObject(exec->lexicalGlobalObject()->numberObjectStructure()); - object->setInternalValue(number); + NumberObject* object = NumberObject::create(exec->globalData(), globalObject->numberObjectStructure()); + object->setInternalValue(exec->globalData(), number); return object; }