Handle LocalFrame being nestedly detached by subframe.
commit7dccc3da4d0380f20b85633b44f0d07764af66b7
authorsigbjornf@opera.com <sigbjornf@opera.com>
Wed, 19 Aug 2015 12:25:51 +0000 (19 12:25 +0000)
committersigbjornf@opera.com <sigbjornf@opera.com>
Wed, 19 Aug 2015 12:25:51 +0000 (19 12:25 +0000)
tree3f53e0d9f9cc304be8f79ce7c98818fd15d4f5fa
parent7e80e6cdef633d887375bfb2a070c19e39391c82
Handle LocalFrame being nestedly detached by subframe.

As part of detaching a LocalFrame, its subframes are also detached. Should the
detachment of those subframes trigger a nested detach of the LocalFrame that
initiated their detachment, the LocalFrame being returned to after having
detached the subframes could well be in a detached state. The detach steps that
followed (FrameLoader operations) weren't prepared for being in a detached state
(following r199143) and failed.

And the FrameLoader shouldn't have to gracefully handle being used in a detached
state, so add an is-detached check to the LocalFrame's detach steps before continuing.
Leaving early if so.

R=dcheng,japhet
BUG=520014

Review URL: https://codereview.chromium.org/1290053003

git-svn-id: svn://svn.chromium.org/blink/trunk@200820 bbb929c8-8fbe-4397-9dbb-9b2b20218538
third_party/WebKit/LayoutTests/fast/frames/detach-frame-from-child-detach-no-crash-expected.txt [new file with mode: 0644]
third_party/WebKit/LayoutTests/fast/frames/detach-frame-from-child-detach-no-crash.html [new file with mode: 0644]
third_party/WebKit/Source/core/frame/LocalFrame.cpp