| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 #if ENABLE(OILPAN) | 304 #if ENABLE(OILPAN) |
| 305 ThreadState::current()->registerPreFinalizer(*this); | 305 ThreadState::current()->registerPreFinalizer(*this); |
| 306 #endif | 306 #endif |
| 307 } | 307 } |
| 308 | 308 |
| 309 void LocalDOMWindow::clearDocument() | 309 void LocalDOMWindow::clearDocument() |
| 310 { | 310 { |
| 311 if (!m_document) | 311 if (!m_document) |
| 312 return; | 312 return; |
| 313 | 313 |
| 314 ASSERT(!m_document->isActive()); | 314 if (m_document->isActive()) { |
| 315 // FIXME: We don't call willRemove here. Why is that OK? |
| 316 // This detach() call is also mostly redundant. Most of the calls to |
| 317 // this function come via DocumentLoader::createWriterFor, which |
| 318 // always detaches the previous Document first. Only XSLTProcessor |
| 319 // depends on this detach() call, so it seems like there's some room |
| 320 // for cleanup. |
| 321 m_document->detach(); |
| 322 } |
| 315 | 323 |
| 316 // FIXME: This should be part of ActiveDOMObject shutdown | 324 // FIXME: This should be part of ActiveDOMObject shutdown |
| 317 clearEventQueue(); | 325 clearEventQueue(); |
| 318 | 326 |
| 319 m_document->clearDOMWindow(); | 327 m_document->clearDOMWindow(); |
| 320 m_document = nullptr; | 328 m_document = nullptr; |
| 321 } | 329 } |
| 322 | 330 |
| 323 void LocalDOMWindow::clearEventQueue() | 331 void LocalDOMWindow::clearEventQueue() |
| 324 { | 332 { |
| (...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1651 return m_frameObserver->frame(); | 1659 return m_frameObserver->frame(); |
| 1652 } | 1660 } |
| 1653 | 1661 |
| 1654 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) | 1662 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) |
| 1655 { | 1663 { |
| 1656 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. | 1664 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. |
| 1657 return v8::Handle<v8::Object>(); | 1665 return v8::Handle<v8::Object>(); |
| 1658 } | 1666 } |
| 1659 | 1667 |
| 1660 } // namespace blink | 1668 } // namespace blink |
| OLD | NEW |