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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h

Issue 1807193003: Show v8.parseOnBackground in DevTools Timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated caseq's comment Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
index 251e58d8d84e5903d7882644edaf0b7373b91870..67b5594532baf4b7020f485853ba199057b2926a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
@@ -8,6 +8,7 @@
#include "core/CoreExport.h"
#include "platform/heap/Handle.h"
#include "wtf/RefCounted.h"
+#include "wtf/text/WTFString.h"
#include <v8.h>
@@ -82,6 +83,9 @@ public:
v8::ScriptCompiler::StreamedSource::Encoding encoding() const { return m_encoding; }
+ const String& scriptURLString() const { return m_scriptURLString; }
+ unsigned long scriptResourceIdentifier() const { return m_scriptResourceIdentifier; }
+
static void setSmallScriptThresholdForTesting(size_t threshold)
{
s_smallScriptThreshold = threshold;
@@ -136,6 +140,12 @@ private:
// For recording metrics for different types of scripts separately.
Type m_scriptType;
+ // Keep the script URL string for event tracing.
+ const String m_scriptURLString;
+
+ // Keep the script resource dentifier for event tracing.
+ const unsigned long m_scriptResourceIdentifier;
+
mutable Mutex m_mutex;
// Encoding of the streamed script. Saved for sanity checking purposes.

Powered by Google App Engine
This is Rietveld 408576698