Title: [86712] trunk/Source/_javascript_Core
- Revision
- 86712
- Author
- [email protected]
- Date
- 2011-05-17 15:32:47 -0700 (Tue, 17 May 2011)
Log Message
2011-05-17 Sam Weinig <[email protected]>
Reviewed by Oliver Hunt.
JSGlobalContextRelease should not trigger a synchronous garbage collection
https://bugs.webkit.org/show_bug.cgi?id=60990
* API/JSContextRef.cpp:
Change synchronous call to collectAllGarbage to a call to trigger the
activityCallback.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/API/JSContextRef.cpp (86711 => 86712)
--- trunk/Source/_javascript_Core/API/JSContextRef.cpp 2011-05-17 22:31:49 UTC (rev 86711)
+++ trunk/Source/_javascript_Core/API/JSContextRef.cpp 2011-05-17 22:32:47 UTC (rev 86712)
@@ -138,14 +138,17 @@
// * If this is the last reference to any contexts in the given context group,
// call destroy on the heap (the global data is being freed).
// * If this was the last reference to the global object, then unprotecting
- // it may release a lot of GC memory - run the garbage collector now.
+ // it may release a lot of GC memory - tickle the activity callback to
+ // garbage collect soon.
// * If there are more references remaining the the global object, then do nothing
// (specifically that is more protects, which we assume come from other JSGlobalContextRefs).
if (releasingContextGroup) {
globalData.clearBuiltinStructures();
globalData.heap.destroy();
- } else if (releasingGlobalObject)
- globalData.heap.collectAllGarbage();
+ } else if (releasingGlobalObject) {
+ globalData.heap.activityCallback()->synchronize();
+ (*globalData.heap.activityCallback())();
+ }
globalData.deref();
Modified: trunk/Source/_javascript_Core/ChangeLog (86711 => 86712)
--- trunk/Source/_javascript_Core/ChangeLog 2011-05-17 22:31:49 UTC (rev 86711)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-05-17 22:32:47 UTC (rev 86712)
@@ -1,3 +1,14 @@
+2011-05-17 Sam Weinig <[email protected]>
+
+ Reviewed by Oliver Hunt.
+
+ JSGlobalContextRelease should not trigger a synchronous garbage collection
+ https://bugs.webkit.org/show_bug.cgi?id=60990
+
+ * API/JSContextRef.cpp:
+ Change synchronous call to collectAllGarbage to a call to trigger the
+ activityCallback.
+
2011-05-16 Oliver Hunt <[email protected]>
Reviewed by Gavin Barraclough.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes