OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) |
3 * Copyright (C) 2005, 2006, 2008, 2014 Apple Inc. All rights reserved. | 3 * Copyright (C) 2005, 2006, 2008, 2014 Apple Inc. All rights reserved. |
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * Copyright (C) 2008 Holger Hans Peter Freyther | 7 * Copyright (C) 2008 Holger Hans Peter Freyther |
8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 document()->finishedParsing(); | 435 document()->finishedParsing(); |
436 } | 436 } |
437 | 437 |
438 void XMLDocumentParser::finish() | 438 void XMLDocumentParser::finish() |
439 { | 439 { |
440 // FIXME: We should ASSERT(!m_parserStopped) here, since it does not | 440 // FIXME: We should ASSERT(!m_parserStopped) here, since it does not |
441 // makes sense to call any methods on DocumentParser once it's been stopped. | 441 // makes sense to call any methods on DocumentParser once it's been stopped. |
442 // However, FrameLoader::stop calls DocumentParser::finish unconditionally. | 442 // However, FrameLoader::stop calls DocumentParser::finish unconditionally. |
443 | 443 |
444 // flush may ending up executing arbitrary script, and possibly detach the p
arser. | 444 // flush may ending up executing arbitrary script, and possibly detach the p
arser. |
445 RefPtr<XMLDocumentParser> protect(this); | 445 RefPtrWillBeRawPtr<XMLDocumentParser> protect(this); |
446 flush(); | 446 flush(); |
447 if (isDetached()) | 447 if (isDetached()) |
448 return; | 448 return; |
449 | 449 |
450 if (m_parserPaused) | 450 if (m_parserPaused) |
451 m_finishCalled = true; | 451 m_finishCalled = true; |
452 else | 452 else |
453 end(); | 453 end(); |
454 } | 454 } |
455 | 455 |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1634 sax.initialized = XML_SAX2_MAGIC; | 1634 sax.initialized = XML_SAX2_MAGIC; |
1635 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1635 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
1636 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1636 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
1637 parseChunk(parser->context(), parseString); | 1637 parseChunk(parser->context(), parseString); |
1638 finishParsing(parser->context()); | 1638 finishParsing(parser->context()); |
1639 attrsOK = state.gotAttributes; | 1639 attrsOK = state.gotAttributes; |
1640 return state.attributes; | 1640 return state.attributes; |
1641 } | 1641 } |
1642 | 1642 |
1643 } // namespace blink | 1643 } // namespace blink |
OLD | NEW |