| Index: Source/bindings/v8/custom/V8NodeCustom.cpp
|
| diff --git a/Source/bindings/v8/custom/V8NodeCustom.cpp b/Source/bindings/v8/custom/V8NodeCustom.cpp
|
| index 0e74ef1e13403266118cf3c5f845267ba70e92bb..bde8861d4b20da1e28e979c2938b8659333f14d3 100644
|
| --- a/Source/bindings/v8/custom/V8NodeCustom.cpp
|
| +++ b/Source/bindings/v8/custom/V8NodeCustom.cpp
|
| @@ -66,8 +66,8 @@ void V8Node::insertBeforeMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
|
| CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
|
|
|
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "insertBefore", "Node", info.Holder(), info.GetIsolate());
|
| - Node* newChild = V8Node::hasInstance(info[0], info.GetIsolate()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0;
|
| - Node* refChild = V8Node::hasInstance(info[1], info.GetIsolate()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(info[1])) : 0;
|
| + Node* newChild = V8Node::toNativeWithTypeCheck(info.GetIsolate(), info[0]);
|
| + Node* refChild = V8Node::toNativeWithTypeCheck(info.GetIsolate(), info[1]);
|
| imp->insertBefore(newChild, refChild, exceptionState);
|
| if (exceptionState.throwIfNeeded())
|
| return;
|
| @@ -82,8 +82,8 @@ void V8Node::replaceChildMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
|
| CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
|
|
|
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "replaceChild", "Node", info.Holder(), info.GetIsolate());
|
| - Node* newChild = V8Node::hasInstance(info[0], info.GetIsolate()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0;
|
| - Node* oldChild = V8Node::hasInstance(info[1], info.GetIsolate()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(info[1])) : 0;
|
| + Node* newChild = V8Node::toNativeWithTypeCheck(info.GetIsolate(), info[0]);
|
| + Node* oldChild = V8Node::toNativeWithTypeCheck(info.GetIsolate(), info[1]);
|
| imp->replaceChild(newChild, oldChild, exceptionState);
|
| if (exceptionState.throwIfNeeded())
|
| return;
|
| @@ -98,7 +98,7 @@ void V8Node::removeChildMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
|
| CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
|
|
|
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "removeChild", "Node", info.Holder(), info.GetIsolate());
|
| - Node* oldChild = V8Node::hasInstance(info[0], info.GetIsolate()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0;
|
| + Node* oldChild = V8Node::toNativeWithTypeCheck(info.GetIsolate(), info[0]);
|
| imp->removeChild(oldChild, exceptionState);
|
| if (exceptionState.throwIfNeeded())
|
| return;
|
| @@ -113,7 +113,7 @@ void V8Node::appendChildMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
|
| CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
|
|
|
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "appendChild", "Node", info.Holder(), info.GetIsolate());
|
| - Node* newChild = V8Node::hasInstance(info[0], info.GetIsolate()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0;
|
| + Node* newChild = V8Node::toNativeWithTypeCheck(info.GetIsolate(), info[0]);
|
| imp->appendChild(newChild, exceptionState);
|
| if (exceptionState.throwIfNeeded())
|
| return;
|
|
|