summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/WorkQueue.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-08-11 17:01:47 +0100
committerBen Murdoch <benm@google.com>2009-08-11 18:21:02 +0100
commit0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch)
tree2943df35f62d885c89d01063cc528dd73b480fea /WebKitTools/DumpRenderTree/WorkQueue.cpp
parent7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff)
downloadexternal_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2
Merge in WebKit r47029.
Diffstat (limited to 'WebKitTools/DumpRenderTree/WorkQueue.cpp')
-rw-r--r--WebKitTools/DumpRenderTree/WorkQueue.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/WebKitTools/DumpRenderTree/WorkQueue.cpp b/WebKitTools/DumpRenderTree/WorkQueue.cpp
index 0891b9c..0106fba 100644
--- a/WebKitTools/DumpRenderTree/WorkQueue.cpp
+++ b/WebKitTools/DumpRenderTree/WorkQueue.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -87,3 +87,18 @@ void WorkQueue::clear()
startOfQueue = 0;
endOfQueue = 0;
}
+
+bool WorkQueue::processWork()
+{
+ bool startedLoad = false;
+
+ while (!startedLoad && count()) {
+ WorkQueueItem* item = dequeue();
+ ASSERT(item);
+ startedLoad = item->invoke();
+ delete item;
+ }
+
+ // If we're done and we didn't start a load, then we're really done, so return true.
+ return !startedLoad;
+}