| Index: Source/core/dom/Microtask.cpp
|
| diff --git a/Source/modules/mediastream/RTCSessionDescriptionCallback.h b/Source/core/dom/Microtask.cpp
|
| similarity index 72%
|
| copy from Source/modules/mediastream/RTCSessionDescriptionCallback.h
|
| copy to Source/core/dom/Microtask.cpp
|
| index 678daa7b0d0de42a2dc4f0b115412f71b1755d6b..cb0b12b618b570e67dee34c4aeb1aea6560b940f 100644
|
| --- a/Source/modules/mediastream/RTCSessionDescriptionCallback.h
|
| +++ b/Source/core/dom/Microtask.cpp
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (C) 2012 Google Inc. All rights reserved.
|
| + * Copyright (C) 2013 Google Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions
|
| @@ -28,21 +28,29 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef RTCSessionDescriptionCallback_h
|
| -#define RTCSessionDescriptionCallback_h
|
| +#include "config.h"
|
| +#include "core/dom/Microtask.h"
|
|
|
| -#include "wtf/RefCounted.h"
|
| +#include "core/dom/CustomElementCallbackDispatcher.h"
|
| +#include "core/dom/MutationObserver.h"
|
| +#include "wtf/Vector.h"
|
|
|
| namespace WebCore {
|
|
|
| -class RTCSessionDescription;
|
| +void Microtask::performCheckpoint()
|
| +{
|
| + static bool performingCheckpoint = false;
|
| + if (performingCheckpoint)
|
| + return;
|
| + performingCheckpoint = true;
|
|
|
| -class RTCSessionDescriptionCallback : public RefCounted<RTCSessionDescriptionCallback> {
|
| -public:
|
| - virtual ~RTCSessionDescriptionCallback() { }
|
| - virtual bool handleEvent(RTCSessionDescription*) = 0;
|
| -};
|
| + bool anyWorkDone;
|
| + do {
|
| + MutationObserver::deliverAllMutations();
|
| + anyWorkDone = CustomElementCallbackDispatcher::instance().dispatch();
|
| + } while (anyWorkDone);
|
|
|
| -} // namespace WebCore
|
| + performingCheckpoint = false;
|
| +}
|
|
|
| -#endif // RTCSessionDescriptionCallback_h
|
| +} // namespace WebCore
|
|
|