Index: Source/bindings/dart/DartCustomElementWrapper.cpp |
=================================================================== |
--- Source/bindings/dart/DartCustomElementWrapper.cpp (revision 1437) |
+++ Source/bindings/dart/DartCustomElementWrapper.cpp (working copy) |
@@ -114,13 +114,10 @@ |
Dart_Handle newInstance = Dart_Allocate(customType); |
ASSERT(!Dart_IsError(newInstance)); |
+ DartDOMWrapper::writeNativePointer(newInstance, element, DartHTMLElement::dartClassId); |
- Dart_Handle result = Dart_SetNativeInstanceField(newInstance, 0, reinterpret_cast<intptr_t>(element)); |
- UNUSED_PARAM(result); |
- ASSERT(!Dart_IsError(result)); |
+ Dart_Handle result = Dart_InvokeConstructor(newInstance, Dart_NewStringFromCString("created"), 0, 0); |
- result = Dart_InvokeConstructor(newInstance, Dart_NewStringFromCString("created"), 0, 0); |
- |
if (Dart_IsError(result)) { |
DartUtilities::reportProblem(domData->scriptExecutionContext(), result); |
@@ -136,10 +133,7 @@ |
Dart_Handle fallbackWrapper = createUpgradeCandidateWrapper(element, createSpecificWrapper); |
DartDOMWrapper::associateWrapper<DartHTMLElement>(domData, element, fallbackWrapper); |
- Dart_Handle result = Dart_SetNativeInstanceField(fallbackWrapper, 0, reinterpret_cast<intptr_t>(element)); |
- UNUSED_PARAM(result); |
- ASSERT(!Dart_IsError(result)); |
- |
+ DartDOMWrapper::writeNativePointer(fallbackWrapper, element, DartHTMLElement::dartClassId); |
return fallbackWrapper; |
} |
return newInstance; |