| Index: Source/bindings/core/dart/DartIsolateDestructionObserver.cpp
|
| diff --git a/Source/core/svg/SVGAnimatedInteger.cpp b/Source/bindings/core/dart/DartIsolateDestructionObserver.cpp
|
| similarity index 70%
|
| copy from Source/core/svg/SVGAnimatedInteger.cpp
|
| copy to Source/bindings/core/dart/DartIsolateDestructionObserver.cpp
|
| index eaa4e71009d3839e405365ec42d1f5bd1bc4ed94..8f8833b52bd0f8da6dc4d8269667a13db4f91335 100644
|
| --- a/Source/core/svg/SVGAnimatedInteger.cpp
|
| +++ b/Source/bindings/core/dart/DartIsolateDestructionObserver.cpp
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (C) 2014 Google Inc. All rights reserved.
|
| + * Copyright (C) 2006-2012 Google Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -29,27 +29,31 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "core/svg/SVGAnimatedInteger.h"
|
| +#include "bindings/core/dart/DartIsolateDestructionObserver.h"
|
|
|
| -#include "core/svg/SVGAnimatedIntegerOptionalInteger.h"
|
| -#include "core/svg/SVGElement.h"
|
| +#include "bindings/core/dart/DartDOMData.h"
|
| +#include "bindings/core/dart/DartUtilities.h"
|
|
|
| namespace blink {
|
|
|
| -void SVGAnimatedInteger::synchronizeAttribute()
|
| +DartIsolateDestructionObserver::DartIsolateDestructionObserver()
|
| {
|
| - if (m_parentIntegerOptionalInteger) {
|
| - m_parentIntegerOptionalInteger->synchronizeAttribute();
|
| + m_isolate = Dart_CurrentIsolate();
|
| + DartDOMData::current()->isolateDestructionObservers()->add(this);
|
| +}
|
| +
|
| +DartIsolateDestructionObserver::~DartIsolateDestructionObserver()
|
| +{
|
| + if (!m_isolate)
|
| return;
|
| - }
|
|
|
| - SVGAnimatedProperty<SVGInteger>::synchronizeAttribute();
|
| + DartIsolateScope scope(m_isolate);
|
| + DartDOMData::current()->isolateDestructionObservers()->remove(this);
|
| }
|
|
|
| -DEFINE_TRACE(SVGAnimatedInteger)
|
| +void DartIsolateDestructionObserver::isolateDestroyed()
|
| {
|
| - visitor->trace(m_parentIntegerOptionalInteger);
|
| - SVGAnimatedProperty<SVGInteger>::trace(visitor);
|
| + m_isolate = 0;
|
| }
|
|
|
| }
|
|
|