WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
Bug 232387
Callback functions / interfaces use incorrect global object for liveness and reporting errors
https://bugs.webkit.org/show_bug.cgi?id=232387
Summary
Callback functions / interfaces use incorrect global object for liveness and ...
Alexey Shvayka
Reported
2021-10-27 10:11:07 PDT
JSCallbackData should use lexical global object for errors and lifecycle
Attachments
Patch
(40.89 KB, patch)
2021-10-27 10:12 PDT
,
Alexey Shvayka
no flags
Details
Formatted Diff
Diff
Patch for landing
(105.31 KB, patch)
2021-11-11 08:54 PST
,
Alexey Shvayka
no flags
Details
Formatted Diff
Diff
Patch
(115.03 KB, patch)
2021-11-12 13:47 PST
,
Alexey Shvayka
no flags
Details
Formatted Diff
Diff
Patch
(107.99 KB, patch)
2022-01-12 18:50 PST
,
Alexey Shvayka
no flags
Details
Formatted Diff
Diff
Patch
(110.02 KB, patch)
2022-01-13 14:43 PST
,
Alexey Shvayka
no flags
Details
Formatted Diff
Diff
Patch
(164.19 KB, patch)
2022-01-18 20:53 PST
,
Alexey Shvayka
no flags
Details
Formatted Diff
Diff
Patch
(168.54 KB, patch)
2022-01-19 19:20 PST
,
Alexey Shvayka
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2021-10-27 10:12:07 PDT
Created
attachment 442603
[details]
Patch
EWS Watchlist
Comment 2
2021-10-27 10:13:27 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see
https://trac.webkit.org/wiki/WPTExportProcess
Geoffrey Garen
Comment 3
2021-10-27 10:46:14 PDT
Comment on
attachment 442603
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=442603&action=review
r=me -- but please fix the visit issue before landing.
> Source/WebCore/Modules/webaudio/AudioWorkletProcessor.h:75 > + JSValueInWrappedObject m_processCallback;
We need to visit this value inside JSAudioWorkletProcessor::visitAdditionalChildren().
Radar WebKit Bug Importer
Comment 4
2021-11-03 10:12:17 PDT
<
rdar://problem/84979685
>
Alexey Shvayka
Comment 5
2021-11-11 08:54:04 PST
Created
attachment 443952
[details]
Patch for landing
Alexey Shvayka
Comment 6
2021-11-11 08:54:20 PST
(In reply to Alexey Shvayka from
comment #5
)
> Created
attachment 443952
[details]
> Patch for landing
1. Account Geoff's feedback on visitAdditionalChildren(). 2. Add [SkipCallbackInvokeCheck] to Geolocation's error callback as it's run for inactive contexts and revert erroneous test changes. 3. Add a test that ensures NodeFilter with disconnected incumbent object no longer crashes. 4. Adjust bindings tests for [SkipCallbackInvokeCheck] and reset expectations. 5. Revert resolving _incumbent_ in @whenSignalAborted as its `abort` callback can't invoke userland code.
Alexey Shvayka
Comment 7
2021-11-11 10:29:20 PST
Committed
r285639
(
244140@main
): <
https://commits.webkit.org/244140@main
>
Chris Dumez
Comment 8
2021-11-12 08:13:45 PST
This caused
https://bugs.webkit.org/show_bug.cgi?id=233043
.
WebKit Commit Bot
Comment 9
2021-11-12 13:19:45 PST
Re-opened since this is blocked by
bug 233065
Alexey Shvayka
Comment 10
2021-11-12 13:47:18 PST
Created
attachment 444108
[details]
Patch Don't pass testRunner.setGeolocationPermission directly as geo error callback to test if that caused crashes.
Chris Dumez
Comment 11
2022-01-12 15:58:15 PST
Any update on this? It looks like this was landed, then reverted then never re-landed? However, the test did make it upstream.
Alexey Shvayka
Comment 12
2022-01-12 18:50:33 PST
Created
attachment 449018
[details]
Patch Add a null check to setGeolocationPermissionCallback().
Alexey Shvayka
Comment 13
2022-01-12 18:51:22 PST
(In reply to Chris Dumez from
comment #11
)
> Any update on this? > > It looks like this was landed, then reverted then never re-landed? > However, the test did make it upstream.
That's correct, sorry, will re-land once the updated patch passes the tests.
Chris Dumez
Comment 14
2022-01-13 10:30:23 PST
Comment on
attachment 449018
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=449018&action=review
> Source/WebCore/Modules/geolocation/PositionErrorCallback.idl:27 > + SkipCallbackInvokeCheck,
I think this is wrong. We shouldn't be adding new Webkit-specific IDL attributes to get a different Web-facing behavior for one specific API. This doesn't make sense. Either the behavior of SkipCallbackInvokeCheck is the correct one and what we want everywhere, or it is not.
Alexey Shvayka
Comment 15
2022-01-13 14:43:29 PST
Created
attachment 449115
[details]
Patch Check if a promise, returned from WebLockGrantedCallback, is suspended.
Alexey Shvayka
Comment 16
2022-01-13 14:54:02 PST
(In reply to Chris Dumez from
comment #14
)
> Comment on
attachment 449018
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=449018&action=review
> > > Source/WebCore/Modules/geolocation/PositionErrorCallback.idl:27 > > + SkipCallbackInvokeCheck, > > I think this is wrong. We shouldn't be adding new Webkit-specific IDL > attributes to get a different Web-facing behavior for one specific API. This > doesn't make sense. Either the behavior of SkipCallbackInvokeCheck is the > correct one and what we want everywhere, or it is not.
Looking at
https://wpt.fyi/results/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context.html
, there might be way we can drop this attribute rather than spreading it to Geolocation. I'm compiling a coverage like dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html for all popular callbacks so we could see the whole web-compat picture. Should not take too long.
Alexey Shvayka
Comment 17
2022-01-18 20:53:50 PST
Created
attachment 449463
[details]
Patch Use global object of _value_, remove [SkipCallbackInvokeCheck] extended attribute, and add thorough test coverage.
Alexey Shvayka
Comment 18
2022-01-19 05:28:31 PST
Comment on
attachment 449463
[details]
Patch Putting r+ on my own patch, already reviewed by Geoff on 2021-10-27, so the WPT GitHub bot would let me land the tests PR.
Alexey Shvayka
Comment 19
2022-01-19 05:52:43 PST
Committed
r288197
(?): <
https://commits.webkit.org/r288197
>
Robert Jenner
Comment 20
2022-01-19 12:22:05 PST
Reverted
r288197
for reason: Broke a test, slowing down EWS Committed
r288229
(
246187@trunk
): <
https://commits.webkit.org/246187@trunk
>
Alexey Shvayka
Comment 21
2022-01-19 19:20:10 PST
Created
attachment 449543
[details]
Patch Fix IntersectionObserver not to rely on m_callback's context for timestamp.
Alexey Shvayka
Comment 22
2022-01-20 10:43:35 PST
Committed
r288307
(?): <
https://commits.webkit.org/r288307
>
Alexey Shvayka
Comment 23
2022-01-28 12:00:51 PST
AudioWorklet changes (storing callback w/o a JSC::Strong) caused a regression:
https://bugs.webkit.org/show_bug.cgi?id=235529
. Thank you Chris for taking care of it!
Chris Dumez
Comment 24
2022-05-10 15:46:14 PDT
Reopening since this got reverted in
https://commits.webkit.org/250452@main
.
Ahmad Saleem
Comment 25
2023-08-27 05:46:17 PDT
We are failing two WPT Tests: Only failing in Safari -
http://wpt.live/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context.html
Failing in Firefox & WebKit -
http://wpt.live/dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug