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

Unified Diff: Source/bindings/dart/custom/DartNodeCustom.cpp

Issue 26380002: Fixing Node.clone returning non-upgraded Dart custom elements. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/custom/DartNodeCustom.cpp
diff --git a/Source/bindings/dart/custom/DartNodeCustom.cpp b/Source/bindings/dart/custom/DartNodeCustom.cpp
index a3722a5274a9ba0f34f2bd9e93ebf594bdb94b44..ab2ed7ff4f8b8928aa0d9e97c376e5e036c46f9d 100644
--- a/Source/bindings/dart/custom/DartNodeCustom.cpp
+++ b/Source/bindings/dart/custom/DartNodeCustom.cpp
@@ -43,6 +43,7 @@
#include "DartProcessingInstruction.h"
#include "DartText.h"
#include "bindings/dart/DartDOMWrapper.h"
+#include "core/dom/CustomElementCallbackDispatcher.h"
namespace WebCore {
@@ -164,6 +165,32 @@ fail:
ASSERT_NOT_REACHED();
}
+void cloneNodeCallback(Dart_NativeArguments args)
+{
+ Dart_Handle exception = 0;
+ {
+ Node* receiver = DartDOMWrapper::receiver< Node >(args);
+
+ bool deep = DartUtilities::dartToBool(args, 1, exception);
+ if (exception)
+ goto fail;
+
+ RefPtr<Node> result;
+ {
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+
+ result = receiver->cloneNode(deep);
+ }
+
+ DartNode::returnToDart(args, result);
+ return;
+ }
+
+fail:
+ Dart_ThrowException(exception);
+ ASSERT_NOT_REACHED();
+}
+
}
Dart_Handle DartNode::createWrapper(Node* node)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698