Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(871)

Side by Side Diff: util/mach/exc_server_variants.cc

Issue 656703002: Convert NULL to nullptr (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Fix 80-column violations Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « util/mach/exc_server_variants.h ('k') | util/mach/exc_server_variants_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 thread_state_flavor_t flavor = THREAD_STATE_NONE; 488 thread_state_flavor_t flavor = THREAD_STATE_NONE;
489 mach_msg_type_number_t new_state_count = 0; 489 mach_msg_type_number_t new_state_count = 0;
490 return interface_->CatchException(EXCEPTION_DEFAULT, 490 return interface_->CatchException(EXCEPTION_DEFAULT,
491 exception_port, 491 exception_port,
492 thread, 492 thread,
493 task, 493 task,
494 exception, 494 exception,
495 code, 495 code,
496 code_count, 496 code_count,
497 &flavor, 497 &flavor,
498 NULL, 498 nullptr,
499 0, 499 0,
500 NULL, 500 nullptr,
501 &new_state_count, 501 &new_state_count,
502 destroy_request); 502 destroy_request);
503 } 503 }
504 504
505 kern_return_t SimplifiedExcServer::CatchExceptionRaiseState( 505 kern_return_t SimplifiedExcServer::CatchExceptionRaiseState(
506 exception_handler_t exception_port, 506 exception_handler_t exception_port,
507 exception_type_t exception, 507 exception_type_t exception,
508 const exception_data_type_t* code, 508 const exception_data_type_t* code,
509 mach_msg_type_number_t code_count, 509 mach_msg_type_number_t code_count,
510 thread_state_flavor_t* flavor, 510 thread_state_flavor_t* flavor,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 mach_msg_type_number_t new_state_count = 0; 575 mach_msg_type_number_t new_state_count = 0;
576 return interface_->CatchMachException( 576 return interface_->CatchMachException(
577 EXCEPTION_DEFAULT | MACH_EXCEPTION_CODES, 577 EXCEPTION_DEFAULT | MACH_EXCEPTION_CODES,
578 exception_port, 578 exception_port,
579 thread, 579 thread,
580 task, 580 task,
581 exception, 581 exception,
582 code, 582 code,
583 code_count, 583 code_count,
584 &flavor, 584 &flavor,
585 NULL, 585 nullptr,
586 0, 586 0,
587 NULL, 587 nullptr,
588 &new_state_count, 588 &new_state_count,
589 destroy_request); 589 destroy_request);
590 } 590 }
591 591
592 kern_return_t SimplifiedMachExcServer::CatchMachExceptionRaiseState( 592 kern_return_t SimplifiedMachExcServer::CatchMachExceptionRaiseState(
593 exception_handler_t exception_port, 593 exception_handler_t exception_port,
594 exception_type_t exception, 594 exception_type_t exception,
595 const mach_exception_data_type_t* code, 595 const mach_exception_data_type_t* code,
596 mach_msg_type_number_t code_count, 596 mach_msg_type_number_t code_count,
597 thread_state_flavor_t* flavor, 597 thread_state_flavor_t* flavor,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 mach_codes.reserve(code_count); 706 mach_codes.reserve(code_count);
707 for (size_t index = 0; index < code_count; ++index) { 707 for (size_t index = 0; index < code_count; ++index) {
708 mach_codes.push_back(code[index]); 708 mach_codes.push_back(code[index]);
709 } 709 }
710 710
711 return CatchMachException(behavior, 711 return CatchMachException(behavior,
712 exception_port, 712 exception_port,
713 thread, 713 thread,
714 task, 714 task,
715 exception, 715 exception,
716 code_count ? &mach_codes[0] : NULL, 716 code_count ? &mach_codes[0] : nullptr,
717 code_count, 717 code_count,
718 flavor, 718 flavor,
719 old_state, 719 old_state,
720 old_state_count, 720 old_state_count,
721 new_state, 721 new_state,
722 new_state_count, 722 new_state_count,
723 destroy_complex_request); 723 destroy_complex_request);
724 } 724 }
725 725
726 exception_type_t ExcCrashRecoverOriginalException( 726 exception_type_t ExcCrashRecoverOriginalException(
(...skipping 26 matching lines...) Expand all
753 kern_return_t ExcServerSuccessfulReturnValue(exception_behavior_t behavior, 753 kern_return_t ExcServerSuccessfulReturnValue(exception_behavior_t behavior,
754 bool set_thread_state) { 754 bool set_thread_state) {
755 if (!set_thread_state && ExceptionBehaviorHasState(behavior)) { 755 if (!set_thread_state && ExceptionBehaviorHasState(behavior)) {
756 return MACH_RCV_PORT_DIED; 756 return MACH_RCV_PORT_DIED;
757 } 757 }
758 758
759 return KERN_SUCCESS; 759 return KERN_SUCCESS;
760 } 760 }
761 761
762 } // namespace crashpad 762 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/mach/exc_server_variants.h ('k') | util/mach/exc_server_variants_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698