Bug 200571 - Pass a ScriptExecutionContext as input to register/unregister URLRegistry routines
Summary: Pass a ScriptExecutionContext as input to register/unregister URLRegistry rou...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks: 200567
  Show dependency treegraph
 
Reported: 2019-08-09 05:10 PDT by youenn fablet
Modified: 2019-08-09 13:55 PDT (History)
6 users (show)

See Also:


Attachments
Patch (10.77 KB, patch)
2019-08-09 05:12 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Rebasing (8.57 KB, patch)
2019-08-09 13:33 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2019-08-09 05:10:40 PDT
Pass a ScriptExecutionContext as input to register/unregister URLRegistry routines
Comment 1 youenn fablet 2019-08-09 05:12:34 PDT
Created attachment 375907 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2019-08-09 06:31:54 PDT
<rdar://problem/54123571>
Comment 3 Darin Adler 2019-08-09 09:31:02 PDT
Comment on attachment 375907 [details]
Patch

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

> Source/WebCore/html/PublicURLManager.cpp:54
> +    found->key->registerURL(*scriptExecutionContext(), url, registrable);

What guarantees it’s non-null?

> Source/WebCore/html/PublicURLManager.cpp:62
> +            registry.key->unregisterURL(*scriptExecutionContext(), url);

What guarantees it’s non-null?

> Source/WebCore/html/PublicURLManager.cpp:77
> +            registry.key->unregisterURL(*scriptExecutionContext(), URL({ }, url));

What guarantees it’s non-null?
Comment 4 youenn fablet 2019-08-09 13:32:46 PDT
Thanks for the review.

(In reply to Darin Adler from comment #3)
> Comment on attachment 375907 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=375907&action=review
> 
> > Source/WebCore/html/PublicURLManager.cpp:54
> > +    found->key->registerURL(*scriptExecutionContext(), url, registrable);
> 
> What guarantees it’s non-null?

PublicURLManager is an ActiveDOMObject and all call sites doing '*scriptExecutionContext()' cannot be called after the manager is stopped or are no-op once the manager is stopped (all urls are cleared).
Comment 5 youenn fablet 2019-08-09 13:33:34 PDT
Created attachment 375945 [details]
Rebasing
Comment 6 WebKit Commit Bot 2019-08-09 13:55:12 PDT
Comment on attachment 375945 [details]
Rebasing

Clearing flags on attachment: 375945

Committed r248473: <https://trac.webkit.org/changeset/248473>
Comment 7 WebKit Commit Bot 2019-08-09 13:55:14 PDT
All reviewed patches have been landed.  Closing bug.