diff options
Diffstat (limited to 'Source/WebCore/bindings/v8/custom/V8HTMLElementCustom.cpp')
-rw-r--r-- | Source/WebCore/bindings/v8/custom/V8HTMLElementCustom.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Source/WebCore/bindings/v8/custom/V8HTMLElementCustom.cpp b/Source/WebCore/bindings/v8/custom/V8HTMLElementCustom.cpp index 19286124f..695cb052e 100644 --- a/Source/WebCore/bindings/v8/custom/V8HTMLElementCustom.cpp +++ b/Source/WebCore/bindings/v8/custom/V8HTMLElementCustom.cpp @@ -40,27 +40,25 @@ namespace WebCore { +v8::Handle<v8::Value> toV8(HTMLElement* impl, v8::Isolate* isolate, bool forceNewObject) +{ + if (!impl) + return v8NullWithCheck(isolate); + return createV8HTMLWrapper(impl, isolate, forceNewObject); +} + #if ENABLE(MICRODATA) static v8::Handle<v8::Value> toV8Object(MicroDataItemValue* itemValue, v8::Isolate* isolate) { if (!itemValue) - return v8::Null(); + return v8::Null(isolate); if (itemValue->isNode()) return toV8(itemValue->getNode(), isolate); - return v8String(itemValue->getString()); -} -#endif - -v8::Handle<v8::Value> toV8(HTMLElement* impl, v8::Isolate* isolate, bool forceNewObject) -{ - if (!impl) - return v8::Null(); - return createV8HTMLWrapper(impl, isolate, forceNewObject); + return v8String(itemValue->getString(), isolate); } -#if ENABLE(MICRODATA) v8::Handle<v8::Value> V8HTMLElement::itemValueAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { HTMLElement* impl = V8HTMLElement::toNative(info.Holder()); |