| Summary: | Add SPI callbacks for before and after module execution | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Saam Barati <saam> | ||||
| Component: | JavaScriptCore | Assignee: | Saam Barati <saam> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | benjamin, commit-queue, ews-watchlist, fpizlo, ggaren, gskachkov, guijemont, keith_miller, mark.lam, msaboff, rmorisset, ticaiolima, tzagallo, webkit-bug-importer, ysuzuki | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Saam Barati
2019-04-24 13:53:18 PDT
Created attachment 368183 [details]
patch
Attachment 368183 [details] did not pass style-queue:
ERROR: Source/JavaScriptCore/API/tests/testapi.mm:2033: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5]
ERROR: Source/JavaScriptCore/API/tests/testapi.mm:2034: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5]
Total errors found: 2 in 7 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 368183 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=368183&action=review r=me. BTW, this use case is actually why we have moduleLoaderEvaluate hook in ModuleLoader APIs. WebCore does the almost same thing to tell the inspector about module evaluation :) > Source/JavaScriptCore/API/JSAPIGlobalObject.mm:249 > + String moduleKey = key.toWTFString(exec); > + RETURN_IF_EXCEPTION(scope, { }); In JSContext / JSScript module loading API desing, the key is always URL String (not Symbol), is my understanding correct? If so, it is fine. (In reply to Yusuke Suzuki from comment #4) > Comment on attachment 368183 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=368183&action=review > > r=me. BTW, this use case is actually why we have moduleLoaderEvaluate hook > in ModuleLoader APIs. WebCore does the almost same thing to tell the > inspector about module evaluation :) Nice. > > > Source/JavaScriptCore/API/JSAPIGlobalObject.mm:249 > > + String moduleKey = key.toWTFString(exec); > > + RETURN_IF_EXCEPTION(scope, { }); > > In JSContext / JSScript module loading API desing, the key is always URL > String (not Symbol), is my understanding correct? If so, it is fine. That's correct. Comment on attachment 368183 [details] patch Clearing flags on attachment: 368183 Committed r244620: <https://trac.webkit.org/changeset/244620> All reviewed patches have been landed. Closing bug. |