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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp

Issue 2513483002: DevTools: introduce perf monitor actions w/ time budget for violations that are event handlers. (Closed)
Patch Set: expose locations instead of functions Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp b/third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp
index 98ab991477fe13543a866bc033d19e780b206f0c..8f4048a6cbb75efd78faae6155043c99a60555e4 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp
@@ -32,6 +32,7 @@
#include "bindings/core/v8/ScriptController.h"
#include "bindings/core/v8/ScriptSourceCode.h"
+#include "bindings/core/v8/SourceLocation.h"
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8GCController.h"
#include "bindings/core/v8/V8ScriptRunner.h"
@@ -171,4 +172,10 @@ void ScheduledAction::createLocalHandlesForArgs(
handles->append(m_info.Get(i));
}
+std::unique_ptr<SourceLocation> ScheduledAction::handlerLocation() {
+ v8::HandleScope handles(m_scriptState->isolate());
+ return SourceLocation::fromFunction(
+ v8::Local<v8::Function>::New(m_scriptState->isolate(), m_function.get()));
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698