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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceObserver.cpp

Issue 2411583002: bindings: Stop passing ExceptionState to callback function (Closed)
Patch Set: Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/timing/PerformanceObserver.h" 5 #include "core/timing/PerformanceObserver.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/PerformanceObserverCallback.h" 8 #include "bindings/core/v8/PerformanceObserverCallback.h"
9 #include "core/dom/ExecutionContext.h" 9 #include "core/dom/ExecutionContext.h"
10 #include "core/timing/PerformanceBase.h" 10 #include "core/timing/PerformanceBase.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 void PerformanceObserver::deliver() { 83 void PerformanceObserver::deliver() {
84 ASSERT(!shouldBeSuspended()); 84 ASSERT(!shouldBeSuspended());
85 85
86 if (m_performanceEntries.isEmpty()) 86 if (m_performanceEntries.isEmpty())
87 return; 87 return;
88 88
89 PerformanceEntryVector performanceEntries; 89 PerformanceEntryVector performanceEntries;
90 performanceEntries.swap(m_performanceEntries); 90 performanceEntries.swap(m_performanceEntries);
91 PerformanceObserverEntryList* entryList = 91 PerformanceObserverEntryList* entryList =
92 new PerformanceObserverEntryList(performanceEntries); 92 new PerformanceObserverEntryList(performanceEntries);
93 // TODO(bashi): Make sure that not throwing exception is OK. 93 m_callback->call(m_scriptState.get(), this, entryList, this);
94 TrackExceptionState exceptionState;
95
96 m_callback->call(m_scriptState.get(), this, exceptionState, entryList, this);
97 } 94 }
98 95
99 DEFINE_TRACE(PerformanceObserver) { 96 DEFINE_TRACE(PerformanceObserver) {
100 visitor->trace(m_callback); 97 visitor->trace(m_callback);
101 visitor->trace(m_performance); 98 visitor->trace(m_performance);
102 visitor->trace(m_performanceEntries); 99 visitor->trace(m_performanceEntries);
103 } 100 }
104 101
105 } // namespace blink 102 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698