diff options
Diffstat (limited to 'WebCore/bindings/js/JSDOMWindowCustom.cpp')
-rw-r--r-- | WebCore/bindings/js/JSDOMWindowCustom.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/WebCore/bindings/js/JSDOMWindowCustom.cpp b/WebCore/bindings/js/JSDOMWindowCustom.cpp index af2353c..66631f6 100644 --- a/WebCore/bindings/js/JSDOMWindowCustom.cpp +++ b/WebCore/bindings/js/JSDOMWindowCustom.cpp @@ -107,16 +107,22 @@ bool JSDOMWindow::customGetOwnPropertySlot(ExecState* exec, const Identifier& pr return false; } -bool JSDOMWindow::customPut(ExecState* exec, const Identifier& propertyName, JSValue* value) +bool JSDOMWindow::customPut(ExecState* exec, const Identifier& propertyName, JSValue* value, int attr) { if (!impl()->frame()) return true; + // Called by an internal KJS, save time and jump directly to JSGlobalObject. + if (attr != None && attr != DontDelete) { + JSGlobalObject::put(exec, propertyName, value, attr); + return true; + } + // We have a local override (e.g. "var location"), save time and jump directly to JSGlobalObject. PropertySlot slot; if (JSGlobalObject::getOwnPropertySlot(exec, propertyName, slot)) { if (allowsAccessFrom(exec)) - JSGlobalObject::put(exec, propertyName, value); + JSGlobalObject::put(exec, propertyName, value, attr); return true; } |