Commit 6b0ccefa authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[bindings] Allow general visitor for tracing ActiveScriptWrappable

Bug: chromium:843903
Change-Id: Ifeb9aa280b76cb894ff5ccdcdf5dd9390f2ee367
Reviewed-on: https://chromium-review.googlesource.com/1158204Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579732}
parent aa00397a
......@@ -6,15 +6,15 @@
#include "third_party/blink/renderer/platform/bindings/dom_data_store.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable_visitor.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
#include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h"
#include "third_party/blink/renderer/platform/heap/visitor.h"
namespace blink {
void ActiveScriptWrappableBase::TraceActiveScriptWrappables(
v8::Isolate* isolate,
ScriptWrappableVisitor* visitor) {
Visitor* visitor) {
V8PerIsolateData* isolate_data = V8PerIsolateData::From(isolate);
const auto* active_script_wrappables = isolate_data->ActiveScriptWrappables();
if (!active_script_wrappables)
......@@ -40,8 +40,6 @@ void ActiveScriptWrappableBase::TraceActiveScriptWrappables(
if (active_wrappable->IsContextDestroyed())
continue;
ScriptWrappable* script_wrappable = active_wrappable->ToScriptWrappable();
// Notify the visitor about this script_wrappable by dispatching to the
// corresponding Trace method.
visitor->TraceWithWrappers(script_wrappable);
}
}
......
......@@ -13,7 +13,7 @@
namespace blink {
class ScriptWrappable;
class ScriptWrappableVisitor;
class Visitor;
/**
* Classes deriving from ActiveScriptWrappable will be registered in a
......@@ -24,8 +24,7 @@ class PLATFORM_EXPORT ActiveScriptWrappableBase : public GarbageCollectedMixin {
WTF_MAKE_NONCOPYABLE(ActiveScriptWrappableBase);
public:
static void TraceActiveScriptWrappables(v8::Isolate*,
ScriptWrappableVisitor*);
static void TraceActiveScriptWrappables(v8::Isolate*, Visitor*);
virtual ~ActiveScriptWrappableBase() = default;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment