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

Unified Diff: include/v8-profiler.h

Issue 2328673003: [profiler] Add two CpuProfileNode API functions to allow thread safe access to the node. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8-profiler.h
diff --git a/include/v8-profiler.h b/include/v8-profiler.h
index bcb69f3763e1b76dfc48e215a7e2fad80f235cee..55c8386bdeff4aa1a7bb3570671999013216de35 100644
--- a/include/v8-profiler.h
+++ b/include/v8-profiler.h
@@ -131,6 +131,13 @@ class V8_EXPORT CpuProfileNode {
/** Returns function name (empty string for anonymous functions.) */
Local<String> GetFunctionName() const;
+ /**
+ * Returns function name (empty string for anonymous functions.)
+ * The string ownership is *not* passed to the caller. It stays valid until
+ * profile is deleted. The function is thread safe.
+ */
+ const char* GetFunctionNameStr() const;
+
/** Returns id of the script where function is located. */
int GetScriptId() const;
@@ -138,6 +145,13 @@ class V8_EXPORT CpuProfileNode {
Local<String> GetScriptResourceName() const;
/**
+ * Returns resource name for script from where the function originates.
+ * The string ownership is *not* passed to the caller. It stays valid until
+ * profile is deleted. The function is thread safe.
+ */
+ const char* GetScriptResourceNameStr() const;
+
+ /**
* Returns the number, 1-based, of the line where the function originates.
* kNoLineNumberInfo if no line number information is available.
*/
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698