Title: [125491] trunk/Source/WebCore
Revision
125491
Author
[email protected]
Date
2012-08-13 18:32:08 -0700 (Mon, 13 Aug 2012)

Log Message

[V8] Move hintForGCIfNecessary() from V8Proxy.h to V8GCController.h
https://bugs.webkit.org/show_bug.cgi?id=93834

Reviewed by Adam Barth.

This patch moves hintForGCIfNecessary() from V8Proxy.h to V8GCController.h.

No tests. No change in behavior.

* bindings/v8/V8GCController.cpp:
(WebCore::V8GCController::hintForGCIfNecessary):
* bindings/v8/V8GCController.h:
(V8GCController):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::clearForClose):
(WebCore::V8Proxy::clearForNavigation):
* bindings/v8/V8Proxy.h:
(V8Proxy):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125490 => 125491)


--- trunk/Source/WebCore/ChangeLog	2012-08-14 01:29:31 UTC (rev 125490)
+++ trunk/Source/WebCore/ChangeLog	2012-08-14 01:32:08 UTC (rev 125491)
@@ -1,3 +1,24 @@
+2012-08-13  Kentaro Hara  <[email protected]>
+
+        [V8] Move hintForGCIfNecessary() from V8Proxy.h to V8GCController.h
+        https://bugs.webkit.org/show_bug.cgi?id=93834
+
+        Reviewed by Adam Barth.
+
+        This patch moves hintForGCIfNecessary() from V8Proxy.h to V8GCController.h.
+
+        No tests. No change in behavior.
+
+        * bindings/v8/V8GCController.cpp:
+        (WebCore::V8GCController::hintForGCIfNecessary):
+        * bindings/v8/V8GCController.h:
+        (V8GCController):
+        * bindings/v8/V8Proxy.cpp:
+        (WebCore::V8Proxy::clearForClose):
+        (WebCore::V8Proxy::clearForNavigation):
+        * bindings/v8/V8Proxy.h:
+        (V8Proxy):
+
 2012-08-13  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r124970.

Modified: trunk/Source/WebCore/bindings/v8/V8GCController.cpp (125490 => 125491)


--- trunk/Source/WebCore/bindings/v8/V8GCController.cpp	2012-08-14 01:29:31 UTC (rev 125490)
+++ trunk/Source/WebCore/bindings/v8/V8GCController.cpp	2012-08-14 01:32:08 UTC (rev 125491)
@@ -519,5 +519,15 @@
 #endif
 }
 
+void V8GCController::collectGarbageIfNecessary()
+{
+    V8PerIsolateData* data = ""
+    if (!data->shouldCollectGarbageSoon())
+        return;
+    const int longIdlePauseInMS = 1000;
+    data->clearShouldCollectGarbageSoon();
+    v8::V8::ContextDisposedNotification();
+    v8::V8::IdleNotification(longIdlePauseInMS);
+}
 
 }  // namespace WebCore

Modified: trunk/Source/WebCore/bindings/v8/V8GCController.h (125490 => 125491)


--- trunk/Source/WebCore/bindings/v8/V8GCController.h	2012-08-14 01:29:31 UTC (rev 125490)
+++ trunk/Source/WebCore/bindings/v8/V8GCController.h	2012-08-14 01:32:08 UTC (rev 125491)
@@ -76,6 +76,7 @@
         static void gcEpilogue();
 
         static void checkMemoryUsage();
+        static void collectGarbageIfNecessary();
 
     private:
         // Estimate of current working set.

Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.cpp (125490 => 125491)


--- trunk/Source/WebCore/bindings/v8/V8Proxy.cpp	2012-08-14 01:29:31 UTC (rev 125490)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.cpp	2012-08-14 01:32:08 UTC (rev 125491)
@@ -394,28 +394,17 @@
     m_isolatedWorldSecurityOrigins.clear();
 }
 
-void V8Proxy::hintForGCIfNecessary()
-{
-    V8PerIsolateData* data = ""
-    if (data->shouldCollectGarbageSoon()) {
-        const int longIdlePauseInMs = 1000;
-        data->clearShouldCollectGarbageSoon();
-        v8::V8::ContextDisposedNotification();
-        v8::V8::IdleNotification(longIdlePauseInMs);
-    }
-}
-
 void V8Proxy::clearForClose()
 {
     resetIsolatedWorlds();
-    hintForGCIfNecessary();
+    V8GCController::collectGarbageIfNecessary();
     windowShell()->clearForClose();
 }
 
 void V8Proxy::clearForNavigation()
 {
     resetIsolatedWorlds();
-    hintForGCIfNecessary();
+    V8GCController::collectGarbageIfNecessary();
     windowShell()->clearForNavigation();
 }
 

Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.h (125490 => 125491)


--- trunk/Source/WebCore/bindings/v8/V8Proxy.h	2012-08-14 01:29:31 UTC (rev 125490)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.h	2012-08-14 01:32:08 UTC (rev 125491)
@@ -182,8 +182,6 @@
     private:
         void resetIsolatedWorlds();
 
-        void hintForGCIfNecessary();
-
         PassOwnPtr<v8::ScriptData> precompileScript(v8::Handle<v8::String>, CachedScript*);
 
         Frame* m_frame;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to