Bug 131978

Summary: Frame::document() should return a reference
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: FramesAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: NEW ---    
Severity: Normal CC: kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP
gyuyoung.kim: commit-queue-
WIP gyuyoung.kim: commit-queue-

Description Gyuyoung Kim 2014-04-22 02:15:54 PDT
As mentioned in https://bugs.webkit.org/show_bug.cgi?id=131652#c3, frame should always have a document. So, we can return a reference in frame.
Comment 1 Gyuyoung Kim 2014-04-22 02:17:42 PDT
Created attachment 229872 [details]
WIP
Comment 2 Gyuyoung Kim 2014-04-22 02:19:16 PDT
Kling, I wonder if there is any chance that a frame has a null document.
Comment 3 Gyuyoung Kim 2014-04-22 21:54:26 PDT
Created attachment 229953 [details]
WIP
Comment 4 Andreas Kling 2014-04-22 22:53:55 PDT
Frame::document() will be null when the Frame is created, until the FrameLoader has completed loading the initial document. It will also become null during teardown.

We shouldn't make document() return a reference until we've eliminated those cases where it can be null.
Comment 5 Gyuyoung Kim 2014-04-22 22:57:23 PDT
(In reply to comment #4)
> Frame::document() will be null when the Frame is created, until the FrameLoader has completed loading the initial document. It will also become null during teardown.
> 
> We shouldn't make document() return a reference until we've eliminated those cases where it can be null.

Kling, thank you for your answer. Let me check those cases.