Skip to content
Permalink
Browse files
Don't use ImportanceAssertion on iOS
https://bugs.webkit.org/show_bug.cgi?id=131481
<rdar://problem/16575830>

Reviewed by Darin Adler.

We have other API to mark processes as being in use on iOS. No need to use ImportanceAssertion.

* Platform/IPC/MessageDecoder.cpp:
* Platform/IPC/MessageDecoder.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::receiveSourceEventHandler):
* Platform/IPC/mac/ImportanceAssertion.h:

Canonical link: https://commits.webkit.org/149669@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Pratik Solanki committed Apr 13, 2014
1 parent 29d4c63 commit e771e4089860d79fcb917fd01713bb6b5c078e76
Showing 5 changed files with 23 additions and 7 deletions.
@@ -1,3 +1,19 @@
2014-04-13 Pratik Solanki <psolanki@apple.com>

Don't use ImportanceAssertion on iOS
https://bugs.webkit.org/show_bug.cgi?id=131481
<rdar://problem/16575830>

Reviewed by Darin Adler.

We have other API to mark processes as being in use on iOS. No need to use ImportanceAssertion.

* Platform/IPC/MessageDecoder.cpp:
* Platform/IPC/MessageDecoder.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::receiveSourceEventHandler):
* Platform/IPC/mac/ImportanceAssertion.h:

2014-04-13 Commit Queue <commit-queue@webkit.org>

Unreviewed, rolling out r167168 and r167194.
@@ -31,7 +31,7 @@
#include "MessageFlags.h"
#include "StringReference.h"

#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#include "ImportanceAssertion.h"
#endif

@@ -66,7 +66,7 @@ bool MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply() const
return m_messageFlags & DispatchMessageWhenWaitingForSyncReply;
}

#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
void MessageDecoder::setImportanceAssertion(std::unique_ptr<ImportanceAssertion> assertion)
{
m_importanceAssertion = std::move(assertion);
@@ -46,7 +46,7 @@ class MessageDecoder : public ArgumentDecoder {
bool isSyncMessage() const;
bool shouldDispatchMessageWhenWaitingForSyncReply() const;

#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
void setImportanceAssertion(std::unique_ptr<ImportanceAssertion>);
#endif

@@ -57,7 +57,7 @@ class MessageDecoder : public ArgumentDecoder {

uint64_t m_destinationID;

#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
std::unique_ptr<ImportanceAssertion> m_importanceAssertion;
#endif
};
@@ -416,7 +416,7 @@ void Connection::receiveSourceEventHandler()
std::unique_ptr<MessageDecoder> decoder = createMessageDecoder(header);
ASSERT(decoder);

#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
decoder->setImportanceAssertion(std::make_unique<ImportanceAssertion>(header));
#endif

@@ -26,7 +26,7 @@
#ifndef ImportanceAssertion_h
#define ImportanceAssertion_h

#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090

#if __has_include(<libproc_internal.h>)
#include <libproc_internal.h>
@@ -58,6 +58,6 @@ class ImportanceAssertion {

}

#endif // PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#endif // PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090

#endif // ImportanceAssertion_h

0 comments on commit e771e40

Please sign in to comment.