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 6e58a2b982f5161afdc7036ae9cd752de5760f74..1df3906927a7cf9d08745418e0c7ae3b7ea24591 100644 (file)
@@ -1,3 +1,19 @@
+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.
index 059c69935a4e81608e27e14957f4f7d6db23f1c7..759d84e8342a9d058571d8dd95ec1b9ad08e5a4e 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;