| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999-2001 Harri Porten (porten@kde.org) | 2 * Copyright (C) 1999-2001 Harri Porten (porten@kde.org) |
| 3 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 3 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
| 4 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 if (!result.getString(exec, scriptResult)) | 100 if (!result.getString(exec, scriptResult)) |
| 101 return true; | 101 return true; |
| 102 #else | 102 #else |
| 103 if (!result.getString(scriptResult)) | 103 if (!result.getString(scriptResult)) |
| 104 return true; | 104 return true; |
| 105 #endif | 105 #endif |
| 106 | 106 |
| 107 // FIXME: We should always replace the document, but doing so | 107 // FIXME: We should always replace the document, but doing so |
| 108 // synchronously can cause crashes: | 108 // synchronously can cause crashes: |
| 109 // http://bugs.webkit.org/show_bug.cgi?id=16782 | 109 // http://bugs.webkit.org/show_bug.cgi?id=16782 |
| 110 if (shouldReplaceDocumentIfJavaScriptURL == ReplaceDocumentIfJavaScriptURL) | 110 if (shouldReplaceDocumentIfJavaScriptURL == ReplaceDocumentIfJavaScriptURL)
{ |
| 111 m_frame->document()->loader()->writer()->replaceDocument(scriptResult); | 111 // We're still in a frame, so there should be a DocumentLoader. |
| 112 | 112 ASSERT(m_frame->document()->loader()); |
| 113 if (DocumentLoader* loader = m_frame->document()->loader()) |
| 114 loader->writer()->replaceDocument(scriptResult); |
| 115 } |
| 113 return true; | 116 return true; |
| 114 } | 117 } |
| 115 | 118 |
| 116 } // namespace WebCore | 119 } // namespace WebCore |
| OLD | NEW |