diff options
Diffstat (limited to 'WebCore/bindings/js/JSNamedNodeMapCustom.cpp')
| -rw-r--r-- | WebCore/bindings/js/JSNamedNodeMapCustom.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/WebCore/bindings/js/JSNamedNodeMapCustom.cpp b/WebCore/bindings/js/JSNamedNodeMapCustom.cpp index 7bd95b4..d1bbeec 100644 --- a/WebCore/bindings/js/JSNamedNodeMapCustom.cpp +++ b/WebCore/bindings/js/JSNamedNodeMapCustom.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,10 +27,9 @@ #include "JSNamedNodeMap.h" #include "JSNode.h" + +#include "Element.h" #include "NamedNodeMap.h" -#include "Node.h" -#include "PlatformString.h" -#include "JSDOMBinding.h" using namespace JSC; @@ -47,4 +46,14 @@ JSValue JSNamedNodeMap::nameGetter(ExecState* exec, const Identifier& propertyNa return toJS(exec, thisObj->impl()->getNamedItem(propertyName)); } +void JSNamedNodeMap::markChildren(MarkStack& markStack) +{ + Base::markChildren(markStack); + + // Mark the element so that this will work to access the attribute even if the last + // other reference goes away. + if (Element* element = impl()->element()) + markDOMNodeWrapper(markStack, element->document(), element); +} + } // namespace WebCore |
