[webkit-reviews] review granted: [Bug 115498] Null check plugInClient earlier in snapshotting path : [Attachment 200252] [PATCH] Proposed Fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 1 17:12:08 PDT 2013


Darin Adler <darin at apple.com> has granted Joseph Pecoraro
<joepeck at webkit.org>'s request for review:
Bug 115498: Null check plugInClient earlier in snapshotting path
https://bugs.webkit.org/show_bug.cgi?id=115498

Attachment 200252: [PATCH] Proposed Fix
https://bugs.webkit.org/attachment.cgi?id=200252&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=200252&action=review


> Source/WebCore/html/HTMLPlugInImageElement.cpp:648
> -    if
(document()->page()->settings()->autostartOriginPlugInSnapshottingEnabled() &&
document()->page()->plugInClient()->shouldAutoStartFromOrigin(document()->page(
)->mainFrame()->document()->baseURL().host(), url.host(), loadedMimeType())) {
> +    if
(document()->page()->settings()->autostartOriginPlugInSnapshottingEnabled() &&
document()->page()->plugInClient() &&
document()->page()->plugInClient()->shouldAutoStartFromOrigin(document()->page(
)->mainFrame()->document()->baseURL().host(), url.host(), loadedMimeType())) {

I think this would be way better with some local variables. One for
document()->page() and another for document()->page()->plugInClient().


More information about the webkit-reviews mailing list