]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/NumberObject.cpp
JavaScriptCore-903.5.tar.gz
[apple/javascriptcore.git] / runtime / NumberObject.cpp
index dc10d8f11d7399f6f9d99287c21e02cbf4709e58..6ee103b38562951e522c5835295a90a6315f2bc7 100644 (file)
@@ -29,22 +29,23 @@ namespace JSC {
 
 ASSERT_CLASS_FITS_IN_CELL(NumberObject);
 
-const ClassInfo NumberObject::info = { "Number", 0, 0, 0 };
+const ClassInfo NumberObject::s_info = { "Number", &JSWrapperObject::s_info, 0, 0 };
 
-NumberObject::NumberObject(PassRefPtr<Structure> structure)
-    : JSWrapperObject(structure)
+NumberObject::NumberObject(JSGlobalData& globalData, Structure* structure)
+    : JSWrapperObject(globalData, structure)
 {
+    ASSERT(inherits(&s_info));
 }
 
-JSValuePtr NumberObject::getJSNumber()
+JSValue NumberObject::getJSNumber()
 {
     return internalValue();
 }
 
-NumberObject* constructNumber(ExecState* exec, JSValuePtr number)
+NumberObject* constructNumber(ExecState* exec, JSGlobalObject* globalObject, JSValue number)
 {
-    NumberObject* object = new (exec) NumberObject(exec->lexicalGlobalObject()->numberObjectStructure());
-    object->setInternalValue(number);
+    NumberObject* object = new (exec) NumberObject(exec->globalData(), globalObject->numberObjectStructure());
+    object->setInternalValue(exec->globalData(), number);
     return object;
 }