merge commit

This commit is contained in:
Jeff Kaufman
2013-09-24 16:16:16 -04:00
2 changed files with 64 additions and 0 deletions
+18
View File
@@ -93,6 +93,24 @@ fi
# linker errors, so disable it here.
CFLAGS="$CFLAGS -DSERF_HTTPS_FETCHING=0 $FLAG_MARCH"
case "$NGX_GCC_VER" in
4.8*)
# On GCC 4.8 and above, -Wall enables -Wunused-local-typedefs. This breaks
# on VerifySizesAreEqual in bit_cast in chromium/src/base/basictypes.h which
# has a typedef that is intentionally unused.
CFLAGS="$CFLAGS -Wno-unused-local-typedefs"
# On GCC 4.8 and above, we get the following compiler warning:
# chromium/src/base/memory/scoped_ptr.h:133:7: warning: declaration of class scoped_ptr<C> [enabled by default]
# Based on discussion at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54055,
# this is invalid code, but hasn't been fixed yet in chromium.
# Unfortunately, there also does not appear to be a flag for just disabling
# that warning, so we add Wno-error to override nginx's default -Werror
# option.
CFLAGS="$CFLAGS -Wno-error"
;;
esac
pagespeed_include="\
$mod_pagespeed_dir \
$mod_pagespeed_dir/third_party/chromium/src \
+46
View File
@@ -0,0 +1,46 @@
/*
* Copyright 2013 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Author: jefftk@google.com (Jeff Kaufman)
#include "ngx_thread_system.h"
#include "apr_thread_proc.h"
namespace net_instaweb {
class Timer;
NgxThreadSystem::NgxThreadSystem() : may_start_threads_(false) {}
NgxThreadSystem::~NgxThreadSystem() {}
void NgxThreadSystem::PermitThreadStarting() {
DCHECK(!may_start_threads_);
may_start_threads_ = true;
}
void NgxThreadSystem::BeforeThreadRunHook() {
// We disable all signals here, since the nginx worker process is expecting to
// catch them and pagespeed doesn't use signals.
apr_setup_signal_thread();
// If this fails you can get a backtrace from gdb by setting a breakpoint on
// "pthread_create".
DCHECK(may_start_threads_);
}
} // namespace net_instaweb