Bug 41297 - [V8] Catch toString() exceptions in all DB-related code in V8 bindings
Summary: [V8] Catch toString() exceptions in all DB-related code in V8 bindings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dumitru Daniliuc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-28 13:01 PDT by Dumitru Daniliuc
Modified: 2010-06-29 01:00 PDT (History)
3 users (show)

See Also:


Attachments
patch (11.42 KB, patch)
2010-06-28 23:26 PDT, Dumitru Daniliuc
abarth: review+
dumi: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dumitru Daniliuc 2010-06-28 13:01:59 PDT
V8Binding::v8NonStringValueToWebCoreString() suppresses the exceptions thrown by ToString() and returns an empty String. It shouldn't do that.
Comment 1 Dumitru Daniliuc 2010-06-28 23:26:46 PDT
Created attachment 59991 [details]
patch
Comment 2 Adam Barth 2010-06-28 23:50:42 PDT
Comment on attachment 59991 [details]
patch

Looks good.

WebCore/bindings/v8/custom/V8BindingMacros.h:35
 +          var = value;                      \
It's usually a good idea to put parenthesis around (value).  Otherwise you might get strange order-of-operations issues.

WebCore/bindings/v8/custom/V8BindingMacros.h:44
 +          v8::Handle<v8::String> v8String = value->ToString();               \
It's usually a good idea to put parenthesis around (value).  Otherwise you might get strange order-of-operations issues.
Comment 3 Dumitru Daniliuc 2010-06-29 00:31:08 PDT
(In reply to comment #2)
> (From update of attachment 59991 [details])
> Looks good.
> 
> WebCore/bindings/v8/custom/V8BindingMacros.h:35
>  +          var = value;                      \
> It's usually a good idea to put parenthesis around (value).  Otherwise you might get strange order-of-operations issues.
> 
> WebCore/bindings/v8/custom/V8BindingMacros.h:44
>  +          v8::Handle<v8::String> v8String = value->ToString();               \
> It's usually a good idea to put parenthesis around (value).  Otherwise you might get strange order-of-operations issues.

good point! fixed.
Comment 4 Dumitru Daniliuc 2010-06-29 00:40:06 PDT
Landed: r62094.
Comment 5 WebKit Review Bot 2010-06-29 01:00:21 PDT
http://trac.webkit.org/changeset/62094 might have broken Qt Windows 32-bit Release
The following changes are on the blame list:
http://trac.webkit.org/changeset/62093
http://trac.webkit.org/changeset/62094
http://trac.webkit.org/changeset/62095