Diff
Modified: trunk/Source/WebCore/ChangeLog (98714 => 98715)
--- trunk/Source/WebCore/ChangeLog 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebCore/ChangeLog 2011-10-28 09:52:28 UTC (rev 98715)
@@ -1,3 +1,33 @@
+2011-10-28 Adam Barth <[email protected]>
+
+ Remove getExceptionCodeDescription()
+ https://bugs.webkit.org/show_bug.cgi?id=71103
+
+ Reviewed by Eric Seidel.
+
+ This function serves no purpose.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::setDOMException):
+ * bindings/objc/ExceptionHandlers.mm:
+ (WebCore::raiseDOMException):
+ * bindings/scripts/CodeGeneratorGObject.pm:
+ ():
+ * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+ (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
+ (webkit_dom_test_obj_method_with_exception):
+ (webkit_dom_test_obj_with_script_state_void_exception):
+ (webkit_dom_test_obj_with_script_state_obj_exception):
+ (webkit_dom_test_obj_get_attr_with_getter_exception):
+ (webkit_dom_test_obj_set_attr_with_getter_exception):
+ (webkit_dom_test_obj_set_attr_with_setter_exception):
+ (webkit_dom_test_obj_set_string_attr_with_getter_exception):
+ (webkit_dom_test_obj_set_string_attr_with_setter_exception):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setDOMException):
+ * dom/ExceptionCode.cpp:
+ * dom/ExceptionCode.h:
+
2011-10-19 Alexander Pavlov <[email protected]>
Web Inspector: CSS background-image applied inline shows a warning, but still works.
Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (98714 => 98715)
--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2011-10-28 09:52:28 UTC (rev 98715)
@@ -209,8 +209,7 @@
// frames[0].document.createElement(null, null); // throws an exception which should have the subframes prototypes.
JSDOMGlobalObject* globalObject = deprecatedGlobalObjectForPrototype(exec);
- ExceptionCodeDescription description;
- getExceptionCodeDescription(ec, description);
+ ExceptionCodeDescription description(ec);
JSValue errorObject;
switch (description.type) {
Modified: trunk/Source/WebCore/bindings/objc/ExceptionHandlers.mm (98714 => 98715)
--- trunk/Source/WebCore/bindings/objc/ExceptionHandlers.mm 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebCore/bindings/objc/ExceptionHandlers.mm 2011-10-28 09:52:28 UTC (rev 98715)
@@ -43,8 +43,7 @@
{
ASSERT(ec);
- ExceptionCodeDescription description;
- getExceptionCodeDescription(ec, description);
+ ExceptionCodeDescription description(ec);
NSString *exceptionName;
if (strcmp(description.typeName, "DOM Range") == 0)
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (98714 => 98715)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2011-10-28 09:52:28 UTC (rev 98715)
@@ -920,8 +920,7 @@
if(@{$function->raisesExceptions}) {
my $exceptionHandling = << "EOF";
- WebCore::ExceptionCodeDescription ecdesc;
- WebCore::getExceptionCodeDescription(ec, ecdesc);
+ WebCore::ExceptionCodeDescription ecdesc(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
EOF
push(@cBody, $exceptionHandling);
@@ -954,8 +953,7 @@
if(@{$function->raisesExceptions}) {
my $exceptionHandling = << "EOF";
if (ec) {
- WebCore::ExceptionCodeDescription ecdesc;
- WebCore::getExceptionCodeDescription(ec, ecdesc);
+ WebCore::ExceptionCodeDescription ecdesc(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
}
EOF
@@ -1225,8 +1223,7 @@
WebCore::ExceptionCode ec = 0;
coreTarget->dispatchEvent(coreEvent, ec);
if (ec) {
- WebCore::ExceptionCodeDescription description;
- WebCore::getExceptionCodeDescription(ec, description);
+ WebCore::ExceptionCodeDescription description(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), description.code, description.name);
}
}
Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (98714 => 98715)
--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2011-10-28 09:52:28 UTC (rev 98715)
@@ -176,8 +176,7 @@
WebCore::ExceptionCode ec = 0;
PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->methodThatRequiresAllArgsAndThrows(converted_str_arg, converted_obj_arg, ec));
if (ec) {
- WebCore::ExceptionCodeDescription ecdesc;
- WebCore::getExceptionCodeDescription(ec, ecdesc);
+ WebCore::ExceptionCodeDescription ecdesc(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
}
WebKitDOMTestObj* res = WebKit::kit(g_res.get());
@@ -244,8 +243,7 @@
WebCore::ExceptionCode ec = 0;
item->methodWithException(ec);
if (ec) {
- WebCore::ExceptionCodeDescription ecdesc;
- WebCore::getExceptionCodeDescription(ec, ecdesc);
+ WebCore::ExceptionCodeDescription ecdesc(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
}
}
@@ -324,8 +322,7 @@
WebCore::ExceptionCode ec = 0;
item->withScriptStateVoidException(ec);
if (ec) {
- WebCore::ExceptionCodeDescription ecdesc;
- WebCore::getExceptionCodeDescription(ec, ecdesc);
+ WebCore::ExceptionCodeDescription ecdesc(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
}
}
@@ -339,8 +336,7 @@
WebCore::ExceptionCode ec = 0;
PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObjException(ec));
if (ec) {
- WebCore::ExceptionCodeDescription ecdesc;
- WebCore::getExceptionCodeDescription(ec, ecdesc);
+ WebCore::ExceptionCodeDescription ecdesc(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
}
WebKitDOMTestObj* res = WebKit::kit(g_res.get());
@@ -886,8 +882,7 @@
WebCore::ExceptionCode ec = 0;
glong res = item->attrWithGetterException(ec);
if (ec) {
- WebCore::ExceptionCodeDescription ecdesc;
- WebCore::getExceptionCodeDescription(ec, ecdesc);
+ WebCore::ExceptionCodeDescription ecdesc(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
}
return res;
@@ -902,8 +897,7 @@
WebCore::ExceptionCode ec = 0;
item->setAttrWithGetterException(value, ec);
if (ec) {
- WebCore::ExceptionCodeDescription ecdesc;
- WebCore::getExceptionCodeDescription(ec, ecdesc);
+ WebCore::ExceptionCodeDescription ecdesc(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
}
}
@@ -927,8 +921,7 @@
WebCore::ExceptionCode ec = 0;
item->setAttrWithSetterException(value, ec);
if (ec) {
- WebCore::ExceptionCodeDescription ecdesc;
- WebCore::getExceptionCodeDescription(ec, ecdesc);
+ WebCore::ExceptionCodeDescription ecdesc(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
}
}
@@ -955,8 +948,7 @@
WebCore::ExceptionCode ec = 0;
item->setStringAttrWithGetterException(converted_value, ec);
if (ec) {
- WebCore::ExceptionCodeDescription ecdesc;
- WebCore::getExceptionCodeDescription(ec, ecdesc);
+ WebCore::ExceptionCodeDescription ecdesc(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
}
}
@@ -982,8 +974,7 @@
WebCore::ExceptionCode ec = 0;
item->setStringAttrWithSetterException(converted_value, ec);
if (ec) {
- WebCore::ExceptionCodeDescription ecdesc;
- WebCore::getExceptionCodeDescription(ec, ecdesc);
+ WebCore::ExceptionCodeDescription ecdesc(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
}
}
Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.cpp (98714 => 98715)
--- trunk/Source/WebCore/bindings/v8/V8Proxy.cpp 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.cpp 2011-10-28 09:52:28 UTC (rev 98715)
@@ -649,13 +649,12 @@
windowShell()->clearForNavigation();
}
-void V8Proxy::setDOMException(int exceptionCode)
+void V8Proxy::setDOMException(int ec)
{
- if (exceptionCode <= 0)
+ if (ec <= 0)
return;
- ExceptionCodeDescription description;
- getExceptionCodeDescription(exceptionCode, description);
+ ExceptionCodeDescription description(ec);
v8::Handle<v8::Value> exception;
switch (description.type) {
Modified: trunk/Source/WebCore/dom/ExceptionCode.cpp (98714 => 98715)
--- trunk/Source/WebCore/dom/ExceptionCode.cpp 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebCore/dom/ExceptionCode.cpp 2011-10-28 09:52:28 UTC (rev 98715)
@@ -26,15 +26,4 @@
#include "config.h"
#include "ExceptionCode.h"
-#include "ExceptionCodeDescription.h"
-
-namespace WebCore {
-
-// FIXME: Inline this function into its callers.
-void getExceptionCodeDescription(ExceptionCode ec, ExceptionCodeDescription& description)
-{
- ASSERT(ec);
- description = ExceptionCodeDescription(ec);
-}
-
-} // namespace WebCore
+// FIXME: Remove this file.
Modified: trunk/Source/WebCore/dom/ExceptionCode.h (98714 => 98715)
--- trunk/Source/WebCore/dom/ExceptionCode.h 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebCore/dom/ExceptionCode.h 2011-10-28 09:52:28 UTC (rev 98715)
@@ -19,6 +19,7 @@
#ifndef ExceptionCode_h
#define ExceptionCode_h
+// FIXME: Move this header into the files that actually need it.
#include "ExceptionCodeDescription.h"
namespace WebCore {
@@ -65,8 +66,6 @@
DATA_CLONE_ERR = 25
};
- void getExceptionCodeDescription(ExceptionCode, ExceptionCodeDescription&);
-
} // namespace WebCore
#endif // ExceptionCode_h
Modified: trunk/Source/WebCore/dom/make_exception_code_description.pl (98714 => 98715)
--- trunk/Source/WebCore/dom/make_exception_code_description.pl 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebCore/dom/make_exception_code_description.pl 2011-10-28 09:52:28 UTC (rev 98715)
@@ -172,6 +172,7 @@
print F "\n";
print F "ExceptionCodeDescription::ExceptionCodeDescription(ExceptionCode ec)\n";
print F "{\n";
+ print F " ASSERT(ec);\n";
for my $exceptionType (sort keys %parsedItems) {
# DOMCoreException needs to be last because it's a catch-all.
Modified: trunk/Source/WebKit/chromium/ChangeLog (98714 => 98715)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-10-28 09:52:28 UTC (rev 98715)
@@ -1,3 +1,16 @@
+2011-10-28 Adam Barth <[email protected]>
+
+ Remove getExceptionCodeDescription()
+ https://bugs.webkit.org/show_bug.cgi?id=71103
+
+ Reviewed by Eric Seidel.
+
+ Migrate to new API.
+
+ * src/StorageInfoChromium.cpp:
+ * src/WebStorageQuotaCallbacksImpl.cpp:
+ (WebKit::WebStorageQuotaCallbacksImpl::didFail):
+
2011-10-28 Hans Wennborg <[email protected]>
IndexedDB: Clean-up unused functions in WebIDBFactory
Modified: trunk/Source/WebKit/chromium/src/StorageInfoChromium.cpp (98714 => 98715)
--- trunk/Source/WebKit/chromium/src/StorageInfoChromium.cpp 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebKit/chromium/src/StorageInfoChromium.cpp 2011-10-28 09:52:28 UTC (rev 98715)
@@ -54,8 +54,7 @@
{
if (!errorCallback)
return;
- ExceptionCodeDescription description;
- getExceptionCodeDescription(ec, description);
+ ExceptionCodeDescription description(ec);
errorCallback->handleEvent(DOMCoreException::create(description).get());
}
}
Modified: trunk/Source/WebKit/chromium/src/WebStorageQuotaCallbacksImpl.cpp (98714 => 98715)
--- trunk/Source/WebKit/chromium/src/WebStorageQuotaCallbacksImpl.cpp 2011-10-28 09:43:30 UTC (rev 98714)
+++ trunk/Source/WebKit/chromium/src/WebStorageQuotaCallbacksImpl.cpp 2011-10-28 09:52:28 UTC (rev 98715)
@@ -76,8 +76,7 @@
void WebStorageQuotaCallbacksImpl::didFail(WebStorageQuotaError error)
{
if (m_errorCallback) {
- ExceptionCodeDescription description;
- getExceptionCodeDescription(static_cast<ExceptionCode>(error), description);
+ ExceptionCodeDescription description(static_cast<ExceptionCode>(error));
m_errorCallback->handleEvent(DOMCoreException::create(description).get());
}
delete this;