[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
barraclough at apple.com
barraclough at apple.com
Wed Jan 20 22:28:56 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 49561750fdd09603b60dcdf91ce75b9fdc166e4e
Author: barraclough at apple.com <barraclough at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 19 08:25:22 2010 +0000
Reverting r53455, breaks 2 javascriptcore tests.
Reviewed by NOBODY (build fix).
JavaScriptCore:
* API/JSContextRef.cpp:
* runtime/Collector.cpp:
(JSC::Heap::destroy):
(JSC::Heap::freeBlock):
(JSC::Heap::freeBlocks):
(JSC::Heap::shrinkBlocks):
WebCore:
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::~WorkerScriptController):
LayoutTests:
* fast/workers/resources/worker-gc2.js: Removed.
* fast/workers/worker-gc2.html: Removed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/API/JSContextRef.cpp b/JavaScriptCore/API/JSContextRef.cpp
index 6bdc3c8..35eac04 100644
--- a/JavaScriptCore/API/JSContextRef.cpp
+++ b/JavaScriptCore/API/JSContextRef.cpp
@@ -127,6 +127,8 @@ void JSGlobalContextRelease(JSGlobalContextRef ctx)
JSGlobalData& globalData = exec->globalData();
if (globalData.refCount() == 2) { // One reference is held by JSGlobalObject, another added by JSGlobalContextRetain().
// The last reference was released, this is our last chance to collect.
+ ASSERT(!globalData.heap.protectedObjectCount());
+ ASSERT(!globalData.heap.isBusy());
globalData.heap.destroy();
} else
globalData.heap.collectAllGarbage();
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 90d8e6d..65ad189 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-19 Gavin Barraclough <barraclough at apple.com>
+
+ Reviewed by NOBODY (build fix).
+
+ Reverting r53455, breaks 2 javascriptcore tests.
+
+ * API/JSContextRef.cpp:
+ * runtime/Collector.cpp:
+ (JSC::Heap::destroy):
+ (JSC::Heap::freeBlock):
+ (JSC::Heap::freeBlocks):
+ (JSC::Heap::shrinkBlocks):
+
2010-01-18 Gavin Barraclough <barraclough at apple.com>
Reviewed by NOBODY (build fix).
diff --git a/JavaScriptCore/runtime/Collector.cpp b/JavaScriptCore/runtime/Collector.cpp
index e02c289..f15cb2c 100644
--- a/JavaScriptCore/runtime/Collector.cpp
+++ b/JavaScriptCore/runtime/Collector.cpp
@@ -186,9 +186,6 @@ void Heap::destroy()
if (!m_globalData)
return;
- ASSERT(!m_globalData->dynamicGlobalObject);
- ASSERT(!isBusy());
-
// The global object is not GC protected at this point, so sweeping may delete it
// (and thus the global data) before other objects that may use the global data.
RefPtr<JSGlobalData> protect(m_globalData);
@@ -293,8 +290,6 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
NEVER_INLINE void Heap::freeBlock(size_t block)
{
- m_heap.didShrink = true;
-
ObjectIterator it(m_heap, block);
ObjectIterator end(m_heap, block + 1);
for ( ; it != end; ++it)
@@ -334,29 +329,9 @@ NEVER_INLINE void Heap::freeBlockPtr(CollectorBlock* block)
void Heap::freeBlocks()
{
- ProtectCountSet protectedValuesCopy = m_protectedValues;
-
- clearMarkBits();
- markProtectedObjects(m_globalData->markStack);
-
- m_heap.nextCell = 0;
- m_heap.nextBlock = 0;
- DeadObjectIterator it(m_heap, m_heap.nextBlock, m_heap.nextCell);
- DeadObjectIterator end(m_heap, m_heap.usedBlocks);
- for ( ; it != end; ++it)
- (*it)->~JSCell();
-
- ASSERT(!protectedObjectCount());
-
- ProtectCountSet::iterator protectedValuesEnd = protectedValuesCopy.end();
- for (ProtectCountSet::iterator protectedValuesIt = protectedValuesCopy.begin(); protectedValuesIt != protectedValuesEnd; ++protectedValuesIt)
- protectedValuesIt->first->~JSCell();
-
- for (size_t block = 0; block < m_heap.usedBlocks; ++block)
- freeBlockPtr(m_heap.blocks[block]);
-
+ while (m_heap.usedBlocks)
+ freeBlock(0);
fastFree(m_heap.blocks);
-
memset(&m_heap, 0, sizeof(CollectorHeap));
}
@@ -465,6 +440,7 @@ void Heap::shrinkBlocks(size_t neededBlocks)
for (size_t i = 0; i != m_heap.usedBlocks && m_heap.usedBlocks != neededBlocks; ) {
if (m_heap.blocks[i]->marked.isEmpty()) {
freeBlock(i);
+ m_heap.didShrink = true;
} else
++i;
}
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index bdba956..e941e00 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-01-19 Gavin Barraclough <barraclough at apple.com>
+
+ Reviewed by NOBODY (build fix).
+
+ Reverting r53455, breaks 2 javascriptcore tests.
+
+ * fast/workers/resources/worker-gc2.js: Removed.
+ * fast/workers/worker-gc2.html: Removed.
+
2010-01-19 Geoffrey Garen <ggaren at apple.com>
Forgot to add this test result.
diff --git a/LayoutTests/fast/workers/resources/worker-gc2.js b/LayoutTests/fast/workers/resources/worker-gc2.js
deleted file mode 100644
index 2f8f84e..0000000
--- a/LayoutTests/fast/workers/resources/worker-gc2.js
+++ /dev/null
@@ -1,25 +0,0 @@
-function Dummy()
-{
- this.x = 1;
- this.y = 1;
-}
-
-(function () {
- var d = new Dummy;
- var a = [];
-
- // Create an iterator at the beginning of the heap.
- for (var p in d) {
- a[a.length] = p;
- }
-
- // Fill the middle of the heap with blocks of garbage.
- for (var i = 0; i < 64 * 1024; ++i)
- a[a.length] = new Object;
-
- // Create an object sharing the structure pointed to by the above iterator late in the heap.
- new Dummy;
-
- postMessage('done');
- close();
-})();
diff --git a/LayoutTests/fast/workers/worker-gc2.html b/LayoutTests/fast/workers/worker-gc2.html
deleted file mode 100644
index a30150e..0000000
--- a/LayoutTests/fast/workers/worker-gc2.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<p>This page tests for a GC crash when tearing down a worker. If the tests passes,
-you'll see a PASS message below.</p>
-
-<pre id="console"></pre>
-
-<script>
-function $(id)
-{
- return document.getElementById(id);
-}
-
-function log(s)
-{
- $("console").appendChild(document.createTextNode(s + "\n"));
-}
-
-(function () {
- if (window.layoutTestController) {
- layoutTestController.dumpAsText();
- layoutTestController.waitUntilDone();
- }
-
- var worker = new Worker("resources/worker-gc2.js");
- worker.onmessage = function () {
- log("PASS: You didn't crash.");
-
- // Try to wait for the worker to finish closing.
- setTimeout(function () {
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, 0);
- }
-})();
-</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 971ac4f..453802e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,12 @@
+2010-01-19 Gavin Barraclough <barraclough at apple.com>
+
+ Reviewed by NOBODY (build fix).
+
+ Reverting r53455, breaks 2 javascriptcore tests.
+
+ * bindings/js/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::~WorkerScriptController):
+
2010-01-18 Geoffrey Garen <ggaren at apple.com>
Reviewed by Oliver Hunt.
diff --git a/WebCore/bindings/js/WorkerScriptController.cpp b/WebCore/bindings/js/WorkerScriptController.cpp
index adcc089..5e27ef7 100644
--- a/WebCore/bindings/js/WorkerScriptController.cpp
+++ b/WebCore/bindings/js/WorkerScriptController.cpp
@@ -58,6 +58,9 @@ WorkerScriptController::WorkerScriptController(WorkerContext* workerContext)
WorkerScriptController::~WorkerScriptController()
{
m_workerContextWrapper = 0; // Unprotect the global object.
+
+ ASSERT(!m_globalData->heap.protectedObjectCount());
+ ASSERT(!m_globalData->heap.isBusy());
m_globalData->heap.destroy();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list