Bug 131978 - Frame::document() should return a reference
Summary: Frame::document() should return a reference
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-22 02:15 PDT by Gyuyoung Kim
Modified: 2014-04-22 22:57 PDT (History)
1 user (show)

See Also:


Attachments
WIP (394.79 KB, patch)
2014-04-22 02:17 PDT, Gyuyoung Kim
gyuyoung.kim: commit-queue-
Details | Formatted Diff | Diff
WIP (425.04 KB, patch)
2014-04-22 21:54 PDT, Gyuyoung Kim
gyuyoung.kim: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.