[webkit-reviews] review granted: [Bug 184766] Tool scripts should not use PrivilegedAPI from 'public/v3/privileged-api.js'. : [Attachment 338444] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 20 16:57:06 PDT 2018


Ryosuke Niwa <rniwa at webkit.org> has granted dewei_zhu at apple.com's request for
review:
Bug 184766: Tool scripts should not use PrivilegedAPI from
'public/v3/privileged-api.js'.
https://bugs.webkit.org/show_bug.cgi?id=184766

Attachment 338444: Patch

https://bugs.webkit.org/attachment.cgi?id=338444&action=review




--- Comment #5 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 338444
  --> https://bugs.webkit.org/attachment.cgi?id=338444
Patch

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

> Websites/perf.webkit.org/tools/js/privileged-api.js:8
> +	   for (let key in data)

Use const.

> Websites/perf.webkit.org/unit-tests/resources/mock-remote-api.js:63
> +    inject: function (urlPrefix, useNodePrivilegedAPI)

We should make inject either make a dictionary or the second argument should be
a string specifying the type of PrivilegedAPI we use; e.g. 'browser' (default)
/ 'node'.

> Websites/perf.webkit.org/unit-tests/resources/mock-remote-api.js:67
> +	   const hookPrivilegedAPI = useNodePrivilegedAPI ? NodePrivilegedAPI:
BrowserPrivilegedAPI;

Use call this PrivilegedAPI.


More information about the webkit-reviews mailing list