diff options
Diffstat (limited to 'WebCore/bindings/js/JSDOMWindowShell.cpp')
| -rw-r--r-- | WebCore/bindings/js/JSDOMWindowShell.cpp | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/WebCore/bindings/js/JSDOMWindowShell.cpp b/WebCore/bindings/js/JSDOMWindowShell.cpp index efffd42..09141ee 100644 --- a/WebCore/bindings/js/JSDOMWindowShell.cpp +++ b/WebCore/bindings/js/JSDOMWindowShell.cpp @@ -43,9 +43,10 @@ ASSERT_CLASS_FITS_IN_CELL(JSDOMWindowShell); const ClassInfo JSDOMWindowShell::s_info = { "JSDOMWindowShell", 0, 0, 0 }; -JSDOMWindowShell::JSDOMWindowShell(PassRefPtr<DOMWindow> window) +JSDOMWindowShell::JSDOMWindowShell(PassRefPtr<DOMWindow> window, DOMWrapperWorld* world) : Base(JSDOMWindowShell::createStructure(jsNull())) , m_window(0) + , m_world(world) { setWindow(window); } @@ -88,6 +89,11 @@ bool JSDOMWindowShell::getOwnPropertySlot(ExecState* exec, const Identifier& pro return m_window->getOwnPropertySlot(exec, propertyName, slot); } +bool JSDOMWindowShell::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return m_window->getOwnPropertyDescriptor(exec, propertyName, descriptor); +} + void JSDOMWindowShell::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { m_window->put(exec, propertyName, value, slot); @@ -98,6 +104,11 @@ void JSDOMWindowShell::putWithAttributes(ExecState* exec, const Identifier& prop m_window->putWithAttributes(exec, propertyName, value, attributes); } +bool JSDOMWindowShell::defineOwnProperty(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::PropertyDescriptor& descriptor, bool shouldThrow) +{ + return m_window->defineOwnProperty(exec, propertyName, descriptor, shouldThrow); +} + bool JSDOMWindowShell::deleteProperty(ExecState* exec, const Identifier& propertyName) { return m_window->deleteProperty(exec, propertyName); @@ -108,19 +119,19 @@ void JSDOMWindowShell::getPropertyNames(ExecState* exec, PropertyNameArray& prop m_window->getPropertyNames(exec, propertyNames); } -bool JSDOMWindowShell::getPropertyAttributes(JSC::ExecState* exec, const Identifier& propertyName, unsigned& attributes) const +void JSDOMWindowShell::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { - return m_window->getPropertyAttributes(exec, propertyName, attributes); + m_window->getOwnPropertyNames(exec, propertyNames); } -void JSDOMWindowShell::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunction) +void JSDOMWindowShell::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes) { - m_window->defineGetter(exec, propertyName, getterFunction); + m_window->defineGetter(exec, propertyName, getterFunction, attributes); } -void JSDOMWindowShell::defineSetter(ExecState* exec, const Identifier& propertyName, JSObject* setterFunction) +void JSDOMWindowShell::defineSetter(ExecState* exec, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes) { - m_window->defineSetter(exec, propertyName, setterFunction); + m_window->defineSetter(exec, propertyName, setterFunction, attributes); } JSValue JSDOMWindowShell::lookupGetter(ExecState* exec, const Identifier& propertyName) @@ -156,18 +167,18 @@ void* JSDOMWindowShell::operator new(size_t size) // Conversion methods // ---- -JSValue toJS(ExecState*, Frame* frame) +JSValue toJS(ExecState* exec, Frame* frame) { if (!frame) return jsNull(); - return frame->script()->windowShell(); + return frame->script()->windowShell(currentWorld(exec)); } -JSDOMWindowShell* toJSDOMWindowShell(Frame* frame) +JSDOMWindowShell* toJSDOMWindowShell(Frame* frame, DOMWrapperWorld* isolatedWorld) { if (!frame) return 0; - return frame->script()->windowShell(); + return frame->script()->windowShell(isolatedWorld); } } // namespace WebCore |
