Bug 92401

Summary: Guard Prerenderer against inserting prerenders into detached documents.
Product: WebKit Reporter: Gavin Peters <gavinp>
Component: New BugsAssignee: Gavin Peters <gavinp>
Severity: Normal CC: abarth, japhet, jochen, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch none

Description Gavin Peters 2012-07-26 11:13:11 PDT
Guard Prerenderer against inserting prerenders into detached documents.
Comment 1 Gavin Peters 2012-07-26 11:15:10 PDT
Created attachment 154692 [details]
Comment 2 Gavin Peters 2012-07-26 11:16:26 PDT
Japhet, WDYT?
Comment 3 Nate Chapin 2012-07-26 11:31:11 PDT
Comment on attachment 154692 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=154692&action=review

> LayoutTests/fast/dom/HTMLLinkElement/prerender-insert-after-stop.html:8
> +   if (window.testRunner) {
> +       testRunner.notifyDone();
> +   }

Nit, no braces.

> LayoutTests/fast/dom/HTMLLinkElement/prerender-insert-after-stop.html:14
> +        setTimeout(done, 0);

Obligatory: any chance of avoiding the setTimeout()?
Comment 4 Gavin Peters 2012-07-26 11:56:03 PDT
Created attachment 154711 [details]
Comment 5 Gavin Peters 2012-07-26 11:56:40 PDT
Thanks japhet!
Comment 6 Gavin Peters 2012-07-26 14:01:59 PDT
Comment on attachment 154711 [details]

Thanks to all reviewers. I double-double checked that removing the timer does not break the fix, and I'll modify some other tests accordingly.

I'm also going to search for other possible post-removal DOM manipulations that can crash us, links or no links.
Comment 7 WebKit Review Bot 2012-07-26 15:07:43 PDT
Comment on attachment 154711 [details]

Clearing flags on attachment: 154711

Committed r123798: <http://trac.webkit.org/changeset/123798>
Comment 8 WebKit Review Bot 2012-07-26 15:07:47 PDT
All reviewed patches have been landed.  Closing bug.