WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Moved to WebThread
bug-71242-20111128140209.patch (text/plain), 3.92 KB, created by
Adam Klein
on 2011-11-28 14:02:10 PST
(
hide
)
Description:
Moved to WebThread
Filename:
MIME Type:
Creator:
Adam Klein
Created:
2011-11-28 14:02:10 PST
Size:
3.92 KB
patch
obsolete
>Subversion Revision: 101106 >diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog >index 89b9dd149af0222f1c418a4dab3094c93f3e3e2e..8a804226f202af3a8d496e0cf7ec0480926675fa 100644 >--- a/Source/WebKit/chromium/ChangeLog >+++ b/Source/WebKit/chromium/ChangeLog >@@ -1,3 +1,24 @@ >+2011-11-28 Adam Klein <adamk@chromium.org> >+ >+ [chromium] WebKitMutationObserver::deliverAllMutations should be exposed through the Chromium API >+ https://bugs.webkit.org/show_bug.cgi?id=71242 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add addTaskObserver and removeTaskObserver to WebThread, >+ along with a new WebThread::TaskObserver interface. >+ >+ For mutation observers, add a TaskObserver to the main thread >+ to deliver mutations after each task runs. >+ >+ The Chromium side of this patch is http://codereview.chromium.org/8586038/ >+ >+ * public/WebThread.h: >+ (WebKit::WebThread::TaskObserver::~TaskObserver): >+ * src/WebKit.cpp: >+ (WebKit::initialize): >+ (WebKit::shutdown): >+ > 2011-11-23 Tommy Widenflycht <tommyw@google.com> > > [chromium] MediaStream API: Missing WEBKIT_EXPORT in WebMediaStreamRegistry >diff --git a/Source/WebKit/chromium/public/WebThread.h b/Source/WebKit/chromium/public/WebThread.h >index db25556f9fece68e6be6ed38f0da8229c0f7ee2a..f641db374e10185d5fd5510431c771e05ab9c213 100644 >--- a/Source/WebKit/chromium/public/WebThread.h >+++ b/Source/WebKit/chromium/public/WebThread.h >@@ -43,8 +43,16 @@ public: > virtual void run() = 0; > }; > >+ class TaskObserver { >+ public: >+ virtual ~TaskObserver() { } >+ virtual void didProcessTask() = 0; >+ }; >+ > virtual void postTask(Task*) = 0; > virtual void postDelayedTask(Task*, long long delayMs) = 0; >+ virtual void addTaskObserver(TaskObserver*) = 0; >+ virtual void removeTaskObserver(TaskObserver*) = 0; > > virtual ~WebThread() { } > }; >diff --git a/Source/WebKit/chromium/src/WebKit.cpp b/Source/WebKit/chromium/src/WebKit.cpp >index 7bcd9cf239a51cd52b4297f5edc2008749a06e1f..0d6d935a40cc1d272b775ae45166e7f49690dd6d 100644 >--- a/Source/WebKit/chromium/src/WebKit.cpp >+++ b/Source/WebKit/chromium/src/WebKit.cpp >@@ -39,9 +39,11 @@ > #include "Settings.h" > #include "TextEncoding.h" > #include "V8Binding.h" >+#include "WebKitMutationObserver.h" > #include "WebKitPlatformSupport.h" > #include "WebMediaPlayerClientImpl.h" > #include "WebSocket.h" >+#include "WebThread.h" > #include "WorkerContextExecutionProxy.h" > #include "v8.h" > >@@ -52,6 +54,22 @@ > > namespace WebKit { > >+#if ENABLE(MUTATION_OBSERVERS) >+namespace { >+ >+class EndOfTaskRunner : public WebThread::TaskObserver { >+public: >+ virtual void didProcessTask() >+ { >+ WebCore::WebKitMutationObserver::deliverAllMutations(); >+ } >+}; >+ >+} // namespace >+ >+static WebThread::TaskObserver* s_endOfTaskRunner = 0; >+#endif // ENABLE(MUTATION_OBSERVERS) >+ > // Make sure we are not re-initialized in the same address space. > // Doing so may cause hard to reproduce crashes. > static bool s_webKitInitialized = false; >@@ -75,6 +93,12 @@ void initialize(WebKitPlatformSupport* webKitPlatformSupport) > v8::V8::SetEntropySource(&generateEntropy); > v8::V8::Initialize(); > WebCore::V8BindingPerIsolateData::ensureInitialized(v8::Isolate::GetCurrent()); >+ >+#if ENABLE(MUTATION_OBSERVERS) >+ ASSERT(!s_endOfTaskRunner); >+ s_endOfTaskRunner = new EndOfTaskRunner; >+ webKitPlatformSupport->currentThread()->addTaskObserver(s_endOfTaskRunner); >+#endif > } > > void initializeWithoutV8(WebKitPlatformSupport* webKitPlatformSupport) >@@ -107,6 +131,13 @@ void shutdown() > { > delete WebCore::CCProxy::mainThread(); > WebCore::CCProxy::setMainThread(0); >+#if ENABLE(MUTATION_OBSERVERS) >+ if (s_endOfTaskRunner) { >+ s_webKitPlatformSupport->currentThread()->removeTaskObserver(s_endOfTaskRunner); >+ delete s_endOfTaskRunner; >+ s_endOfTaskRunner = 0; >+ } >+#endif > s_webKitPlatformSupport = 0; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 71242
:
115432
|
115657
|
116815
|
117032
|
117034
|
117283
|
117658