Bug 246494
Summary: | [webkitcorepy] Add NullContext | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Bedard <jbedard> |
Component: | Tools / Tests | Assignee: | Jonathan Bedard <jbedard> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Other | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Jonathan Bedard
It often makes code simpler if we can have a context object which is esentially a no-op and resolves to 'False' in an "if" statement. The specific use case in mind is code which may, or may not, define a process depending on arguments passed to it. It's cleanest to handle this process via a "with" statement, but that's not possible without an object that acts as a no-op context manager.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/101150808>
Jonathan Bedard
Pull request: https://github.com/WebKit/WebKit/pull/5356
EWS
Committed 255517@main (5e26e2d126df): <https://commits.webkit.org/255517@main>
Reviewed commits have been landed. Closing PR #5356 and removing active labels.
EWS
Committed 252432.591@safari-7614-branch (83e4478c2603): <https://commits.webkit.org/252432.591@safari-7614-branch>
Reviewed commits have been landed. Closing PR #142 and removing active labels.