| Index: third_party/WebKit/Source/web/WebScopedMicrotaskSuppression.cpp
|
| diff --git a/third_party/WebKit/Source/platform/exported/WebURLRequestPrivate.h b/third_party/WebKit/Source/web/WebScopedMicrotaskSuppression.cpp
|
| similarity index 73%
|
| copy from third_party/WebKit/Source/platform/exported/WebURLRequestPrivate.h
|
| copy to third_party/WebKit/Source/web/WebScopedMicrotaskSuppression.cpp
|
| index 3163a9b53db9225a76cb10fc558076d3a0e48540..a719a9c0faa58b214cfddda2eae10ccea2ca2c4f 100644
|
| --- a/third_party/WebKit/Source/platform/exported/WebURLRequestPrivate.h
|
| +++ b/third_party/WebKit/Source/web/WebScopedMicrotaskSuppression.cpp
|
| @@ -28,29 +28,36 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef WebURLRequestPrivate_h
|
| -#define WebURLRequestPrivate_h
|
| +#include "public/web/WebScopedMicrotaskSuppression.h"
|
|
|
| -#include "wtf/Noncopyable.h"
|
| +#include "bindings/core/v8/V8RecursionScope.h"
|
| +#include "wtf/Assertions.h"
|
| +#include "wtf/OwnPtr.h"
|
|
|
| namespace blink {
|
|
|
| -class ResourceRequest;
|
| -
|
| -class WebURLRequestPrivate {
|
| - WTF_MAKE_NONCOPYABLE(WebURLRequestPrivate);
|
| +#if ENABLE(ASSERT)
|
| +class WebScopedMicrotaskSuppression::Impl : public V8RecursionScope::MicrotaskSuppression {
|
| public:
|
| - WebURLRequestPrivate()
|
| - : m_resourceRequest(0)
|
| + Impl(v8::Isolate* isolate)
|
| + : V8RecursionScope::MicrotaskSuppression(isolate)
|
| {
|
| }
|
| -
|
| - // Called by WebURLRequest when it no longer needs this object.
|
| - virtual void dispose() = 0;
|
| -
|
| - ResourceRequest* m_resourceRequest;
|
| };
|
| +#endif
|
|
|
| -} // namespace blink
|
| +void WebScopedMicrotaskSuppression::initialize()
|
| +{
|
| +#if ENABLE(ASSERT)
|
| + m_impl.reset(new Impl(v8::Isolate::GetCurrent()));
|
| +#endif
|
| +}
|
|
|
| +void WebScopedMicrotaskSuppression::reset()
|
| +{
|
| +#if ENABLE(ASSERT)
|
| + m_impl.reset(0);
|
| #endif
|
| +}
|
| +
|
| +} // namespace blink
|
|
|