Bug 93610 - [V8] V8Utilities::throwTypeMismatchException() should use setDOMException()
Summary: [V8] V8Utilities::throwTypeMismatchException() should use setDOMException()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks: 85330
  Show dependency treegraph
 
Reported: 2012-08-09 05:23 PDT by Kentaro Hara
Modified: 2012-08-09 19:17 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.39 KB, patch)
2012-08-09 05:26 PDT, Kentaro Hara
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
patch for landing (2.65 KB, patch)
2012-08-09 16:48 PDT, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2012-08-09 05:23:16 PDT
Given that V8Utilities::throwTypeMismatchException() throws a DOM exception, we should use setDOMException() instead of throwError().
Comment 1 Kentaro Hara 2012-08-09 05:26:37 PDT
Created attachment 157446 [details]
Patch
Comment 2 Adam Barth 2012-08-09 09:46:46 PDT
Comment on attachment 157446 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=157446&action=review

> Source/WebCore/bindings/v8/V8Utilities.cpp:197
> -void throwTypeMismatchException(v8::Isolate* isolate)
> +void setTypeMismatchException(v8::Isolate* isolate)
>  {
> -    V8Proxy::throwError(V8Proxy::GeneralError, "TYPE_MISMATCH_ERR: DOM Exception 17", isolate);
> +    V8Proxy::setDOMException(TYPE_MISMATCH_ERR, isolate);
>  }

Presumably we should just inline this function into it's one caller.
Comment 3 WebKit Review Bot 2012-08-09 10:44:32 PDT
Comment on attachment 157446 [details]
Patch

Attachment 157446 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13460593
Comment 4 Kentaro Hara 2012-08-09 14:52:14 PDT
(In reply to comment #2)
> > +void setTypeMismatchException(v8::Isolate* isolate)
> >  {
> > -    V8Proxy::throwError(V8Proxy::GeneralError, "TYPE_MISMATCH_ERR: DOM Exception 17", isolate);
> > +    V8Proxy::setDOMException(TYPE_MISMATCH_ERR, isolate);
> >  }
> 
> Presumably we should just inline this function into it's one caller.

I tried it but it's not easy to resolve circular dependency. V8Proxy.h includes V8Utilities.h. So V8Utilities.h cannot call V8Proxy::xxx().
Comment 5 Kentaro Hara 2012-08-09 16:48:39 PDT
Created attachment 157579 [details]
patch for landing
Comment 6 WebKit Review Bot 2012-08-09 19:14:10 PDT
Comment on attachment 157579 [details]
patch for landing

Clearing flags on attachment: 157579

Committed r125236: <http://trac.webkit.org/changeset/125236>