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

Unified Diff: Source/bindings/core/dart/DartIsolateDestructionObserver.cpp

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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: 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;
}
}
« no previous file with comments | « Source/bindings/core/dart/DartIsolateDestructionObserver.h ('k') | Source/bindings/core/dart/DartJsInterop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698