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

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

Issue 1950303004: [DevTools] Add additional accessor check in InjectedScriptSource.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/inspector/ThreadDebugger.h" 5 #include "core/inspector/ThreadDebugger.h"
6 6
7 #include "bindings/core/v8/ScriptCallStack.h" 7 #include "bindings/core/v8/ScriptCallStack.h"
8 #include "bindings/core/v8/ScriptValue.h" 8 #include "bindings/core/v8/ScriptValue.h"
9 #include "bindings/core/v8/V8Binding.h" 9 #include "bindings/core/v8/V8Binding.h"
10 #include "bindings/core/v8/V8DOMException.h" 10 #include "bindings/core/v8/V8DOMException.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 || V8DOMTokenList::hasInstance(value, m_isolate) 60 || V8DOMTokenList::hasInstance(value, m_isolate)
61 || V8HTMLCollection::hasInstance(value, m_isolate) 61 || V8HTMLCollection::hasInstance(value, m_isolate)
62 || V8HTMLAllCollection::hasInstance(value, m_isolate)) { 62 || V8HTMLAllCollection::hasInstance(value, m_isolate)) {
63 return "array"; 63 return "array";
64 } 64 }
65 if (V8DOMException::hasInstance(value, m_isolate)) 65 if (V8DOMException::hasInstance(value, m_isolate))
66 return "error"; 66 return "error";
67 return String(); 67 return String();
68 } 68 }
69 69
70 bool ThreadDebugger::formatAccessorsAsProperties(v8::Local<v8::Value> value)
71 {
72 return V8DOMWrapper::isWrapper(m_isolate, value);
73 }
74
75 bool ThreadDebugger::isExecutionAllowed() 70 bool ThreadDebugger::isExecutionAllowed()
76 { 71 {
77 return !ScriptForbiddenScope::isScriptForbidden(); 72 return !ScriptForbiddenScope::isScriptForbidden();
78 } 73 }
79 74
80 double ThreadDebugger::currentTimeMS() 75 double ThreadDebugger::currentTimeMS()
81 { 76 {
82 return WTF::currentTimeMS(); 77 return WTF::currentTimeMS();
83 } 78 }
84 79
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 m_timers.remove(id); 148 m_timers.remove(id);
154 } 149 }
155 150
156 void ThreadDebugger::onTimer(Timer<ThreadDebugger>* timer) 151 void ThreadDebugger::onTimer(Timer<ThreadDebugger>* timer)
157 { 152 {
158 ASSERT(m_timerCallbacks.contains(timer)); 153 ASSERT(m_timerCallbacks.contains(timer));
159 (*m_timerCallbacks.get(timer))(); 154 (*m_timerCallbacks.get(timer))();
160 } 155 }
161 156
162 } // namespace blink 157 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698