DFG::Plan shouldn't read from its VM once it's been cancelled
[WebKit-https.git] / Source / JavaScriptCore / dfg / DFGSafepoint.h
index 96f4b8e..34cfaa6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -72,9 +72,10 @@ public:
     bool isKnownToBeLiveDuringGC();
     void cancel();
     
-    VM& vm() const;
+    VM* vm() const; // May return null if we've been cancelled.
 
 private:
+    VM* m_vm;
     Plan& m_plan;
     Vector<Scannable*> m_scannables;
     bool m_didCallBegin;