summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-09-02 16:31:46 +0100
committerBen Murdoch <benm@google.com>2009-09-02 16:31:46 +0100
commitc6797061eb817691828e1b3759653c693b3fa438 (patch)
treecbd270334ca5008a15b72edd9cf273ac16e2be2c /WebCore/bindings
parent75310d0981eaef5dfd790e839bf23d7851b68d10 (diff)
downloadexternal_webkit-c6797061eb817691828e1b3759653c693b3fa438.zip
external_webkit-c6797061eb817691828e1b3759653c693b3fa438.tar.gz
external_webkit-c6797061eb817691828e1b3759653c693b3fa438.tar.bz2
Fix the DOM storage layout tests when running with V8. Change the custom bindings to ignore requests for the length attribute and update the event handling code to create Storage Events properly.
Diffstat (limited to 'WebCore/bindings')
-rw-r--r--WebCore/bindings/v8/V8DOMWrapper.cpp4
-rwxr-xr-xWebCore/bindings/v8/custom/V8StorageCustom.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/WebCore/bindings/v8/V8DOMWrapper.cpp b/WebCore/bindings/v8/V8DOMWrapper.cpp
index 5497732..8a9741a 100644
--- a/WebCore/bindings/v8/V8DOMWrapper.cpp
+++ b/WebCore/bindings/v8/V8DOMWrapper.cpp
@@ -1118,6 +1118,10 @@ v8::Handle<v8::Value> V8DOMWrapper::convertEventToV8Object(Event* event)
else if (event->isErrorEvent())
type = V8ClassIndex::ERROREVENT;
#endif
+#if ENABLE(DOM_STORAGE)
+ else if (event->isStorageEvent())
+ type = V8ClassIndex::STORAGEEVENT;
+#endif
v8::Handle<v8::Object> result = instantiateV8Object(type, V8ClassIndex::EVENT, event);
diff --git a/WebCore/bindings/v8/custom/V8StorageCustom.cpp b/WebCore/bindings/v8/custom/V8StorageCustom.cpp
index b54e50e..f3f4687 100755
--- a/WebCore/bindings/v8/custom/V8StorageCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8StorageCustom.cpp
@@ -60,7 +60,7 @@ static v8::Handle<v8::Value> storageGetter(v8::Local<v8::String> v8Name, const v
Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, info.Holder());
String name = toWebCoreString(v8Name);
- if (storage->contains(name))
+ if (storage->contains(name) && name != "length")
return v8String(storage->getItem(name));
return notHandledByInterceptor();