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

Unified Diff: Source/bindings/v8/custom/V8NodeCustom.cpp

Issue 18789002: Implement Custom Elements' attributeChangedCallback. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Sync to tip. Created 7 years, 5 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 | « Source/bindings/v8/V8HiddenPropertyName.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8NodeCustom.cpp
diff --git a/Source/bindings/v8/custom/V8NodeCustom.cpp b/Source/bindings/v8/custom/V8NodeCustom.cpp
index 7b372b668493fa4e54e27e270ccc63c6105a5b41..dbd6defe72d5052455aa3bf2d629731675522e3f 100644
--- a/Source/bindings/v8/custom/V8NodeCustom.cpp
+++ b/Source/bindings/v8/custom/V8NodeCustom.cpp
@@ -49,6 +49,7 @@
#include "bindings/v8/V8AbstractEventListener.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8EventListener.h"
+#include "core/dom/CustomElementCallbackDispatcher.h"
#include "core/dom/Document.h"
#include "core/dom/EventListener.h"
#include "core/dom/shadow/ShadowRoot.h"
@@ -61,6 +62,9 @@ void V8Node::insertBeforeMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
{
v8::Handle<v8::Object> holder = args.Holder();
Node* imp = V8Node::toNative(holder);
+
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+
ExceptionCode ec = 0;
Node* newChild = V8Node::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
Node* refChild = V8Node::HasInstance(args[1], args.GetIsolate(), worldType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0;
@@ -81,6 +85,9 @@ void V8Node::replaceChildMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
{
v8::Handle<v8::Object> holder = args.Holder();
Node* imp = V8Node::toNative(holder);
+
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+
ExceptionCode ec = 0;
Node* newChild = V8Node::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
Node* oldChild = V8Node::HasInstance(args[1], args.GetIsolate(), worldType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0;
@@ -100,6 +107,9 @@ void V8Node::removeChildMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
{
v8::Handle<v8::Object> holder = args.Holder();
Node* imp = V8Node::toNative(holder);
+
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+
ExceptionCode ec = 0;
Node* oldChild = V8Node::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
bool success = imp->removeChild(oldChild, ec);
« no previous file with comments | « Source/bindings/v8/V8HiddenPropertyName.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698