Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Unified Diff: third_party/WebKit/Source/web/WebScopedMicrotaskSuppression.cpp

Issue 1806643002: Revert of Remove V8RecrusionScope, cleanup call sites. (patchset #8 id:140001 of https://codereview… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverts 1805543002 Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebKit.cpp ('k') | third_party/WebKit/Source/web/web.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/web/WebKit.cpp ('k') | third_party/WebKit/Source/web/web.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698