Index: Source/core/frame/Frame.h |
diff --git a/Source/core/frame/Frame.h b/Source/core/frame/Frame.h |
index 498cb77c81bfd740d26d1fdc0c02b6131f656796..9eec7b2938179b9d341f8f2304d035c3256dbc82 100644 |
--- a/Source/core/frame/Frame.h |
+++ b/Source/core/frame/Frame.h |
@@ -98,6 +98,9 @@ public: |
// method. |
bool isRemoteFrameTemporary() const { return m_remotePlatformLayer; } |
+ bool hasBeenClosed() const { return m_hasBeenClosed; } |
+ void setHasBeenClosed() { ASSERT(!m_hasBeenClosed); m_hasBeenClosed = true; } |
tkent
2014/09/17 08:28:46
nit: We don't put multiple statements in a single
sof
2014/09/17 09:55:05
Thanks, addressed (&un-inlined.)
|
+ |
protected: |
Frame(FrameClient*, FrameHost*, FrameOwner*); |
@@ -111,6 +114,14 @@ protected: |
private: |
FrameClient* m_client; |
blink::WebLayer* m_remotePlatformLayer; |
+ |
+ // The closing of a frame by the embedder may not trigger the |
+ // immediate release of this Frame object -- there might be |
+ // other RefPtrs to the Frame, up the stack or elsewhere. |
+ // |
+ // Hence, keep a separate flag that's set when the frame is |
+ // closed. It is consulted by window.closed. |
+ bool m_hasBeenClosed; |
}; |
inline FrameClient* Frame::client() const |