Bug 92401 - Guard Prerenderer against inserting prerenders into detached documents.
Summary: Guard Prerenderer against inserting prerenders into detached documents.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Peters
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-26 11:13 PDT by Gavin Peters
Modified: 2012-07-26 15:07 PDT (History)
4 users (show)

See Also:


Attachments
Patch (4.85 KB, patch)
2012-07-26 11:15 PDT, Gavin Peters
no flags Details | Formatted Diff | Diff
Patch (4.83 KB, patch)
2012-07-26 11:56 PDT, Gavin Peters
no flags Details | Formatted Diff | Diff

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

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]
Patch
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]
Patch

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]
Patch

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.