[webkit-reviews] review granted: [Bug 185712] NavigationAction should not hold a strong reference to a Document : [Attachment 341220] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 24 13:45:51 PDT 2018
Brent Fulgham <bfulgham at webkit.org> has granted Daniel Bates
<dbates at webkit.org>'s request for review:
Bug 185712: NavigationAction should not hold a strong reference to a Document
https://bugs.webkit.org/show_bug.cgi?id=185712
Attachment 341220: Patch
https://bugs.webkit.org/attachment.cgi?id=341220&action=review
--- Comment #26 from Brent Fulgham <bfulgham at webkit.org> ---
Comment on attachment 341220
--> https://bugs.webkit.org/attachment.cgi?id=341220
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=341220&action=review
Looks good! r=me.
> Source/WebCore/loader/NavigationAction.cpp:40
> +NavigationAction::Requester::Requester(Document& document)
Could this be 'const Document&'? Or does one of the frame methods mutate the
document or frame?
> Source/WebCore/loader/NavigationAction.cpp:57
> + return url.isBlankURL() || url.protocolIsData() || (url.protocolIsBlob()
&& document.securityOrigin().canRequest(url));
I don't think this whitespace change is helpful. In fact, it makes it more
difficult to easily see which predicate is causing an early return.
> Source/WebCore/loader/NavigationAction.h:60
> + Requester(Document&);
const Document&
> Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:851
> + originatingFrameInfoData.securityOrigin =
SecurityOrigin::create(requester.url())->data();
Was the sourceDocument's SecurityOrigin member always computed dynamically, or
was it cached? SecurityOrigin can be expensive to compute.
More information about the webkit-reviews
mailing list