Title: [191161] trunk/Source/_javascript_Core
Revision
191161
Author
joep...@webkit.org
Date
2015-10-15 19:34:24 -0700 (Thu, 15 Oct 2015)

Log Message

Unreviewed. Revert part of r191159 which caused ASSERTs.

A review comment suggested using WeakPtr. It is not suitable
here and causes ASSERTs across threads. Will address separately.

* inspector/agents/InspectorHeapAgent.h:
* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::InspectorHeapAgent::didGarbageCollect):
(Inspector::InspectorHeapAgent::InspectorHeapAgent): Deleted.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (191160 => 191161)


--- trunk/Source/_javascript_Core/ChangeLog	2015-10-16 02:19:57 UTC (rev 191160)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-10-16 02:34:24 UTC (rev 191161)
@@ -1,3 +1,15 @@
+2015-10-15  Joseph Pecoraro  <pecor...@apple.com>
+
+        Unreviewed. Revert part of r191159 which caused ASSERTs.
+
+        A review comment suggested using WeakPtr. It is not suitable
+        here and causes ASSERTs across threads. Will address separately.
+
+        * inspector/agents/InspectorHeapAgent.h:
+        * inspector/agents/InspectorHeapAgent.cpp:
+        (Inspector::InspectorHeapAgent::didGarbageCollect):
+        (Inspector::InspectorHeapAgent::InspectorHeapAgent): Deleted.
+
 2015-10-14  Joseph Pecoraro  <pecor...@apple.com>
 
         Web Inspector: Include Garbage Collection Event in Timeline

Modified: trunk/Source/_javascript_Core/inspector/agents/InspectorHeapAgent.cpp (191160 => 191161)


--- trunk/Source/_javascript_Core/inspector/agents/InspectorHeapAgent.cpp	2015-10-16 02:19:57 UTC (rev 191160)
+++ trunk/Source/_javascript_Core/inspector/agents/InspectorHeapAgent.cpp	2015-10-16 02:34:24 UTC (rev 191161)
@@ -40,7 +40,6 @@
     , m_frontendDispatcher(std::make_unique<HeapFrontendDispatcher>(context.frontendRouter))
     , m_backendDispatcher(HeapBackendDispatcher::create(context.backendDispatcher, this))
     , m_environment(context.environment)
-    , m_weakPtrFactory(this)
 {
 }
 
@@ -124,11 +123,7 @@
     // with WebKitLegacy's in process inspector which shares the same
     // VM as the inspected page.
 
-    auto weakThis = m_weakPtrFactory.createWeakPtr();
-    RunLoop::current().dispatch([weakThis, startTime, endTime, operation]() {
-        if (!weakThis)
-            return;
-
+    RunLoop::current().dispatch([this, startTime, endTime, operation]() {
         auto collection = Inspector::Protocol::Heap::GarbageCollection::create()
             .setType(protocolTypeForHeapOperation(operation))
             .setStartTime(startTime)

Modified: trunk/Source/_javascript_Core/inspector/agents/InspectorHeapAgent.h (191160 => 191161)


--- trunk/Source/_javascript_Core/inspector/agents/InspectorHeapAgent.h	2015-10-16 02:19:57 UTC (rev 191160)
+++ trunk/Source/_javascript_Core/inspector/agents/InspectorHeapAgent.h	2015-10-16 02:34:24 UTC (rev 191161)
@@ -32,7 +32,6 @@
 #include "inspector/InspectorAgentBase.h"
 #include <wtf/Forward.h>
 #include <wtf/Noncopyable.h>
-#include <wtf/WeakPtr.h>
 
 namespace Inspector {
 
@@ -60,7 +59,6 @@
     std::unique_ptr<HeapFrontendDispatcher> m_frontendDispatcher;
     RefPtr<HeapBackendDispatcher> m_backendDispatcher;
     InspectorEnvironment& m_environment;
-    WeakPtrFactory<InspectorHeapAgent> m_weakPtrFactory;
     bool m_enabled { false };
     double m_gcStartTime { NAN };
 };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to