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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp

Issue 2139363003: [DevTools] Cleanup v8_inspector API part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 5 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
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 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 Document* document = node->isDocumentNode() ? &node->document() : node->owne rDocument(); 2046 Document* document = node->isDocumentNode() ? &node->document() : node->owne rDocument();
2047 LocalFrame* frame = document ? document->frame() : nullptr; 2047 LocalFrame* frame = document ? document->frame() : nullptr;
2048 if (!frame) 2048 if (!frame)
2049 return nullptr; 2049 return nullptr;
2050 2050
2051 ScriptState* scriptState = ScriptState::forMainWorld(frame); 2051 ScriptState* scriptState = ScriptState::forMainWorld(frame);
2052 if (!scriptState) 2052 if (!scriptState)
2053 return nullptr; 2053 return nullptr;
2054 2054
2055 ScriptState::Scope scope(scriptState); 2055 ScriptState::Scope scope(scriptState);
2056 return m_v8Session->wrapObject(scriptState->context(), nodeV8Value(scriptSta te->context(), node), objectGroup); 2056 return m_v8Session->wrapObject(scriptState->context(), nodeV8Value(scriptSta te->context(), node), objectGroup, false);
2057 } 2057 }
2058 2058
2059 bool InspectorDOMAgent::pushDocumentUponHandlelessOperation(ErrorString* errorSt ring) 2059 bool InspectorDOMAgent::pushDocumentUponHandlelessOperation(ErrorString* errorSt ring)
2060 { 2060 {
2061 if (!m_documentNodeToIdMap->contains(m_document)) { 2061 if (!m_documentNodeToIdMap->contains(m_document)) {
2062 std::unique_ptr<protocol::DOM::Node> root; 2062 std::unique_ptr<protocol::DOM::Node> root;
2063 getDocument(errorString, &root); 2063 getDocument(errorString, &root);
2064 return errorString->isEmpty(); 2064 return errorString->isEmpty();
2065 } 2065 }
2066 return true; 2066 return true;
2067 } 2067 }
2068 2068
2069 DEFINE_TRACE(InspectorDOMAgent) 2069 DEFINE_TRACE(InspectorDOMAgent)
2070 { 2070 {
2071 visitor->trace(m_domListener); 2071 visitor->trace(m_domListener);
2072 visitor->trace(m_inspectedFrames); 2072 visitor->trace(m_inspectedFrames);
2073 visitor->trace(m_documentNodeToIdMap); 2073 visitor->trace(m_documentNodeToIdMap);
2074 visitor->trace(m_danglingNodeToIdMaps); 2074 visitor->trace(m_danglingNodeToIdMaps);
2075 visitor->trace(m_idToNode); 2075 visitor->trace(m_idToNode);
2076 visitor->trace(m_idToNodesMap); 2076 visitor->trace(m_idToNodesMap);
2077 visitor->trace(m_document); 2077 visitor->trace(m_document);
2078 visitor->trace(m_revalidateTask); 2078 visitor->trace(m_revalidateTask);
2079 visitor->trace(m_searchResults); 2079 visitor->trace(m_searchResults);
2080 visitor->trace(m_history); 2080 visitor->trace(m_history);
2081 visitor->trace(m_domEditor); 2081 visitor->trace(m_domEditor);
2082 InspectorBaseAgent::trace(visitor); 2082 InspectorBaseAgent::trace(visitor);
2083 } 2083 }
2084 2084
2085 } // namespace blink 2085 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698