| Index: sky/engine/bindings-dart/core/dart/DartMutationCallback.cpp
|
| diff --git a/sky/engine/bindings-dart/core/dart/DartMutationCallback.cpp b/sky/engine/bindings-dart/core/dart/DartMutationCallback.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5404ad026e6378a5d9855a87606ea42332a3d4c2
|
| --- /dev/null
|
| +++ b/sky/engine/bindings-dart/core/dart/DartMutationCallback.cpp
|
| @@ -0,0 +1,28 @@
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +#include "config.h"
|
| +#include "bindings/core/dart/DartMutationCallback.h"
|
| +
|
| +#include "bindings/core/dart/DartMutationObserver.h"
|
| +#include "bindings/core/dart/DartMutationRecord.h"
|
| +
|
| +namespace blink {
|
| +
|
| +void DartMutationCallback::call(const Vector<RefPtr<MutationRecord> >& mutations, MutationObserver* observer)
|
| +{
|
| + if (!m_callback.isIsolateAlive())
|
| + return;
|
| +
|
| + DartIsolateScope scope(m_callback.isolate());
|
| + DartApiScope apiScope;
|
| +
|
| + Dart_Handle arguments[] = {
|
| + DartDOMWrapper::vectorToDart<DartMutationRecord>(mutations),
|
| + DartMutationObserver::toDart(observer)
|
| + };
|
| + m_callback.handleEvent(2, arguments);
|
| +}
|
| +
|
| +}
|
|
|