Author: [email protected]
Date: Mon May 25 05:34:47 2009
New Revision: 2041

Modified:
    branches/bleeding_edge/include/v8.h
    branches/bleeding_edge/src/api.cc

Log:
Expose IsProfilerPaused function on the public interface.

This is needed for DevTools Profiler because of its asynchronous and  
multi-client architecture.

Review URL: http://codereview.chromium.org/115761


Modified: branches/bleeding_edge/include/v8.h
==============================================================================
--- branches/bleeding_edge/include/v8.h (original)
+++ branches/bleeding_edge/include/v8.h Mon May 25 05:34:47 2009
@@ -2085,6 +2085,11 @@
    static void ResumeProfiler();

    /**
+   * Return whether profiler is currently paused.
+   */
+  static bool IsProfilerPaused();
+
+  /**
     * If logging is performed into a memory buffer (via --logfile=*),  
allows to
     * retrieve previously written messages. This can be used for retrieving
     * profiler log data in the application. This function is thread-safe.

Modified: branches/bleeding_edge/src/api.cc
==============================================================================
--- branches/bleeding_edge/src/api.cc   (original)
+++ branches/bleeding_edge/src/api.cc   Mon May 25 05:34:47 2009
@@ -3123,11 +3123,22 @@
  #endif
  }

+
  void V8::ResumeProfiler() {
  #ifdef ENABLE_LOGGING_AND_PROFILING
    i::Logger::ResumeProfiler();
  #endif
  }
+
+
+bool V8::IsProfilerPaused() {
+#ifdef ENABLE_LOGGING_AND_PROFILING
+  return i::Logger::IsProfilerPaused();
+#else
+  return true;
+#endif
+}
+

  int V8::GetLogLines(int from_pos, char* dest_buf, int max_size) {
  #ifdef ENABLE_LOGGING_AND_PROFILING

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to