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

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.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/core.gypi ('k') | Source/core/xml/DOMParser.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 (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 } 1066 }
1067 default: 1067 default:
1068 break; 1068 break;
1069 } 1069 }
1070 } 1070 }
1071 1071
1072 // XPath evaluation 1072 // XPath evaluation
1073 for (Document* document : docs) { 1073 for (Document* document : docs) {
1074 ASSERT(document); 1074 ASSERT(document);
1075 TrackExceptionState exceptionState; 1075 TrackExceptionState exceptionState;
1076 RefPtrWillBeRawPtr<XPathResult> result = DocumentXPathEvaluator::eva luate(*document, whitespaceTrimmedQuery, document, nullptr, XPathResult::ORDERED _NODE_SNAPSHOT_TYPE, ScriptValue(), exceptionState); 1076 XPathResult* result = DocumentXPathEvaluator::evaluate(*document, wh itespaceTrimmedQuery, document, nullptr, XPathResult::ORDERED_NODE_SNAPSHOT_TYPE , ScriptValue(), exceptionState);
1077 if (exceptionState.hadException() || !result) 1077 if (exceptionState.hadException() || !result)
1078 continue; 1078 continue;
1079 1079
1080 unsigned long size = result->snapshotLength(exceptionState); 1080 unsigned long size = result->snapshotLength(exceptionState);
1081 for (unsigned long i = 0; !exceptionState.hadException() && i < size ; ++i) { 1081 for (unsigned long i = 0; !exceptionState.hadException() && i < size ; ++i) {
1082 Node* node = result->snapshotItem(i, exceptionState); 1082 Node* node = result->snapshotItem(i, exceptionState);
1083 if (exceptionState.hadException()) 1083 if (exceptionState.hadException())
1084 break; 1084 break;
1085 1085
1086 if (node->nodeType() == Node::ATTRIBUTE_NODE) 1086 if (node->nodeType() == Node::ATTRIBUTE_NODE)
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2236 visitor->trace(m_searchResults); 2236 visitor->trace(m_searchResults);
2237 #endif 2237 #endif
2238 visitor->trace(m_hoveredNodeForInspectMode); 2238 visitor->trace(m_hoveredNodeForInspectMode);
2239 visitor->trace(m_history); 2239 visitor->trace(m_history);
2240 visitor->trace(m_domEditor); 2240 visitor->trace(m_domEditor);
2241 visitor->trace(m_listener); 2241 visitor->trace(m_listener);
2242 InspectorBaseAgent::trace(visitor); 2242 InspectorBaseAgent::trace(visitor);
2243 } 2243 }
2244 2244
2245 } // namespace blink 2245 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/xml/DOMParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698