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

Side by Side Diff: Source/core/xml/XPathValue.cpp

Issue 1099613003: Oilpan: have xml/ objects on the heap by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: simplify XPathResult dtor Created 5 years, 8 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 | « Source/core/xml/XPathValue.h ('k') | Source/core/xml/XSLImportRule.h » ('j') | 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 * Copyright 2005 Frerich Raabe <raabe@kde.org> 2 * Copyright 2005 Frerich Raabe <raabe@kde.org>
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 { 47 {
48 visitor->trace(m_data); 48 visitor->trace(m_data);
49 } 49 }
50 50
51 const NodeSet& Value::toNodeSet(EvaluationContext* context) const 51 const NodeSet& Value::toNodeSet(EvaluationContext* context) const
52 { 52 {
53 if (!isNodeSet() && context) 53 if (!isNodeSet() && context)
54 context->hadTypeConversionError = true; 54 context->hadTypeConversionError = true;
55 55
56 if (!m_data) { 56 if (!m_data) {
57 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<NodeSet>, emptyNodeSet, (Node Set::create())); 57 DEFINE_STATIC_LOCAL(Persistent<NodeSet>, emptyNodeSet, (NodeSet::create( )));
58 return *emptyNodeSet; 58 return *emptyNodeSet;
59 } 59 }
60 60
61 return m_data->nodeSet(); 61 return m_data->nodeSet();
62 } 62 }
63 63
64 NodeSet& Value::modifiableNodeSet(EvaluationContext& context) 64 NodeSet& Value::modifiableNodeSet(EvaluationContext& context)
65 { 65 {
66 if (!isNodeSet()) 66 if (!isNodeSet())
67 context.hadTypeConversionError = true; 67 context.hadTypeConversionError = true;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 return String::number(m_number); 140 return String::number(m_number);
141 case BooleanValue: 141 case BooleanValue:
142 return m_bool ? "true" : "false"; 142 return m_bool ? "true" : "false";
143 } 143 }
144 ASSERT_NOT_REACHED(); 144 ASSERT_NOT_REACHED();
145 return String(); 145 return String();
146 } 146 }
147 147
148 } 148 }
149 } 149 }
OLDNEW
« no previous file with comments | « Source/core/xml/XPathValue.h ('k') | Source/core/xml/XSLImportRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698