Debugger: Fix #11088.
- When walking through and querying volumes for a missing source file, store the error and report it back in the completion message rather than exiting the query worker. Otherwise, if something went wrong with the queries, it'd potentially occur that we'd never prompt the user to locate the file, as the UI would never be notified that the background work was complete.
This commit is contained in:
parent
80835cb079
commit
36f126fd5a
@ -385,6 +385,8 @@ TeamWindow::MessageReceived(BMessage* message)
|
||||
break;
|
||||
|
||||
_HandleResolveMissingSourceFile(locatedPath);
|
||||
delete fFilePanel;
|
||||
fFilePanel = NULL;
|
||||
break;
|
||||
}
|
||||
case MSG_LOCATE_SOURCE_IF_NEEDED:
|
||||
@ -395,10 +397,10 @@ TeamWindow::MessageReceived(BMessage* message)
|
||||
case MSG_SOURCE_ENTRY_QUERY_COMPLETE:
|
||||
{
|
||||
BStringList* entries;
|
||||
if (message->FindPointer("entries", (void**)&entries) != B_OK)
|
||||
break;
|
||||
ObjectDeleter<BStringList> entryDeleter(entries);
|
||||
_HandleLocateSourceRequest(entries);
|
||||
if (message->FindPointer("entries", (void**)&entries) == B_OK) {
|
||||
ObjectDeleter<BStringList> entryDeleter(entries);
|
||||
_HandleLocateSourceRequest(entries);
|
||||
}
|
||||
fActiveSourceWorker = -1;
|
||||
break;
|
||||
}
|
||||
@ -1568,14 +1570,13 @@ TeamWindow::_RetrieveMatchingSourceWorker(void* arg)
|
||||
window->Unlock();
|
||||
|
||||
status_t error = window->_RetrieveMatchingSourceEntries(path, entries);
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
|
||||
entries->Sort();
|
||||
BMessenger messenger(window);
|
||||
if (messenger.IsValid() && messenger.LockTarget()) {
|
||||
if (window->fActiveSourceWorker == find_thread(NULL)) {
|
||||
BMessage message(MSG_SOURCE_ENTRY_QUERY_COMPLETE);
|
||||
message.AddInt32("error", error);
|
||||
message.AddPointer("entries", entries);
|
||||
if (messenger.SendMessage(&message) == B_OK)
|
||||
stringListDeleter.Detach();
|
||||
|
Loading…
x
Reference in New Issue
Block a user