Bug 38503

Summary: Remove all custom DB callbacks in favor of auto-generated callbacks
Product: WebKit Reporter: Dumitru Daniliuc <dumi>
Component: New BugsAssignee: Dumitru Daniliuc <dumi>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dglazkov, ericu, gns, michaeln, webkit.review.bot, xan.lopez, yaar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
abarth: review+, dumi: commit-queue-
patch abarth: review+, dumi: commit-queue-

Description Dumitru Daniliuc 2010-05-03 19:41:59 PDT
The JSC and V8 code generators can now generate callbacks. We should take advantage of that and remove all custom DB callbacks we have now.
Comment 1 Dumitru Daniliuc 2010-05-04 03:31:31 PDT
Created attachment 55006 [details]
patch

The patch is not as big as it might seem: it's mostly files being removed + build file changes.

Tested in WebKit/Win, WebKit/Mac and Chromium/Win.
Comment 2 WebKit Review Bot 2010-05-04 03:35:33 PDT
Attachment 55006 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp:30:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:35:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 2 in 26 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Dumitru Daniliuc 2010-05-04 03:39:03 PDT
(In reply to comment #2)
> WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp:30:  Found other
> header before a header this file implements. Should be: config.h, primary
> header, blank line, and then alphabetically sorted.  [build/include_order] [4]
> WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:35:  Found
> other header before a header this file implements. Should be: config.h, primary
> header, blank line, and then alphabetically sorted.  [build/include_order] [4]

The headers are fine: {JS|V8}CustomSQLStatementErrorCallback.cpp implement the custom methods of {JS|V8}SQLStatementErrorCallback. There are no {JS|V8}CustomSQLStatementErrorCallback classes.
Comment 4 WebKit Review Bot 2010-05-04 04:39:38 PDT
Attachment 55006 [details] did not build on gtk:
Build output: http://webkit-commit-queue.appspot.com/results/2139008
Comment 5 Adam Barth 2010-05-04 13:56:17 PDT
Comment on attachment 55006 [details]
patch

This change is fantastic.  Please make sure it builds on Gtk before committing.

+  * Copyright (C) 2007 Apple Inc. All rights reserved.

Apple?

+ $implIncludes{"JS${type}.h"} = 1;

This is ugly.
Comment 6 Dumitru Daniliuc 2010-05-04 16:07:35 PDT
Created attachment 55068 [details]
patch

Should fix the GTK bot problem.

(In reply to comment #5)
> (From update of attachment 55006 [details])
> +  * Copyright (C) 2007 Apple Inc. All rights reserved.
> 
> Apple?

Oops, fixed. I assume you're referring to the new IDL files?

> + $implIncludes{"JS${type}.h"} = 1;
> 
> This is ugly.

Not sure how to handle this better. Most generated code needs to include ${type}.h, and callbacks need to include JS${type}.h for the toJS() function.
Comment 7 WebKit Review Bot 2010-05-04 16:10:38 PDT
Attachment 55068 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp:30:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:35:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 2 in 26 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Adam Barth 2010-05-04 18:48:14 PDT
Comment on attachment 55068 [details]
patch

Yeah.  I think its ok to keep that for now.  That script needs some more love.

Thanks!
Comment 9 Dumitru Daniliuc 2010-05-04 20:24:40 PDT
Landed as r58801.