WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
86576
[V8][Refactoring] Support an optional 'message' argument for throwTypeError()
https://bugs.webkit.org/show_bug.cgi?id=86576
Summary
[V8][Refactoring] Support an optional 'message' argument for throwTypeError()
Kentaro Hara
Reported
2012-05-15 22:33:03 PDT
As commented here (
https://bugs.webkit.org/show_bug.cgi?id=84074#c5
), I am planning to refactor a series of confusing throwError()s. As a first step, I replace throwTypeError() with throwTypeError("Type error"). Actually I think we should use a more descriptive error message than "Type error", but to keep the behavior of JSC and V8 consistent, this patch just uses "Type error" for now.
Attachments
Patch
(12.10 KB, patch)
2012-05-15 22:39 PDT
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Patch
(16.96 KB, patch)
2012-05-17 06:51 PDT
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2012-05-15 22:39:48 PDT
Created
attachment 142150
[details]
Patch
Adam Barth
Comment 2
2012-05-16 19:29:59 PDT
Can we avoid repeating this string everywhere? Perhaps we should have a header that contains constants for these strings so we don't typo them somewhere.
Kentaro Hara
Comment 3
2012-05-16 19:48:44 PDT
(In reply to
comment #2
)
> Can we avoid repeating this string everywhere? Perhaps we should have a header that contains constants for these strings so we don't typo them somewhere.
Or we might want to make the 'message' argument optional, like throwTypeError(const char* message = 0). If omitted, it uses "Type error".
Adam Barth
Comment 4
2012-05-16 20:48:05 PDT
That's fine too.
Kentaro Hara
Comment 5
2012-05-17 06:51:47 PDT
Created
attachment 142464
[details]
Patch
Adam Barth
Comment 6
2012-05-17 07:40:56 PDT
Comment on
attachment 142464
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=142464&action=review
> Source/WebCore/bindings/v8/V8Proxy.cpp:614 > - return throwError(TypeError, "Type error"); > + return throwError(TypeError, (message ? message : "Type error"));
You don't need the outer ( ) around the ? : operator.
Kentaro Hara
Comment 7
2012-05-17 07:42:44 PDT
Comment on
attachment 142464
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=142464&action=review
>> Source/WebCore/bindings/v8/V8Proxy.cpp:614 >> + return throwError(TypeError, (message ? message : "Type error")); > > You don't need the outer ( ) around the ? : operator.
Yeah, but previously some apple guy told me to put () around ?: for clarification.
WebKit Review Bot
Comment 8
2012-05-17 08:16:38 PDT
Comment on
attachment 142464
[details]
Patch Clearing flags on attachment: 142464 Committed
r117448
: <
http://trac.webkit.org/changeset/117448
>
WebKit Review Bot
Comment 9
2012-05-17 08:16:44 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 10
2012-05-17 10:39:22 PDT
Re-opened since this is blocked by 86752
Raphael Kubo da Costa (:rakuco)
Comment 11
2012-05-17 10:41:08 PDT
Sorry for the noise, the rollout was for
r117449
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug