Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1120)

Side by Side Diff: Source/WebCore/xml/XSLTProcessorLibxslt.cpp

Issue 9285028: Merge 105524 - Crash in xsltParseGlobalVariable. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/xsl/xslt-transform-to-fragment-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of the XSL implementation. 2 * This file is part of the XSL implementation.
3 * 3 *
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple, Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple, Inc. All rights reserved.
5 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@webkit.org>
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 301
302 bool XSLTProcessor::transformToString(Node* sourceNode, String& mimeType, String & resultString, String& resultEncoding) 302 bool XSLTProcessor::transformToString(Node* sourceNode, String& mimeType, String & resultString, String& resultEncoding)
303 { 303 {
304 RefPtr<Document> ownerDocument = sourceNode->document(); 304 RefPtr<Document> ownerDocument = sourceNode->document();
305 305
306 setXSLTLoadCallBack(docLoaderFunc, this, ownerDocument->cachedResourceLoader ()); 306 setXSLTLoadCallBack(docLoaderFunc, this, ownerDocument->cachedResourceLoader ());
307 xsltStylesheetPtr sheet = xsltStylesheetPointer(m_stylesheet, m_stylesheetRo otNode.get()); 307 xsltStylesheetPtr sheet = xsltStylesheetPointer(m_stylesheet, m_stylesheetRo otNode.get());
308 if (!sheet) { 308 if (!sheet) {
309 setXSLTLoadCallBack(0, 0, 0); 309 setXSLTLoadCallBack(0, 0, 0);
310 m_stylesheet = 0;
310 return false; 311 return false;
311 } 312 }
312 m_stylesheet->clearDocuments(); 313 m_stylesheet->clearDocuments();
313 314
314 xmlChar* origMethod = sheet->method; 315 xmlChar* origMethod = sheet->method;
315 if (!origMethod && mimeType == "text/html") 316 if (!origMethod && mimeType == "text/html")
316 sheet->method = (xmlChar*)"html"; 317 sheet->method = (xmlChar*)"html";
317 318
318 bool success = false; 319 bool success = false;
319 bool shouldFreeSourceDoc = false; 320 bool shouldFreeSourceDoc = false;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 setXSLTLoadCallBack(0, 0, 0); 367 setXSLTLoadCallBack(0, 0, 0);
367 xsltFreeStylesheet(sheet); 368 xsltFreeStylesheet(sheet);
368 m_stylesheet = 0; 369 m_stylesheet = 0;
369 370
370 return success; 371 return success;
371 } 372 }
372 373
373 } // namespace WebCore 374 } // namespace WebCore
374 375
375 #endif // ENABLE(XSLT) 376 #endif // ENABLE(XSLT)
OLDNEW
« no previous file with comments | « LayoutTests/fast/xsl/xslt-transform-to-fragment-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698