]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - jit/JITStubRoutine.h
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / jit / JITStubRoutine.h
index 163705d2dc70423e598506a90ac37ecc1b4bcc7b..b2113a65f1f83a6d78e96a91a75d4d134658de78 100644 (file)
@@ -60,10 +60,10 @@ public:
     
     // Use this if you want to pass a CodePtr to someone who insists on taking
     // a RefPtr<JITStubRoutine>.
-    static PassRefPtr<JITStubRoutine> createSelfManagedRoutine(
+    static Ref<JITStubRoutine> createSelfManagedRoutine(
         MacroAssemblerCodePtr rawCodePointer)
     {
-        return adoptRef(new JITStubRoutine(MacroAssemblerCodeRef::createSelfManagedCodeRef(rawCodePointer)));
+        return adoptRef(*new JITStubRoutine(MacroAssemblerCodeRef::createSelfManagedCodeRef(rawCodePointer)));
     }
     
     virtual ~JITStubRoutine();
@@ -141,6 +141,9 @@ public:
         return true;
     }
     
+    // Return true if you are still valid after. Return false if you are now invalid. If you return
+    // false, you will usually not do any clearing because the idea is that you will simply be
+    // destroyed.
     virtual bool visitWeak(RepatchBuffer&);
 
 protected: