Bug 179619 - Make the jsc shell loadGetterFromGetterSetter() function more robust.
Summary: Make the jsc shell loadGetterFromGetterSetter() function more robust.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-13 10:49 PST by Mark Lam
Modified: 2017-11-13 12:18 PST (History)
7 users (show)

See Also:


Attachments
proposed patch. (4.56 KB, patch)
2017-11-13 11:38 PST, Mark Lam
saam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2017-11-13 10:49:05 PST
This helps avoid false positives due to abuse of this test function when doing crashes.

<rdar://problem/35492518>
Comment 1 Mark Lam 2017-11-13 11:38:07 PST
Created attachment 326776 [details]
proposed patch.
Comment 2 Saam Barati 2017-11-13 11:42:30 PST
Comment on attachment 326776 [details]
proposed patch.

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

> Source/JavaScriptCore/jsc.cpp:3030
> +    if (UNLIKELY(exec->argumentCount() < 1)) {
> +        throwTypeError(exec, scope, ASCIILiteral("Invalid use of loadGetterFromGetterSetter test function: missing argument"));
> +        return encodedJSValue();
> +    }

This is unneeded unless you really care about the error message. This will fall out of the check below.
Comment 3 Mark Lam 2017-11-13 12:06:19 PST
Comment on attachment 326776 [details]
proposed patch.

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

Thanks for the review.

>> Source/JavaScriptCore/jsc.cpp:3030
>> +    }
> 
> This is unneeded unless you really care about the error message. This will fall out of the check below.

I will remove this.
Comment 4 Mark Lam 2017-11-13 12:18:40 PST
Landed in r224770: <http://trac.webkit.org/r224770>.