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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h

Issue 2843603002: Move ScriptWrappable and dependencies to platform/bindings (Closed)
Patch Set: Rebase and try again Created 3 years, 8 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
Index: third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h b/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h
index 5af6cddbc1e71e7aa4ac0b9476ff8777d744030d..25fa89e0e5362272b03fbf9f28452dcb72e9ed67 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h
@@ -2,68 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ActiveScriptWrappable_h
-#define ActiveScriptWrappable_h
-
-#include "core/CoreExport.h"
-#include "platform/heap/Handle.h"
-#include "platform/wtf/Noncopyable.h"
-
-namespace v8 {
-class Isolate;
-}
-
-namespace blink {
-
-class ScriptWrappable;
-class ScriptWrappableVisitor;
-
-/**
- * Classes deriving from ActiveScriptWrappable will be registered in a
- * thread-specific list. They keep their wrappers and dependant objects alive
- * as long as they have pending activity.
- */
-class CORE_EXPORT ActiveScriptWrappableBase : public GarbageCollectedMixin {
- WTF_MAKE_NONCOPYABLE(ActiveScriptWrappableBase);
-
- public:
- ActiveScriptWrappableBase();
-
- static void TraceActiveScriptWrappables(v8::Isolate*,
- ScriptWrappableVisitor*);
-
- protected:
- virtual bool IsContextDestroyed(ActiveScriptWrappableBase*) const = 0;
- virtual bool DispatchHasPendingActivity(ActiveScriptWrappableBase*) const = 0;
- virtual ScriptWrappable* ToScriptWrappable(
- ActiveScriptWrappableBase*) const = 0;
-};
-
-template <typename T>
-class ActiveScriptWrappable : public ActiveScriptWrappableBase {
- WTF_MAKE_NONCOPYABLE(ActiveScriptWrappable);
-
- public:
- ActiveScriptWrappable() {}
-
- protected:
- bool IsContextDestroyed(ActiveScriptWrappableBase* object) const final {
- return !(static_cast<T*>(object)->T::GetExecutionContext)() ||
- (static_cast<T*>(object)->T::GetExecutionContext)()
- ->IsContextDestroyed();
- }
-
- bool DispatchHasPendingActivity(
- ActiveScriptWrappableBase* object) const final {
- return static_cast<T*>(object)->T::HasPendingActivity();
- }
-
- ScriptWrappable* ToScriptWrappable(
- ActiveScriptWrappableBase* object) const final {
- return static_cast<T*>(object);
- }
-};
-
-} // namespace blink
-
-#endif // ActiveScriptWrappable_h
+// This file has been moved to platform/bindings/ActiveScriptWrappable.h.
+// TODO(adithyas): Remove this file.
+#include "platform/bindings/ActiveScriptWrappable.h"
« no previous file with comments | « third_party/WebKit/Source/bindings/bindings.gni ('k') | third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698