summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-09-04 04:13:00 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-09-04 04:13:00 -0700
commitb0ec0c6b01e7a194c54a7752289799cfbd34f963 (patch)
tree922a85e676644ea7c1867dc7c7337722b915703a /WebCore
parent2917534d5463c3d95ba2d04dbc39b36b6dfb303f (diff)
parentc6797061eb817691828e1b3759653c693b3fa438 (diff)
downloadexternal_webkit-b0ec0c6b01e7a194c54a7752289799cfbd34f963.zip
external_webkit-b0ec0c6b01e7a194c54a7752289799cfbd34f963.tar.gz
external_webkit-b0ec0c6b01e7a194c54a7752289799cfbd34f963.tar.bz2
Merge change 23625 into eclair
* changes: 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')
-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();