diff options
-rw-r--r-- | o3d/DEPS | 18 | ||||
-rw-r--r-- | o3d/build/common.gypi | 6 | ||||
-rw-r--r-- | o3d/build/common_global.gypi | 17 | ||||
-rw-r--r-- | o3d/plugin/cross/np_v8_bridge.cc | 16 |
4 files changed, 47 insertions, 10 deletions
@@ -1,15 +1,15 @@ vars = { "chromium_trunk": "http://src.chromium.org/svn/trunk", "nixysa_rev": "63", - "chromium_rev": "28829", + "chromium_rev": "36817", "o3d_code_rev": "166", - "skia_rev": "376", - "gyp_rev": "749", - "gtest_rev": "329", + "skia_rev": "474", + "gyp_rev": "775", + "gtest_rev": "359", "gflags_rev": "30", "breakpad_rev": "391", - "v8_rev": "2901", - "nacl_rev": "842", + "v8_rev": "3608", + "nacl_rev": "1377", } deps = { @@ -83,6 +83,9 @@ deps = { "third_party/libpng": Var("chromium_trunk") + "/src/third_party/libpng@" + Var("chromium_rev"), + "third_party/modp_b64": + 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"), @@ -113,6 +116,9 @@ deps = { "native_client": "http://nativeclient.googlecode.com/svn/trunk/src/native_client@" + Var("nacl_rev"), + "net": + Var("chromium_trunk") + "/src/net@" + Var("chromium_rev"), + "breakpad/src": "http://google-breakpad.googlecode.com/svn/trunk/src@" + Var("breakpad_rev"), diff --git a/o3d/build/common.gypi b/o3d/build/common.gypi index 765f7d2..55a6588 100644 --- a/o3d/build/common.gypi +++ b/o3d/build/common.gypi @@ -76,7 +76,7 @@ 'target_conditions': [ ['OS=="mac"', { 'xcode_settings': { - 'MACOSX_DEPLOYMENT_TARGET': '10.4', + 'MACOSX_DEPLOYMENT_TARGET': '10.5', # TODO(maf): figure out proper fix for the following. # There is only one place in plugin_mac.mm which attempts # to use ObjC exception handling. @@ -132,7 +132,7 @@ 'UNICODE', 'GTEST_NOT_MAC_FRAMEWORK_MODE', 'NACL_OSX=1', - 'MAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_4', + 'MAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_5', 'SK_BUILD_FOR_MAC', ], 'configurations': { @@ -146,7 +146,7 @@ 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', 'OTHER_CFLAGS': [ '-fno-eliminate-unused-debug-symbols', - '-mmacosx-version-min=10.4'], + '-mmacosx-version-min=10.5'], 'WARNING_CFLAGS': ['-Wno-deprecated-declarations'], 'WARNING_CXXFLAGS': ['-Wstrict-aliasing', '-Wno-deprecated',], diff --git a/o3d/build/common_global.gypi b/o3d/build/common_global.gypi index e3b5429..411b146 100644 --- a/o3d/build/common_global.gypi +++ b/o3d/build/common_global.gypi @@ -9,6 +9,13 @@ # that generally in Chrome (so it can't be lumped into the top-level # build/common.gypi). { + 'variables': { + 'conditions': [ + [ 'OS == "linux"', { + 'use_system_zlib': 0, + }], + ], + }, 'target_defaults': { 'conditions': [ [ 'OS == "linux" and target_arch=="x64"', { @@ -20,6 +27,16 @@ '-m64', ], }], + [ 'OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.5', + 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', + 'OTHER_CFLAGS': ['-mmacosx-version-min=10.5'], + }, + 'defines': [ + 'MAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_5', + ], + }], ], }, } diff --git a/o3d/plugin/cross/np_v8_bridge.cc b/o3d/plugin/cross/np_v8_bridge.cc index f898b6b..5fa93e4 100644 --- a/o3d/plugin/cross/np_v8_bridge.cc +++ b/o3d/plugin/cross/np_v8_bridge.cc @@ -37,6 +37,7 @@ #include <npapi.h> #include <sstream> #include <vector> +#include "base/scoped_ptr.h" #include "plugin/cross/np_v8_bridge.h" using v8::AccessorInfo; @@ -705,9 +706,22 @@ bool NPV8Bridge::Evaluate(const NPVariant* np_args, int numArgs, if (v8_code.IsEmpty() || !v8_code->IsString()) return false; + // Newer versions of v8 doesn't like eval('function () { ... }') but wants + // instead eval('(function () { ... })'), so add a pair of ( ) around the + // given string. + Local<v8::String> v8_code_string = v8_code->ToString(); + int length = v8_code_string->Utf8Length(); + // Note: this string is not 0-terminated. + scoped_array<char> paren_string(new char[length + 2]); + v8_code_string->WriteUtf8(paren_string.get() + 1, length); + paren_string[0] = '('; + paren_string[length + 1] = ')'; + v8_code_string = v8::String::New(paren_string.get(), length + 2); + + TryCatch tryCatch; - Local<Script> v8_script = v8::Script::Compile(v8_code->ToString()); + Local<Script> v8_script = v8::Script::Compile(v8_code_string); if (tryCatch.HasCaught()) { ReportV8Exception(tryCatch); return false; |