]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/JSAPIValueWrapper.h
JavaScriptCore-7600.1.4.16.1.tar.gz
[apple/javascriptcore.git] / runtime / JSAPIValueWrapper.h
index f0910951b2d6745938566cf0e07693ee53602144..e1f2cd80478209c843b81179b85ff89d43829529 100644 (file)
@@ -39,23 +39,24 @@ namespace JSC {
 
         static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
         {
-            return Structure::create(vm, globalObject, prototype, TypeInfo(APIValueWrapperType, OverridesVisitChildren | OverridesGetPropertyNames), &s_info);
+            return Structure::create(vm, globalObject, prototype, TypeInfo(APIValueWrapperType, OverridesVisitChildren | OverridesGetPropertyNames), info());
         }
         
-        static JS_EXPORTDATA const ClassInfo s_info;
+        DECLARE_EXPORT_INFO;
         
         static JSAPIValueWrapper* create(ExecState* exec, JSValue value) 
         {
-            JSAPIValueWrapper* wrapper = new (NotNull, allocateCell<JSAPIValueWrapper>(*exec->heap())) JSAPIValueWrapper(exec);
-            wrapper->finishCreation(exec, value);
+            VM& vm = exec->vm();
+            JSAPIValueWrapper* wrapper = new (NotNull, allocateCell<JSAPIValueWrapper>(vm.heap)) JSAPIValueWrapper(exec);
+            wrapper->finishCreation(vm, value);
             return wrapper;
         }
 
     protected:
-        void finishCreation(ExecState* exec, JSValue value)
+        void finishCreation(VM& vm, JSValue value)
         {
-            Base::finishCreation(exec->vm());
-            m_value.set(exec->vm(), this, value);
+            Base::finishCreation(vm);
+            m_value.set(vm, this, value);
             ASSERT(!value.isCell());
         }