Changeset 259579 in webkit
- Timestamp:
- Apr 6, 2020, 11:07:25 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
Shared/ios/DependencyProcessAssertionIOS.mm (modified) (1 diff)
-
UIProcess/ProcessAssertion.cpp (modified) (1 diff)
-
UIProcess/ProcessAssertion.h (modified) (2 diffs)
-
UIProcess/ios/ProcessAssertionIOS.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r259575 r259579 1 2020-04-06 Chris Dumez <cdumez@apple.com> 2 3 ProcessAssertion should use ASCIILiteral for its reason 4 https://bugs.webkit.org/show_bug.cgi?id=210049 5 6 Reviewed by Alex Christensen. 7 8 ProcessAssertion should use ASCIILiteral for its reason, instead of a String. 9 10 * Shared/ios/DependencyProcessAssertionIOS.mm: 11 (WebKit::DependencyProcessAssertion::DependencyProcessAssertion): 12 * UIProcess/ProcessAssertion.cpp: 13 (WebKit::ProcessAssertion::ProcessAssertion): 14 * UIProcess/ProcessAssertion.h: 15 * UIProcess/ios/ProcessAssertionIOS.mm: 16 (WebKit::ProcessAssertion::ProcessAssertion): 17 (WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion): 18 1 19 2020-04-04 Darin Adler <darin@apple.com> 2 20 -
trunk/Source/WebKit/Shared/ios/DependencyProcessAssertionIOS.mm
r258180 r259579 37 37 RBSTarget *target = [RBSTarget targetWithPid:targetPID]; 38 38 RBSDomainAttribute *domainAttribute = [RBSDomainAttribute attributeWithDomain:@"com.apple.webkit" name:@"DependentProcessLink"]; 39 m_assertion = adoptNS([[RBSAssertion alloc] initWithExplanation:String { description } target:target attributes:@[domainAttribute]]); 39 40 NSString *nsDescription = [NSString stringWithCString:description.characters() encoding:NSASCIIStringEncoding]; 41 m_assertion = adoptNS([[RBSAssertion alloc] initWithExplanation:nsDescription target:target attributes:@[domainAttribute]]); 40 42 NSError *acquisitionError = nil; 41 43 if (![m_assertion acquireWithError:&acquisitionError]) -
trunk/Source/WebKit/UIProcess/ProcessAssertion.cpp
r259540 r259579 33 33 namespace WebKit { 34 34 35 ProcessAssertion::ProcessAssertion(ProcessID, const String&, ProcessAssertionType assertionType)35 ProcessAssertion::ProcessAssertion(ProcessID, ASCIILiteral, ProcessAssertionType assertionType) 36 36 : m_assertionType(assertionType) 37 37 { -
trunk/Source/WebKit/UIProcess/ProcessAssertion.h
r259540 r259579 59 59 }; 60 60 61 ProcessAssertion(ProcessID, const String&reason, ProcessAssertionType);61 ProcessAssertion(ProcessID, ASCIILiteral reason, ProcessAssertionType); 62 62 virtual ~ProcessAssertion(); 63 63 … … 88 88 class ProcessAndUIAssertion final : public ProcessAssertion { 89 89 public: 90 ProcessAndUIAssertion(ProcessID, const String&reason, ProcessAssertionType);90 ProcessAndUIAssertion(ProcessID, ASCIILiteral reason, ProcessAssertionType); 91 91 ~ProcessAndUIAssertion(); 92 92 -
trunk/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm
r259540 r259579 300 300 } 301 301 302 ProcessAssertion::ProcessAssertion(pid_t pid, const String& name, ProcessAssertionType assertionType)302 ProcessAssertion::ProcessAssertion(pid_t pid, ASCIILiteral reason, ProcessAssertionType assertionType) 303 303 : m_assertionType(assertionType) 304 304 { … … 313 313 } 314 314 }; 315 RELEASE_LOG(ProcessSuspension, "%p - ProcessAssertion() PID %d acquiring assertion for process with PID %d, name '%s'", this, getpid(), pid, name.utf8().data());315 RELEASE_LOG(ProcessSuspension, "%p - ProcessAssertion() PID %d acquiring assertion for process with PID %d, name '%s'", this, getpid(), pid, reason.characters()); 316 316 317 m_assertion = adoptNS([[BKSProcessAssertion alloc] initWithPID:pid flags:flagsForAssertionType(assertionType) reason:toBKSProcessAssertionReason(assertionType) name:(NSString *)name withHandler:handler]); 317 NSString *nsReason = [NSString stringWithCString:reason.characters() encoding:NSASCIIStringEncoding]; 318 m_assertion = adoptNS([[BKSProcessAssertion alloc] initWithPID:pid flags:flagsForAssertionType(assertionType) reason:toBKSProcessAssertionReason(assertionType) name:nsReason withHandler:handler]); 319 318 320 m_assertion.get().invalidationHandler = ^() { 319 321 dispatch_async(dispatch_get_main_queue(), ^{ … … 355 357 } 356 358 357 ProcessAndUIAssertion::ProcessAndUIAssertion(pid_t pid, const String&reason, ProcessAssertionType assertionType)359 ProcessAndUIAssertion::ProcessAndUIAssertion(pid_t pid, ASCIILiteral reason, ProcessAssertionType assertionType) 358 360 : ProcessAssertion(pid, reason, assertionType) 359 361 {
Note:
See TracChangeset
for help on using the changeset viewer.