diff options
Diffstat (limited to 'WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp')
-rw-r--r-- | WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp b/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp index 7ca18ab..c8a975b 100644 --- a/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp +++ b/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp @@ -33,6 +33,7 @@ #include "DOMStringMap.h" #include "V8Binding.h" +#include "V8DOMWrapper.h" namespace WebCore { @@ -93,4 +94,16 @@ v8::Handle<v8::Value> V8DOMStringMap::namedPropertySetter(v8::Local<v8::String> return value; } +v8::Handle<v8::Value> toV8(DOMStringMap* impl) +{ + if (!impl) + return v8::Null(); + v8::Handle<v8::Object> wrapper = V8DOMStringMap::wrap(impl); + // Add a hidden reference from the element to the DOMStringMap. + Element* element = impl->element(); + if (!wrapper.IsEmpty() && element) + V8DOMWrapper::setHiddenWindowReference(element->document()->frame(), wrapper); + return wrapper; +} + } // namespace WebCore |