https://bugs.webkit.org/show_bug.cgi?id=68336
Patch by Kentaro Hara <haraken@chromium.org> on 2011-09-28
Reviewed by Adam Barth.
Source/WebCore:
Test: fast/events/constructors/error-event-constructor.html
* bindings/v8/OptionsObject.cpp:
(WebCore::OptionsObject::getKeyValue): Returns an unsigned value corresponding to a given key.
* bindings/v8/OptionsObject.h:
* bindings/v8/custom/V8EventConstructors.cpp: Added the ErrorEvent constructor.
* dom/ErrorEvent.idl: Added a 'V8CustomConstructor' attribute.
LayoutTests:
Enabled fast/events/constructors/error-event-constructor.html,
since V8 now has the constructor for ErrorEvent.
* platform/chromium/test_expectations.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96208
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-09-28 Kentaro Hara <haraken@chromium.org>
+
+ Implement an ErrorEvent constructor for V8
+ https://bugs.webkit.org/show_bug.cgi?id=68336
+
+ Reviewed by Adam Barth.
+
+ Enabled fast/events/constructors/error-event-constructor.html,
+ since V8 now has the constructor for ErrorEvent.
+
+ * platform/chromium/test_expectations.txt:
+
2011-09-28 Gabor Rapcsanyi <rgabor@webkit.org>
[Qt][GTK] Skip http/tests/multipart/stop-crash.html because it fails after r96174.
// Implement java testing harness.
BUGCR36681 SKIP : java = TEXT
-// This will soon be fixed after implementing an ErrorEvent constructor for V8.
-BUGWK68148 : fast/events/constructors/error-event-constructor.html = FAIL
-
// Quota API is not supported in DRT yet.
BUGCR84572 SKIP : storage/storageinfo-query-usage.html = FAIL
BUGCR84572 SKIP : storage/storageinfo-request-quota.html = FAIL
+2011-09-28 Kentaro Hara <haraken@chromium.org>
+
+ Implement an ErrorEvent constructor for V8
+ https://bugs.webkit.org/show_bug.cgi?id=68336
+
+ Reviewed by Adam Barth.
+
+ Test: fast/events/constructors/error-event-constructor.html
+
+ * bindings/v8/OptionsObject.cpp:
+ (WebCore::OptionsObject::getKeyValue): Returns an unsigned value corresponding to a given key.
+ * bindings/v8/OptionsObject.h:
+ * bindings/v8/custom/V8EventConstructors.cpp: Added the ErrorEvent constructor.
+ * dom/ErrorEvent.idl: Added a 'V8CustomConstructor' attribute.
+
2011-09-27 Andy Estes <aestes@apple.com>
WebKitLinkedOnOrAfter() check is ineffective for Solar Walk app-specific hack.
return true;
}
+bool OptionsObject::getKeyValue(const String& key, unsigned& value) const
+{
+ v8::Local<v8::Value> v8Value;
+ if (!getKey(key, v8Value))
+ return false;
+
+ v8::Local<v8::Int32> v8Int32 = v8Value->ToInt32();
+ if (v8Int32.IsEmpty())
+ return false;
+ value = static_cast<unsigned>(v8Int32->Value());
+ return true;
+}
+
bool OptionsObject::getKeyValue(const String& key, unsigned long long& value) const
{
v8::Local<v8::Value> v8Value;
value = ScriptValue(v8Value);
return true;
}
- bool getKeyValue(const String& key, unsigned short& value) const;
- bool getKeyValue(const String& key, unsigned long long& value) const;
+ bool getKeyValue(const String&, unsigned short&) const;
+ bool getKeyValue(const String&, unsigned&) const;
+ bool getKeyValue(const String&, unsigned long long&) const;
private:
bool getKey(const String& key, v8::Local<v8::Value>&) const;
#include "CustomEvent.h"
#include "Document.h"
#include "DocumentFragment.h"
+#include "ErrorEvent.h"
#include "HashChangeEvent.h"
#include "Node.h"
#include "PageTransitionEvent.h"
#include "V8CloseEvent.h"
#include "V8CustomEvent.h"
#include "V8Document.h"
+#include "V8ErrorEvent.h"
#include "V8Event.h"
#include "V8HashChangeEvent.h"
#include "V8Node.h"
INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_HASH_CHANGE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_CLOSE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_PAGE_TRANSITION_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
+INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_ERROR_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
} // namespace WebCore
interface [
NoStaticTables,
CanBeConstructed,
- CustomConstructFunction
+ CustomConstructFunction,
+ V8CustomConstructor
] ErrorEvent : Event {
readonly attribute DOMString message;