diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 21:18:06 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 21:18:06 +0000 |
commit | 782ce0676a7ab49b411d44a953637ad4805bc4ea (patch) | |
tree | 8e9c2b6734753d4a9886f3ce78dc94381e5c88bc /o3d | |
parent | 397189ee96ffd74d8edd01c2dcfa5708981948cd (diff) | |
download | chromium_src-782ce0676a7ab49b411d44a953637ad4805bc4ea.zip chromium_src-782ce0676a7ab49b411d44a953637ad4805bc4ea.tar.gz chromium_src-782ce0676a7ab49b411d44a953637ad4805bc4ea.tar.bz2 |
Rolled forward O3D's Chromium DEPS to match the Skia roll-forward in
the last CL, which broke the Linux build due to version mismatches.
Thanks to tschmelcher for help with the Linux changes. Built and
tested O3D on Windows, Linux and Mac OS X.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2952001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51895 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/DEPS | 24 | ||||
-rw-r--r-- | o3d/build/common.gypi | 8 | ||||
-rwxr-xr-x | o3d/build/gyp_o3d | 3 | ||||
-rw-r--r-- | o3d/core/cross/types.h | 1 | ||||
-rw-r--r-- | o3d/import/cross/collada.cc | 2 | ||||
-rw-r--r-- | o3d/import/cross/collada_conditioner.cc | 2 | ||||
-rw-r--r-- | o3d/plugin/cross/np_v8_bridge.cc | 62 | ||||
-rw-r--r-- | o3d/plugin/cross/np_v8_bridge.h | 5 | ||||
-rw-r--r-- | o3d/plugin/cross/out_of_memory.cc | 24 | ||||
-rw-r--r-- | o3d/plugin/cross/out_of_memory.h | 1 | ||||
-rw-r--r-- | o3d/utils/cross/file_path_utils.cc | 2 |
11 files changed, 81 insertions, 53 deletions
@@ -3,15 +3,15 @@ vars = { "nixysa_rev": "69", # When updating the chromium rev, you must also update the nss and sqlite # revs to match the version pulled-in by Chromium's own DEPS in the new rev. - "chromium_rev": "37758", + "chromium_rev": "51794", "chromium_breakpad_rev": "47985", "o3d_code_rev": "207", "skia_rev": "586", "gyp_rev": "820", - "gtest_rev": "359", + "gtest_rev": "408", "gflags_rev": "30", "breakpad_rev": "604", - "v8_rev": "3608", + "v8_rev": "5017", "nacl_rev": "2500", } @@ -96,7 +96,7 @@ deps = { Var("chromium_trunk") + "/src/third_party/modp_b64@" + Var("chromium_rev"), "chrome/third_party/wtl": - Var("chromium_trunk") + "/src/chrome/third_party/wtl@" + Var("chromium_rev"), + Var("chromium_trunk") + "/src/third_party/wtl@" + Var("chromium_rev"), "third_party/zlib": Var("chromium_trunk") + "/src/third_party/zlib@" + Var("chromium_rev"), @@ -137,6 +137,14 @@ deps = { "testing/gmock": Var("chromium_trunk") + "/src/testing/gmock@" + Var("chromium_rev"), + # Dependency of chrome base + "third_party/nss": + Var("chromium_trunk") + "/deps/third_party/nss@48440", + + # Dependency of nss, even though its DEPS fail to mention that. + "third_party/sqlite": + Var("chromium_trunk") + "/src/third_party/sqlite@51584", + # Stuff needed for GYP to run "build": Var("chromium_trunk") + "/src/build@" + Var("chromium_rev"), @@ -155,14 +163,6 @@ deps_os = { "third_party/python_24": Var("chromium_trunk") + "/deps/third_party/python_24@19441", - - # Dependency of chrome base - "third_party/nss": - Var("chromium_trunk") + "/deps/third_party/nss@36871", - - # Dependency of nss, even though its DEPS fail to mention that. - "third_party/sqlite": - Var("chromium_trunk") + "/src/third_party/sqlite@31834", }, "unix": { # Linux, really. diff --git a/o3d/build/common.gypi b/o3d/build/common.gypi index 9184c53..a24623f 100644 --- a/o3d/build/common.gypi +++ b/o3d/build/common.gypi @@ -161,6 +161,13 @@ ], # Disable warning: "'this' : used in base member initialization list." 'msvs_disabled_warnings': [4355], + 'msvs_settings': { + 'VCCLCompilerTool': { + 'WarnAsError': 'false', + # Turn off errors for signed/unsigned mismatch from Chromium build/common.gypi. + 'AdditionalOptions!': ['/we4389'], + }, + }, }, }, ], @@ -188,6 +195,7 @@ '-fno-eliminate-unused-debug-symbols', '-mmacosx-version-min=10.5'], 'WARNING_CFLAGS': ['-Wno-deprecated-declarations'], + 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], 'WARNING_CXXFLAGS': ['-Wstrict-aliasing', '-Wno-deprecated',], }, diff --git a/o3d/build/gyp_o3d b/o3d/build/gyp_o3d index 229b4bc..6cfcaf3 100755 --- a/o3d/build/gyp_o3d +++ b/o3d/build/gyp_o3d @@ -26,7 +26,8 @@ if __name__ == '__main__': args += ['--depth', '.', '-I', os.path.join(chrome_src, 'build', 'common.gypi'), '-I', os.path.join(o3d_src, 'build', 'common_global.gypi'), - '-D', 'mac_deployment_target=10.4'] + '-D', 'mac_deployment_target=10.4', + '-D', 'linux_use_tcmalloc=0'] # Off we go... sys.exit(gyp.main(args)) diff --git a/o3d/core/cross/types.h b/o3d/core/cross/types.h index 23e6609..7971ceb 100644 --- a/o3d/core/cross/types.h +++ b/o3d/core/cross/types.h @@ -49,6 +49,7 @@ #include "base/basictypes.h" #include "base/logging.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "core/cross/math_types.h" #include "core/cross/float_n.h" diff --git a/o3d/import/cross/collada.cc b/o3d/import/cross/collada.cc index 562641f..6047da0 100644 --- a/o3d/import/cross/collada.cc +++ b/o3d/import/cross/collada.cc @@ -36,7 +36,7 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/process_util.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "core/cross/class_manager.h" #include "core/cross/curve.h" #include "core/cross/error.h" diff --git a/o3d/import/cross/collada_conditioner.cc b/o3d/import/cross/collada_conditioner.cc index d9c0551b..b5fef31 100644 --- a/o3d/import/cross/collada_conditioner.cc +++ b/o3d/import/cross/collada_conditioner.cc @@ -36,7 +36,7 @@ #include "base/file_path.h" #include "base/file_util.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "compiler/technique/technique_parser.h" #include "core/cross/error.h" #include "core/cross/types.h" diff --git a/o3d/plugin/cross/np_v8_bridge.cc b/o3d/plugin/cross/np_v8_bridge.cc index 9e8c752..ced02d2 100644 --- a/o3d/plugin/cross/np_v8_bridge.cc +++ b/o3d/plugin/cross/np_v8_bridge.cc @@ -1264,27 +1264,6 @@ v8::Handle<Value> NPV8Bridge::V8PropertySetter( return v8_result; } -v8::Handle<v8::Boolean> NPV8Bridge::V8PropertyQuery(Local<Value> v8_name, - const AccessorInfo& info) { - Local<Object> holder = info.Holder(); - NPV8Bridge* bridge = static_cast<NPV8Bridge*>( - Local<External>::Cast( - holder->GetInternalField(V8_NP_OBJECT_BRIDGE))->Value()); - Context::Scope scope(bridge->script_context()); - - NPObjectPtr<NPObject> np_object = bridge->V8ToNPObject(holder); - if (np_object.IsNull()) - return v8::Handle<v8::Boolean>(); - - NPIdentifier np_name = V8ToNPIdentifier(v8_name); - if (np_name == NULL) - return v8::Handle<v8::Boolean>(); - - bool has = NPN_HasProperty(bridge->npp_, np_object.Get(), np_name) || - NPN_HasMethod(bridge->npp_, np_object.Get(), np_name); - return v8::Boolean::New(has); -} - v8::Handle<v8::Boolean> NPV8Bridge::V8PropertyDeleter( Local<Value> v8_name, const AccessorInfo& info) { @@ -1322,10 +1301,28 @@ v8::Handle<Value> NPV8Bridge::V8NamedPropertySetter(Local<v8::String> v8_name, return V8PropertySetter(v8_name, v8_value, info); } -v8::Handle<v8::Boolean> NPV8Bridge::V8NamedPropertyQuery( +v8::Handle<v8::Integer> NPV8Bridge::V8NamedPropertyQuery( Local<v8::String> v8_name, const AccessorInfo& info) { - return V8PropertyQuery(v8_name, info); + Local<Object> holder = info.Holder(); + NPV8Bridge* bridge = static_cast<NPV8Bridge*>( + Local<External>::Cast( + holder->GetInternalField(V8_NP_OBJECT_BRIDGE))->Value()); + Context::Scope scope(bridge->script_context()); + + NPObjectPtr<NPObject> np_object = bridge->V8ToNPObject(holder); + if (np_object.IsNull()) + return v8::Handle<v8::Integer>(); + + NPIdentifier np_name = V8ToNPIdentifier(v8_name); + if (np_name == NULL) + return v8::Handle<v8::Integer>(); + + bool has = NPN_HasProperty(bridge->npp_, np_object.Get(), np_name) || + NPN_HasMethod(bridge->npp_, np_object.Get(), np_name); + if (!has) + return v8::Handle<v8::Integer>(); + return v8::Integer::New(0); } v8::Handle<v8::Boolean> NPV8Bridge::V8NamedPropertyDeleter( @@ -1365,7 +1362,24 @@ v8::Handle<Value> NPV8Bridge::V8IndexedPropertySetter( v8::Handle<v8::Boolean> NPV8Bridge::V8IndexedPropertyQuery( uint32_t index, const AccessorInfo& info) { - return V8PropertyQuery(Integer::New(index), info); + Local<Object> holder = info.Holder(); + NPV8Bridge* bridge = static_cast<NPV8Bridge*>( + Local<External>::Cast( + holder->GetInternalField(V8_NP_OBJECT_BRIDGE))->Value()); + Context::Scope scope(bridge->script_context()); + + NPObjectPtr<NPObject> np_object = bridge->V8ToNPObject(holder); + if (np_object.IsNull()) + return v8::Handle<v8::Boolean>(); + + Local<Value> v8_name = Integer::New(index); + NPIdentifier np_name = V8ToNPIdentifier(v8_name); + if (np_name == NULL) + return v8::Handle<v8::Boolean>(); + + bool has = NPN_HasProperty(bridge->npp_, np_object.Get(), np_name) || + NPN_HasMethod(bridge->npp_, np_object.Get(), np_name); + return v8::Boolean::New(has); } v8::Handle<v8::Boolean> NPV8Bridge::V8IndexedPropertyDeleter( diff --git a/o3d/plugin/cross/np_v8_bridge.h b/o3d/plugin/cross/np_v8_bridge.h index 1227b5d..e3ce65c 100644 --- a/o3d/plugin/cross/np_v8_bridge.h +++ b/o3d/plugin/cross/np_v8_bridge.h @@ -332,9 +332,6 @@ class NPV8Bridge { v8::Local<v8::Value> v8_value, const v8::AccessorInfo& info); - static v8::Handle<v8::Boolean> V8PropertyQuery(v8::Local<v8::Value> v8_name, - const v8::AccessorInfo& info); - static v8::Handle<v8::Boolean> V8PropertyDeleter( v8::Local<v8::Value> v8_name, const v8::AccessorInfo& info); @@ -348,7 +345,7 @@ class NPV8Bridge { v8::Local<v8::Value> v8_value, const v8::AccessorInfo& info); - static v8::Handle<v8::Boolean> V8NamedPropertyQuery( + static v8::Handle<v8::Integer> V8NamedPropertyQuery( v8::Local<v8::String> v8_name, const v8::AccessorInfo& info); diff --git a/o3d/plugin/cross/out_of_memory.cc b/o3d/plugin/cross/out_of_memory.cc index 47937f1..db71932 100644 --- a/o3d/plugin/cross/out_of_memory.cc +++ b/o3d/plugin/cross/out_of_memory.cc @@ -31,11 +31,18 @@ // This file implements a failure handler for the new -// operator and malloc. +// operator and malloc for Windows and Mac. (On Linux, +// chrome's libbase.a implements one already.) -// TODO: This does not currently work on linux. The replacement -// operator new, malloc, etc do not take priority over those declared in -// the standard libraries. +#include "plugin/cross/out_of_memory.h" + +#ifdef OS_LINUX +namespace o3d { +bool SetupOutOfMemoryHandler() { + return true; +} +} +#else #include <stdio.h> #include <stdlib.h> @@ -54,7 +61,6 @@ #include <dlfcn.h> #endif -#include "plugin/cross/out_of_memory.h" #include "plugin/cross/plugin_metrics.h" #ifdef _MSC_VER @@ -71,7 +77,6 @@ namespace { // run after abort() to do its work. const size_t kReserveSize = 1024 * 256; void* g_reserve; -} // namespace anonymous // This is called when a memory allocation fails in the plugin. Note // that it will not be called if a memory allocation fails in another @@ -119,6 +124,7 @@ int HandleOutOfMemory(size_t size) { } return 0; } +} // namespace anonymous bool SetupOutOfMemoryHandler() { #ifdef _MSC_VER @@ -141,7 +147,7 @@ bool SetupOutOfMemoryHandler() { } } // namespace o3d -#if defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_MACOSX) namespace { void* dlsym_helper(const char* symbol_name) { void* ptr = dlsym(RTLD_NEXT, symbol_name); @@ -228,4 +234,6 @@ wchar_t* wcsdup(const wchar_t* ptr) { return result; } } -#endif // defined(OS_MACOSX) || defined(OS_LINUX) +#endif // defined(OS_MACOSX) +#endif // defined(OS_LINUX) + diff --git a/o3d/plugin/cross/out_of_memory.h b/o3d/plugin/cross/out_of_memory.h index aef1b1e..03a321f 100644 --- a/o3d/plugin/cross/out_of_memory.h +++ b/o3d/plugin/cross/out_of_memory.h @@ -37,7 +37,6 @@ #define O3D_PLUGIN_CROSS_OUT_OF_MEMORY_H_ namespace o3d { -void HandleOutOfMemory(); bool SetupOutOfMemoryHandler(); } diff --git a/o3d/utils/cross/file_path_utils.cc b/o3d/utils/cross/file_path_utils.cc index 257ac0c..06b7015 100644 --- a/o3d/utils/cross/file_path_utils.cc +++ b/o3d/utils/cross/file_path_utils.cc @@ -35,8 +35,8 @@ #include "utils/cross/file_path_utils.h" #include "base/file_util.h" -#include "base/string_util.h" #include "base/file_path.h" +#include "base/utf_string_conversions.h" namespace o3d { std::wstring FilePathToWide(const FilePath& input) { |