summaryrefslogtreecommitdiffstats
path: root/WebCore/storage/StorageEventDispatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/storage/StorageEventDispatcher.cpp')
-rw-r--r--WebCore/storage/StorageEventDispatcher.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/WebCore/storage/StorageEventDispatcher.cpp b/WebCore/storage/StorageEventDispatcher.cpp
index 2118a83..5833c59 100644
--- a/WebCore/storage/StorageEventDispatcher.cpp
+++ b/WebCore/storage/StorageEventDispatcher.cpp
@@ -54,8 +54,12 @@ void StorageEventDispatcher::dispatch(const String& key, const String& oldValue,
frames.append(frame);
}
- for (unsigned i = 0; i < frames.size(); ++i)
- frames[i]->document()->enqueueEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->sessionStorage()));
+ for (unsigned i = 0; i < frames.size(); ++i) {
+ ExceptionCode ec = 0;
+ Storage* storage = frames[i]->domWindow()->sessionStorage(ec);
+ if (!ec)
+ frames[i]->document()->enqueueEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage));
+ }
} else {
// Send events to every page.
const HashSet<Page*>& pages = page->group().pages();