Summary: | [JSC] Unify how we throw TypeError from C++ | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Benjamin Poulain <benjamin> | ||||
Component: | New Bugs | Assignee: | Benjamin Poulain <benjamin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | alecflett, beidson, commit-queue, jsbell, keith_miller, mark.lam, msaboff, saam | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Benjamin Poulain
2016-07-06 18:23:07 PDT
Created attachment 282980 [details]
Patch
Comment on attachment 282980 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282980&action=review r=me with comments > Source/JavaScriptCore/ChangeLog:8 > + Throwing a TypeError is a uncommon case. We should minimize the impact "a" => "an" > Source/JavaScriptCore/ChangeLog:17 > + On x86_64, this reduces the __TEXT__ segment by 29kb. nice! > Source/JavaScriptCore/runtime/Error.h:87 > +inline EncodedJSValue throwVMTypeError(ExecState* exec, ASCIILiteral errorMessage) { return JSValue::encode(throwTypeError(exec, errorMessage)); } It's funny that "...VM..Error" just means that we return an EncodedJSValue. I wish we had a better name > Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp:61 > + return throwVMTypeError(exec, \ Style: This "\" should be aligned with the other "\" Committed r202890: <http://trac.webkit.org/changeset/202890> |