Short-circuit JSGlobalObjectInspectorController when not inspecting.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Mar 2014 01:57:48 +0000 (01:57 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Mar 2014 01:57:48 +0000 (01:57 +0000)
<https://webkit.org/b/129995>

Add an early return in reportAPIException() when the console agent
is disabled. This avoids expensive symbolication during exceptions
if there's nobody expecting the fancy backtrace anyway.

~2% progression on DYEB on my MBP.

Reviewed by Geoff Garen.

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::reportAPIException):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165357 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp

index 6e58a2b..1df3906 100644 (file)
@@ -1,5 +1,21 @@
 2014-03-09  Andreas Kling  <akling@apple.com>
 
+        Short-circuit JSGlobalObjectInspectorController when not inspecting.
+        <https://webkit.org/b/129995>
+
+        Add an early return in reportAPIException() when the console agent
+        is disabled. This avoids expensive symbolication during exceptions
+        if there's nobody expecting the fancy backtrace anyway.
+
+        ~2% progression on DYEB on my MBP.
+
+        Reviewed by Geoff Garen.
+
+        * inspector/JSGlobalObjectInspectorController.cpp:
+        (Inspector::JSGlobalObjectInspectorController::reportAPIException):
+
+2014-03-09  Andreas Kling  <akling@apple.com>
+
         Inline the trivial parts of GC deferral.
         <https://webkit.org/b/129984>
 
index 059c699..759d84e 100644 (file)
@@ -141,6 +141,9 @@ void JSGlobalObjectInspectorController::appendAPIBacktrace(ScriptCallStack* call
 
 void JSGlobalObjectInspectorController::reportAPIException(ExecState* exec, JSValue exception)
 {
+    if (!m_consoleAgent->enabled())
+        return;
+
     if (isTerminatedExecutionException(exception))
         return;