Title: [172098] trunk/Source/_javascript_Core
Revision
172098
Author
commit-qu...@webkit.org
Date
2014-08-05 16:06:03 -0700 (Tue, 05 Aug 2014)

Log Message

Unreviewed, rolling out r172009.
https://bugs.webkit.org/show_bug.cgi?id=135627

"Commit landed on trunk instead of ftlopt branch." (Requested
by saamyjoon on #webkit).

Reverted changeset:

"Create a more generic way for VMEntryScope to notify those
interested that it will be destroyed"
https://bugs.webkit.org/show_bug.cgi?id=135358
http://trac.webkit.org/changeset/172009

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (172097 => 172098)


--- trunk/Source/_javascript_Core/ChangeLog	2014-08-05 23:00:57 UTC (rev 172097)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-08-05 23:06:03 UTC (rev 172098)
@@ -1,3 +1,18 @@
+2014-08-05  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r172009.
+        https://bugs.webkit.org/show_bug.cgi?id=135627
+
+        "Commit landed on trunk instead of ftlopt branch." (Requested
+        by saamyjoon on #webkit).
+
+        Reverted changeset:
+
+        "Create a more generic way for VMEntryScope to notify those
+        interested that it will be destroyed"
+        https://bugs.webkit.org/show_bug.cgi?id=135358
+        http://trac.webkit.org/changeset/172009
+
 2014-08-05  Alex Christensen  <achristen...@webkit.org>
 
         More work on CMake.

Modified: trunk/Source/_javascript_Core/debugger/Debugger.cpp (172097 => 172098)


--- trunk/Source/_javascript_Core/debugger/Debugger.cpp	2014-08-05 23:00:57 UTC (rev 172097)
+++ trunk/Source/_javascript_Core/debugger/Debugger.cpp	2014-08-05 23:06:03 UTC (rev 172098)
@@ -335,14 +335,7 @@
     // If _javascript_ is running, it's not safe to recompile, since we'll end
     // up throwing away code that is live on the stack.
     if (vm->entryScope) {
-        auto listener = [] (VM* vm, JSGlobalObject* globalObject) 
-        {
-            Debugger* debugger = globalObject->debugger();
-            if (debugger)
-                debugger->recompileAllJSFunctions(vm);
-        };
-
-        vm->entryScope->addEntryScopeDidPopListener(this, listener);
+        vm->entryScope->setRecompilationNeeded(true);
         return;
     }
 

Modified: trunk/Source/_javascript_Core/runtime/VMEntryScope.cpp (172097 => 172098)


--- trunk/Source/_javascript_Core/runtime/VMEntryScope.cpp	2014-08-05 23:00:57 UTC (rev 172097)
+++ trunk/Source/_javascript_Core/runtime/VMEntryScope.cpp	2014-08-05 23:06:03 UTC (rev 172098)
@@ -36,6 +36,7 @@
 VMEntryScope::VMEntryScope(VM& vm, JSGlobalObject* globalObject)
     : m_vm(vm)
     , m_globalObject(globalObject)
+    , m_recompilationNeeded(false)
 {
     ASSERT(wtfThreadData().stack().isGrowingDownward());
     if (!vm.entryScope) {
@@ -54,11 +55,6 @@
     vm.clearExceptionStack();
 }
 
-void VMEntryScope::addEntryScopeDidPopListener(void* key, EntryScopeDidPopListener listener)
-{
-    m_allEntryScopeDidPopListeners.set(key, listener);
-}
-
 VMEntryScope::~VMEntryScope()
 {
     if (m_vm.entryScope != this)
@@ -66,11 +62,9 @@
 
     m_vm.entryScope = nullptr;
 
-    auto iter = m_allEntryScopeDidPopListeners.begin();
-    auto end = m_allEntryScopeDidPopListeners.end();
-    for ( ; iter != end; ++iter) {
-        EntryScopeDidPopListener listener = iter->value;
-        listener(&m_vm, m_globalObject);
+    if (m_recompilationNeeded) {
+        if (Debugger* debugger = m_globalObject->debugger())
+            debugger->recompileAllJSFunctions(&m_vm);
     }
 }
 

Modified: trunk/Source/_javascript_Core/runtime/VMEntryScope.h (172097 => 172098)


--- trunk/Source/_javascript_Core/runtime/VMEntryScope.h	2014-08-05 23:00:57 UTC (rev 172097)
+++ trunk/Source/_javascript_Core/runtime/VMEntryScope.h	2014-08-05 23:06:03 UTC (rev 172098)
@@ -27,7 +27,6 @@
 #define VMEntryScope_h
 
 #include "Interpreter.h"
-#include <wtf/HashMap.h>
 #include <wtf/StackBounds.h>
 #include <wtf/StackStats.h>
 
@@ -43,13 +42,12 @@
 
     JSGlobalObject* globalObject() const { return m_globalObject; }
 
-    typedef std::function<void (VM*, JSGlobalObject*)> EntryScopeDidPopListener;
-    void addEntryScopeDidPopListener(void*, EntryScopeDidPopListener);
+    void setRecompilationNeeded(bool recompileNeeded) { m_recompilationNeeded = recompileNeeded; }
 
 private:
     VM& m_vm;
     JSGlobalObject* m_globalObject;
-    HashMap<void*, EntryScopeDidPopListener> m_allEntryScopeDidPopListeners;
+    bool m_recompilationNeeded;
 };
 
 } // namespace JSC
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to