From: Eurogiciel-BOT Date: Tue, 16 Dec 2014 09:23:46 +0000 (+0000) Subject: Upstream version 11.39.265.0 X-Git-Tag: accepted/tizen/common/20141216.131519~20 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fframework%2Fweb%2Fcrosswalk.git;a=commitdiff_plain;h=be01dd7b4ffa2dbdac624d3a46a6172cafd31a1f Upstream version 11.39.265.0 Upstream commit-id 6da2a75691f38bbc6d8b41591be1c0fb54982518 Change-Id: Ic0eeac1b89d8ff78c7a974fa5c3728669260c5f6 Signed-off-by: Eurogiciel-BOT --- diff --git a/packaging/crosswalk.spec b/packaging/crosswalk.spec index 4850150..b4cc7e8 100644 --- a/packaging/crosswalk.spec +++ b/packaging/crosswalk.spec @@ -24,7 +24,7 @@ %define _binary_payload w3.gzdio Name: crosswalk -Version: 11.39.264.0 +Version: 11.39.265.0 Release: 0 Summary: Chromium-based app runtime License: (BSD-3-Clause and LGPL-2.1+) diff --git a/src/ozone/AUTHORS b/src/ozone/AUTHORS index 1d66a3d..39884bb 100644 --- a/src/ozone/AUTHORS +++ b/src/ozone/AUTHORS @@ -6,6 +6,7 @@ Eduardo Lima (Etrunko) Hongzhang Yan Jiajia Qin Joone Hur +José Bollo Kalyan Kondapally Manuel Bachmann Michael Forney diff --git a/src/ozone/wayland/display_poll_thread.cc b/src/ozone/wayland/display_poll_thread.cc index 421d67e..f1b9e9e 100644 --- a/src/ozone/wayland/display_poll_thread.cc +++ b/src/ozone/wayland/display_poll_thread.cc @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include @@ -16,45 +16,6 @@ namespace ozonewayland { const int MAX_EVENTS = 16; -// os-compatibility -extern "C" { -int osEpollCreateCloExec(void); - -static int setCloExecOrClose(int fd) { - int flags; - - if (fd == -1) - return -1; - - flags = fcntl(fd, F_GETFD); - if (flags == -1) - goto err; - - if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1) - goto err; - - return fd; - - err: - close(fd); - return -1; -} - -int osEpollCreateCloExec(void) { - int fd; - -#ifdef EPOLL_CLOEXEC - fd = epoll_create1(EPOLL_CLOEXEC); - if (fd >= 0) - return fd; - if (errno != EINVAL) - return -1; -#endif - - fd = epoll_create(1); - return setCloExecOrClose(fd); -} -} // os-compatibility WaylandDisplayPollThread::WaylandDisplayPollThread(wl_display* display) : base::Thread("WaylandDisplayPollThread"), @@ -62,9 +23,6 @@ WaylandDisplayPollThread::WaylandDisplayPollThread(wl_display* display) polling_(true, false), stop_polling_(true, false) { DCHECK(display_); - epoll_fd_ = osEpollCreateCloExec(); - if (epoll_fd_ < 0) - LOG(ERROR) << "Epoll creation failed."; } WaylandDisplayPollThread::~WaylandDisplayPollThread() { @@ -72,7 +30,7 @@ WaylandDisplayPollThread::~WaylandDisplayPollThread() { } void WaylandDisplayPollThread::StartProcessingEvents() { - DCHECK(!polling_.IsSignaled() && epoll_fd_); + DCHECK(!polling_.IsSignaled()); base::Thread::Options options; options.message_loop_type = base::MessageLoop::TYPE_IO; StartWithOptions(options); @@ -90,25 +48,15 @@ void WaylandDisplayPollThread::StopProcessingEvents() { void WaylandDisplayPollThread::CleanUp() { SetThreadWasQuitProperly(true); - if (epoll_fd_) - close(epoll_fd_); } void WaylandDisplayPollThread::DisplayRun(WaylandDisplayPollThread* data) { - struct epoll_event ep[MAX_EVENTS]; + struct pollfd ep; int i, ret, count = 0; uint32_t event = 0; - bool epoll_err = false; unsigned display_fd = wl_display_get_fd(data->display_); - int epoll_fd = data->epoll_fd_; - ep[0].events = EPOLLIN; - ep[0].data.ptr = 0; - if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, display_fd, &ep[0]) < 0) { - close(epoll_fd); - data->epoll_fd_ = 0; - LOG(ERROR) << "epoll_ctl Add failed"; - return; - } + ep.fd = display_fd; + ep.events = POLLIN | POLLERR | POLLHUP; // Set the signal state. This is used to query from other threads (i.e. // StopProcessingEvents on Main thread), if this thread is still polling. @@ -119,11 +67,7 @@ void WaylandDisplayPollThread::DisplayRun(WaylandDisplayPollThread* data) { while (1) { wl_display_dispatch_pending(data->display_); ret = wl_display_flush(data->display_); - if (ret < 0 && errno == EAGAIN) { - ep[0].events = EPOLLIN | EPOLLERR | EPOLLHUP; - epoll_ctl(epoll_fd, EPOLL_CTL_MOD, display_fd, &ep[0]); - } else if (ret < 0) { - epoll_err = true; + if (ret < 0 && errno != EAGAIN) { break; } // StopProcessingEvents has been called or we have been asked to stop @@ -131,37 +75,31 @@ void WaylandDisplayPollThread::DisplayRun(WaylandDisplayPollThread* data) { if (data->stop_polling_.IsSignaled()) break; - count = epoll_wait(epoll_fd, ep, MAX_EVENTS, -1); + count = poll(&ep, 1, -1); // Break if epoll wait returned value less than 0 and we aren't interrupted // by a signal. if (count < 0 && errno != EINTR) { - LOG(ERROR) << "epoll_wait returned an error." << errno; - epoll_err = true; + LOG(ERROR) << "poll returned an error." << errno; break; } - for (i = 0; i < count; i++) { - event = ep[i].events; - // We can have cases where EPOLLIN and EPOLLHUP are both set for + if (count == 1) { + event = ep.revents; + // We can have cases where POLLIN and POLLHUP are both set for // example. Don't break if both flags are set. - if ((event & EPOLLERR || event & EPOLLHUP) && - !(event & EPOLLIN)) { - epoll_err = true; + if ((event & POLLERR || event & POLLHUP) && + !(event & POLLIN)) { break; } - if (event & EPOLLIN) { + if (event & POLLIN) { ret = wl_display_dispatch(data->display_); if (ret == -1) { LOG(ERROR) << "wl_display_dispatch failed with an error." << errno; - epoll_err = true; break; } } } - - if (epoll_err) - break; } data->polling_.Reset(); diff --git a/src/ozone/wayland/display_poll_thread.h b/src/ozone/wayland/display_poll_thread.h index 2c4b611..ed2ec98 100644 --- a/src/ozone/wayland/display_poll_thread.h +++ b/src/ozone/wayland/display_poll_thread.h @@ -32,7 +32,6 @@ class WaylandDisplayPollThread : public base::Thread { static void DisplayRun(WaylandDisplayPollThread* data); base::WaitableEvent polling_; // Is set as long as the thread is polling. base::WaitableEvent stop_polling_; - int epoll_fd_; wl_display* display_; DISALLOW_COPY_AND_ASSIGN(WaylandDisplayPollThread); }; diff --git a/src/xwalk/DEPS.xwalk b/src/xwalk/DEPS.xwalk index 66e32ed..3ce6e0e 100644 --- a/src/xwalk/DEPS.xwalk +++ b/src/xwalk/DEPS.xwalk @@ -19,7 +19,7 @@ chromium_crosswalk_rev = '0bbff352135bacf2e6a17b5ffebd387f3c2d085f' v8_crosswalk_rev = '05d1cf41ef1b6e73079f69492d9e942ec19cc61a' -ozone_wayland_rev = '6379cd118da098b55a5934ce1a90b377a177ed40' +ozone_wayland_rev = 'b002e0692f397a02264cc99208081f54a90d0973' # |blink_crosswalk_rev| specifies the SHA1 hash of the blink-crosswalk commit # we want to point to, very much like the variables above. diff --git a/src/xwalk/VERSION b/src/xwalk/VERSION index 3ef08e0..e478ccb 100644 --- a/src/xwalk/VERSION +++ b/src/xwalk/VERSION @@ -1,4 +1,4 @@ MAJOR=11 MINOR=39 -BUILD=264 +BUILD=265 PATCH=0 diff --git a/src/xwalk/packaging/crosswalk.spec b/src/xwalk/packaging/crosswalk.spec index 4850150..b4cc7e8 100644 --- a/src/xwalk/packaging/crosswalk.spec +++ b/src/xwalk/packaging/crosswalk.spec @@ -24,7 +24,7 @@ %define _binary_payload w3.gzdio Name: crosswalk -Version: 11.39.264.0 +Version: 11.39.265.0 Release: 0 Summary: Chromium-based app runtime License: (BSD-3-Clause and LGPL-2.1+)